adding functionality to preview slider

This commit is contained in:
Chris Cochrun 2022-09-19 16:19:43 -05:00
parent 016756df72
commit a6d2eb28fd
4 changed files with 15 additions and 2 deletions

View file

@ -188,7 +188,6 @@ Controls.Page {
if (present) if (present)
{ {
presentation.loadVideo(); presentation.loadVideo();
pWindow.screen = presentationScreen;
print("For window: Screen is: " + pWindow.screen + " And selected screen is: " + presentationScreen); print("For window: Screen is: " + pWindow.screen + " And selected screen is: " + presentationScreen);
pWindow.showFullScreen(); pWindow.showFullScreen();
pWindow.screen = presentationScreen; pWindow.screen = presentationScreen;
@ -197,4 +196,9 @@ Controls.Page {
else else
pWindow.close(); pWindow.close();
} }
function changeVidPos(pos) {
presentation.slide.seek(pos);
pWindow.slide.seek(pos);
}
} }

View file

@ -17,6 +17,8 @@ Item {
property url imagebackground property url imagebackground
property url vidbackground property url vidbackground
property Item slide: previewSlide
/* Component.onCompleted: nextSlideAction() */ /* Component.onCompleted: nextSlideAction() */
GridLayout { GridLayout {
@ -132,7 +134,7 @@ Item {
to: previewSlide.mpvDuration to: previewSlide.mpvDuration
value: previewSlide.mpvPosition value: previewSlide.mpvPosition
live: true live: true
onMoved: print("moved slider"); onMoved: changeVidPos(value);
} }
} }

View file

@ -9,6 +9,9 @@ import org.presenter 1.0
Window { Window {
id: presentationWindow id: presentationWindow
property Item slide: presentationSlide
title: "presentation-window" title: "presentation-window"
height: maximumHeight height: maximumHeight
width: maximumWidth width: maximumWidth

View file

@ -173,6 +173,10 @@ Item {
showPassiveNotification("Black is: " + black.visible); showPassiveNotification("Black is: " + black.visible);
} }
function seek(pos) {
mpv.seek(pos);
}
function quitMpv() { function quitMpv() {
mpv.quit(); mpv.quit();
} }