ui components to control looping on the fly
This commit is contained in:
parent
39ea1eb759
commit
a3be06639b
7 changed files with 58 additions and 10 deletions
|
@ -31,7 +31,7 @@ Item {
|
|||
//these properties are for giving video info to parents
|
||||
property int mpvPosition: mpv.position
|
||||
property int mpvDuration: mpv.duration
|
||||
property var mpvLoop: mpv.getProperty("loop")
|
||||
property var mpvLoop: mpv.loop
|
||||
property bool mpvIsPlaying: mpv.isPlaying
|
||||
|
||||
// These properties help to determine the state of the slide
|
||||
|
@ -167,6 +167,17 @@ Item {
|
|||
lyrics.text = text
|
||||
}
|
||||
|
||||
function loopVideo() {
|
||||
if (mpv.getProperty("loop") === "inf") {
|
||||
showPassiveNotification("already looping");
|
||||
mpv.setProperty("loop", "no");
|
||||
}
|
||||
else {
|
||||
mpv.setProperty("loop", "inf");
|
||||
showPassiveNotification("looping video");
|
||||
}
|
||||
}
|
||||
|
||||
function loadVideo() {
|
||||
mpvLoadingTimer.restart()
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue