fixing video background loading twice
This commit is contained in:
parent
b5543c0c46
commit
9bc6e17a8f
2 changed files with 9 additions and 11 deletions
|
@ -156,6 +156,9 @@ Item {
|
||||||
Connections {
|
Connections {
|
||||||
target: SlideObject
|
target: SlideObject
|
||||||
function onVideoBackgroundChanged() {
|
function onVideoBackgroundChanged() {
|
||||||
|
if (SlideObject.videoBackground === "")
|
||||||
|
stopVideo();
|
||||||
|
else
|
||||||
loadVideo();
|
loadVideo();
|
||||||
}
|
}
|
||||||
function onIsPlayingChanged() {
|
function onIsPlayingChanged() {
|
||||||
|
@ -174,10 +177,12 @@ Item {
|
||||||
}
|
}
|
||||||
|
|
||||||
function loadVideo() {
|
function loadVideo() {
|
||||||
|
showPassiveNotification("Loading Video " + vidbackground)
|
||||||
previewSlide.loadVideo();
|
previewSlide.loadVideo();
|
||||||
}
|
}
|
||||||
|
|
||||||
function stopVideo() {
|
function stopVideo() {
|
||||||
|
showPassiveNotification("Stopping Video")
|
||||||
previewSlide.stopVideo()
|
previewSlide.stopVideo()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -193,7 +198,6 @@ Item {
|
||||||
print(changed);
|
print(changed);
|
||||||
if (changed) {
|
if (changed) {
|
||||||
currentServiceItem++;
|
currentServiceItem++;
|
||||||
loadVideo();
|
|
||||||
leftDock.changeItem();
|
leftDock.changeItem();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -82,7 +82,6 @@ Item {
|
||||||
print("WHY AREN'T YOU PASUING!");
|
print("WHY AREN'T YOU PASUING!");
|
||||||
pauseTimer.restart();
|
pauseTimer.restart();
|
||||||
}
|
}
|
||||||
audio.source = audioSource.toString();
|
|
||||||
blackTimer.restart();
|
blackTimer.restart();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -109,17 +108,12 @@ Item {
|
||||||
}
|
}
|
||||||
|
|
||||||
MpvObject {
|
MpvObject {
|
||||||
id: mpvAudio
|
id: audio
|
||||||
useHwdec: true
|
useHwdec: true
|
||||||
enableAudio: true
|
enableAudio: true
|
||||||
// embeded mpv allows to set commandline propertys using the options/<name>
|
// embeded mpv allows to set commandline propertys using the options/<name>
|
||||||
// syntax. This could be abstracted later, but for now this works.
|
// syntax. This could be abstracted later, but for now this works.
|
||||||
Component.onCompleted: mpvAudio.setProperty("options/audio-display", "no");
|
Component.onCompleted: audio.setProperty("options/audio-display", "no");
|
||||||
}
|
|
||||||
|
|
||||||
Controls.Label {
|
|
||||||
id: error
|
|
||||||
text: audio.errorString
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Image {
|
Image {
|
||||||
|
@ -178,7 +172,7 @@ Item {
|
||||||
}
|
}
|
||||||
|
|
||||||
function playAudio() {
|
function playAudio() {
|
||||||
mpvAudio.loadFile(audioSource.toString());
|
audio.loadFile(audioSource.toString());
|
||||||
}
|
}
|
||||||
|
|
||||||
function stopVideo() {
|
function stopVideo() {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue