🐛 need to get video start and end times working

This is waiting till service_item_model.rs is the model actually used
for ServiceList. Right now we are still using C++ so once that
switches, we can add it in service_item_model.

This way we don't add anymore C++ code that we are likely to throw away.
This commit is contained in:
Chris Cochrun 2023-05-19 16:01:08 -05:00
parent 485a7ac223
commit ea74fda363
4 changed files with 13 additions and 0 deletions

View file

@ -130,6 +130,8 @@ FocusScope {
text: SlideObject.text
pdfIndex: SlideObject.slideIndex
vidLoop: SlideObject.looping
vidStartTime: SlideObject.videoStartTime
vidEndTime: SlideObject.videoEndTime
preview: true
}

View file

@ -59,6 +59,8 @@ Item {
pdfIndex: SlideObj.slideIndex
itemType: SlideObj.ty
vidLoop: SlideObj.looping
vidStartTime: SlideObj.videoStartTime
vidEndTime: SlideObj.videoEndTime
}
Connections {

View file

@ -24,6 +24,8 @@ Item {
property url videoSource
property url audioSource
property bool vidLoop
property real vidStartTime
property real vidEndTime
property int pdfIndex
property string chosenFont: "Quicksand"
property string text
@ -85,6 +87,7 @@ Item {
onTriggered: {
/* showPassiveNotification("YIPPEEE!") */
mpv.loadFile(videoSource.toString());
mpv.seek(vidStartTime)
if (editMode) {
console.log("WHY AREN'T YOU PASUING!");
pauseTimer.restart();

View file

@ -211,6 +211,12 @@ mod slide_obj {
self.as_mut().set_slide_size(slide_size);
}
}
let video_start_time = item
.get(&QString::from("videoStartTime"))
.unwrap_or(QVariant::from(&0.0));
if let Some(int) = video_start_time.value::<f32>() {
self.as_mut().set_video_start_time(int)
}
let icount = item
.get(&QString::from("imageCount"))
.unwrap_or(QVariant::from(&1));