fixed video and images loading after changing in toolbar
This commit is contained in:
parent
65f5026ee4
commit
d0d66a5d54
2 changed files with 20 additions and 8 deletions
|
@ -41,7 +41,7 @@ Item {
|
|||
anchors.leftMargin: 10
|
||||
width: parent.width - playBackgroundButton.width - 10
|
||||
height: playBackgroundButton.height
|
||||
visible: videoBackground.length() > 1;
|
||||
visible: firstItem.mpvDuration > 1;
|
||||
value: firstItem.mpvPosition
|
||||
to: firstItem.mpvDuration
|
||||
}
|
||||
|
@ -66,8 +66,8 @@ Item {
|
|||
delegate: Presenter.Slide {
|
||||
id: representation
|
||||
editMode: true
|
||||
imageSource: song.backgroundType = "image" ? song.background : ""
|
||||
videoSource: song.backgroundType = "video" ? song.background : ""
|
||||
imageSource: root.imageBackground
|
||||
videoSource: root.videoBackground
|
||||
hTextAlignment: root.hTextAlignment
|
||||
vTextAlignment: root.vTextAlignment
|
||||
chosenFont: font
|
||||
|
@ -106,10 +106,6 @@ Item {
|
|||
songModel.append({"verse": verse})
|
||||
}
|
||||
|
||||
/* function loadVideo() { */
|
||||
/* representation.loadVideo(); */
|
||||
/* } */
|
||||
|
||||
function updateHAlignment(alignment) {
|
||||
switch (alignment) {
|
||||
case "left" :
|
||||
|
@ -149,4 +145,19 @@ Item {
|
|||
firstItem.playPauseVideo();
|
||||
}
|
||||
|
||||
function stopVideo() {
|
||||
representation.stopVideo();
|
||||
}
|
||||
|
||||
function pauseVideo() {
|
||||
representation.pauseVideo();
|
||||
}
|
||||
|
||||
function loadVideo() {
|
||||
for (var i = 0; i < slideList.count; ++i) {
|
||||
slideList.currentIndex = i;
|
||||
slideList.currentItem.loadVideo();
|
||||
print(slideList.currentItem);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -328,8 +328,8 @@ Item {
|
|||
}
|
||||
|
||||
function updateBackground(background, backgroundType) {
|
||||
song.background = background;
|
||||
song.backgroundType = backgroundType;
|
||||
song.background = background;
|
||||
songsqlmodel.updateBackground(songIndex, background);
|
||||
songsqlmodel.updateBackgroundType(songIndex, backgroundType);
|
||||
print("changed background");
|
||||
|
@ -341,6 +341,7 @@ Item {
|
|||
//todo
|
||||
slideEditor.imageBackground = "";
|
||||
slideEditor.videoBackground = background;
|
||||
slideEditor.loadVideo();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue