Warning, /plasma/kwin/src/kcms/effects/ui/Video.qml is written in an unsupported language. File is not indexed.

0001 /*
0002     SPDX-FileCopyrightText: 2013 Antonis Tsiapaliokas <kok3rs@gmail.com>
0003     SPDX-FileCopyrightText: 2014 Martin Gräßlin <mgraesslin@kde.org>
0004     SPDX-FileCopyrightText: 2023 ivan tkachenko <me@ratijas.tk>
0005 
0006     SPDX-License-Identifier: GPL-2.0-or-later
0007 */
0008 
0009 import QtQuick
0010 import QtQuick.Controls as QQC2
0011 import QtQuick.Layouts
0012 import QtMultimedia as Multimedia
0013 
0014 Multimedia.Video {
0015     id: videoItem
0016 
0017     source: model.VideoRole
0018     width: 400
0019     height: 400
0020 
0021     QQC2.BusyIndicator {
0022         anchors.centerIn: parent
0023         visible: videoItem.status === Multimedia.MediaPlayer.Loading
0024         running: true
0025     }
0026 
0027     QQC2.Button {
0028         id: replayButton
0029 
0030         visible: false
0031         anchors.centerIn: parent
0032         icon.name: "media-playback-start"
0033 
0034         onClicked: {
0035             replayButton.visible = false;
0036             videoItem.play();
0037         }
0038     }
0039 
0040     onStopped: {
0041         replayButton.visible = true
0042     }
0043 }