ensuring audio only plays in proper places
This commit is contained in:
parent
4f0ab74fa1
commit
2711bde130
3 changed files with 23 additions and 5 deletions
|
@ -23,6 +23,7 @@ Window {
|
|||
onClosing: {
|
||||
presentationSlide.stopVideo();
|
||||
SlideObject.pause();
|
||||
presentationSlide.stopAudio();
|
||||
presenting = false;
|
||||
}
|
||||
|
||||
|
@ -35,6 +36,7 @@ Window {
|
|||
anchors.fill: parent
|
||||
imageSource: SlideObject.imageBackground
|
||||
videoSource: presentationWindow.visible ? SlideObject.videoBackground : ""
|
||||
audioSource: SlideObject.audio
|
||||
text: SlideObject.text
|
||||
pdfIndex: SlideObject.pdfIndex
|
||||
itemType: SlideObject.type
|
||||
|
@ -43,13 +45,24 @@ Window {
|
|||
Connections {
|
||||
target: SlideObject
|
||||
function onVideoBackgroundChanged() {
|
||||
loadVideo();
|
||||
if (SlideObject.videoBackground === "")
|
||||
stopVideo();
|
||||
else {
|
||||
loadVideo();
|
||||
playVideo();
|
||||
}
|
||||
}
|
||||
function onIsPlayingChanged() {
|
||||
if(SlideObject.isPlaying)
|
||||
presentationSlide.playVideo();
|
||||
pauseVideo();
|
||||
}
|
||||
function onAudioChanged() {
|
||||
if (presentationWindow.visible)
|
||||
presentationSlide.playAudio();
|
||||
else
|
||||
presentationWindow.stopAudio();
|
||||
}
|
||||
}
|
||||
|
||||
function loadVideo() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue