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

View file

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