🐛 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:
parent
485a7ac223
commit
ea74fda363
4 changed files with 13 additions and 0 deletions
|
@ -130,6 +130,8 @@ FocusScope {
|
||||||
text: SlideObject.text
|
text: SlideObject.text
|
||||||
pdfIndex: SlideObject.slideIndex
|
pdfIndex: SlideObject.slideIndex
|
||||||
vidLoop: SlideObject.looping
|
vidLoop: SlideObject.looping
|
||||||
|
vidStartTime: SlideObject.videoStartTime
|
||||||
|
vidEndTime: SlideObject.videoEndTime
|
||||||
preview: true
|
preview: true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -59,6 +59,8 @@ Item {
|
||||||
pdfIndex: SlideObj.slideIndex
|
pdfIndex: SlideObj.slideIndex
|
||||||
itemType: SlideObj.ty
|
itemType: SlideObj.ty
|
||||||
vidLoop: SlideObj.looping
|
vidLoop: SlideObj.looping
|
||||||
|
vidStartTime: SlideObj.videoStartTime
|
||||||
|
vidEndTime: SlideObj.videoEndTime
|
||||||
}
|
}
|
||||||
|
|
||||||
Connections {
|
Connections {
|
||||||
|
|
|
@ -24,6 +24,8 @@ Item {
|
||||||
property url videoSource
|
property url videoSource
|
||||||
property url audioSource
|
property url audioSource
|
||||||
property bool vidLoop
|
property bool vidLoop
|
||||||
|
property real vidStartTime
|
||||||
|
property real vidEndTime
|
||||||
property int pdfIndex
|
property int pdfIndex
|
||||||
property string chosenFont: "Quicksand"
|
property string chosenFont: "Quicksand"
|
||||||
property string text
|
property string text
|
||||||
|
@ -85,6 +87,7 @@ Item {
|
||||||
onTriggered: {
|
onTriggered: {
|
||||||
/* showPassiveNotification("YIPPEEE!") */
|
/* showPassiveNotification("YIPPEEE!") */
|
||||||
mpv.loadFile(videoSource.toString());
|
mpv.loadFile(videoSource.toString());
|
||||||
|
mpv.seek(vidStartTime)
|
||||||
if (editMode) {
|
if (editMode) {
|
||||||
console.log("WHY AREN'T YOU PASUING!");
|
console.log("WHY AREN'T YOU PASUING!");
|
||||||
pauseTimer.restart();
|
pauseTimer.restart();
|
||||||
|
|
|
@ -211,6 +211,12 @@ mod slide_obj {
|
||||||
self.as_mut().set_slide_size(slide_size);
|
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
|
let icount = item
|
||||||
.get(&QString::from("imageCount"))
|
.get(&QString::from("imageCount"))
|
||||||
.unwrap_or(QVariant::from(&1));
|
.unwrap_or(QVariant::from(&1));
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue