video playpause and font changes are working

This commit is contained in:
Chris Cochrun 2022-08-29 15:43:11 -05:00
parent 604f3d1a19
commit fbf26daebc
2 changed files with 13 additions and 10 deletions

View file

@ -58,6 +58,7 @@ Item {
mpv.setProperty("loop", "no");
/* showPassiveNotification(mpv.getProperty("loop")); */
}
/* onIsPlayingChanged: showPassiveNotification(mpv.getProperty("pause")) */
MouseArea {
id: playArea
@ -169,4 +170,8 @@ Item {
function pauseVideo() {
mpv.pause();
}
function playPauseVideo() {
mpv.playPause();
}
}

View file

@ -41,7 +41,7 @@ Item {
anchors.leftMargin: 10
width: parent.width - playBackgroundButton.width - 10
height: playBackgroundButton.height
/* visible: editMode */
visible: videoBackground.length() > 1;
value: firstItem.mpvPosition
to: firstItem.mpvDuration
}
@ -55,7 +55,6 @@ Item {
anchors.leftMargin: 10
anchors.right: parent.right
anchors.rightMargin: 20
width: parent.width
model: songModel
clip: true
cacheBuffer: 900
@ -71,12 +70,13 @@ Item {
videoSource: song.backgroundType = "video" ? song.background : ""
hTextAlignment: root.hTextAlignment
vTextAlignment: root.vTextAlignment
chosenFont: song.font
textSize: song.fontSize
chosenFont: font
textSize: fontSize
preview: true
text: verse
implicitWidth: slideList.width
implicitHeight: width * 9 / 16
itemType: "song"
}
Kirigami.WheelHandler {
@ -96,9 +96,6 @@ Item {
}
Component.onCompleted: {
}
ListModel {
id: songModel
}
@ -145,10 +142,11 @@ Item {
}
function playPauseSlide() {
firstItem = slideList.itemAtIndex(0)
firstItem = slideList.itemAtIndex(0);
print(firstItem);
playingVideo = !playingVideo;
slideList.itemAtIndex(0).editMode = false;
slideList.itemAtIndex(0).loadVideo();
/* firstItem.editMode = false; */
firstItem.playPauseVideo();
}
}