ui components to control looping on the fly

This commit is contained in:
Chris Cochrun 2022-10-06 03:33:56 -05:00
parent 39ea1eb759
commit a3be06639b
7 changed files with 58 additions and 10 deletions

View file

@ -19,8 +19,6 @@ FocusScope {
property Item slide: previewSlide
onActiveFocusChanged: showPassiveNotification("OUCH")
Item {
id: keyHandler
anchors.fill: parent
@ -65,6 +63,11 @@ FocusScope {
Controls.ToolSeparator {}
Item { Layout.fillWidth: true }
Controls.ToolSeparator {}
Controls.ToolButton {
text: "Repeat"
icon.name: "repeat"
onClicked: mainPage.loopVideo()
}
Controls.ToolButton {
text: "Effects"
icon.name: "image-auto-adjust"
@ -152,6 +155,13 @@ FocusScope {
live: true
onMoved: changeVidPos(value);
}
Controls.Switch {
text: "Loop"
visible: itemType === "video";
checked: previewSlide.mpvLoop === "inf" ? true : false
onToggled: mainPage.loopVideo()
}
}
Item {
@ -273,6 +283,10 @@ FocusScope {
previewSlide.loadVideo();
}
function loopVideo() {
previewSlide.loopVideo();
}
function stopVideo() {
/* showPassiveNotification("Stopping Video") */
previewSlide.stopVideo()