85 lines
1.9 KiB
QML
85 lines
1.9 KiB
QML
import QtQuick 2.15
|
|
import QtQuick.Controls 2.15 as Controls
|
|
import QtQuick.Layouts 1.15
|
|
|
|
import org.kde.kirigami 2.20 as Kirigami
|
|
|
|
import BigScreenTube 1.0
|
|
|
|
Controls.Pane
|
|
{
|
|
anchors {
|
|
fill: parent
|
|
margins: 32
|
|
}
|
|
|
|
background: Rectangle {
|
|
color: Kirigami.Theme.backgroundColor
|
|
}
|
|
|
|
property alias videoTitle: title.text
|
|
property string videoSource
|
|
|
|
Component.onCompleted: {
|
|
video.load(videoSource)
|
|
}
|
|
|
|
ColumnLayout {
|
|
anchors {
|
|
fill: parent
|
|
margins: 10
|
|
}
|
|
|
|
Kirigami.Heading {
|
|
id: title
|
|
Layout.fillWidth: true
|
|
level: 1
|
|
font.weight: Font.Light
|
|
}
|
|
|
|
Rectangle {
|
|
id: videoContainer
|
|
|
|
/*Keys.onReturnPressed: {
|
|
console.log("play")
|
|
video.togglePause()
|
|
}
|
|
|
|
Keys.onDownPressed: {
|
|
console.log("show controls")
|
|
playerOSDItem.opened = true
|
|
}*/
|
|
|
|
Layout.fillWidth: true
|
|
Layout.fillHeight: true
|
|
|
|
focus: true
|
|
|
|
MpvObject {
|
|
id: video
|
|
anchors.fill: parent
|
|
}
|
|
|
|
Rectangle {
|
|
color: Qt.rgba(Kirigami.Theme.backgroundColor.r, Kirigami.Theme.backgroundColor.g, Kirigami.Theme.backgroundColor.b, .4)
|
|
anchors.fill: parent
|
|
visible: video.seeking
|
|
Controls.BusyIndicator {
|
|
id: videoSpinner
|
|
running: video.seeking
|
|
|
|
anchors {
|
|
horizontalCenter: parent.horizontalCenter
|
|
verticalCenter: parent.verticalCenter
|
|
}
|
|
}
|
|
}
|
|
|
|
MpvPlayerControls {
|
|
anchors.bottom: parent.bottom
|
|
height: parent.height * 0.10
|
|
}
|
|
}
|
|
|
|
}
|
|
}
|