1
0
mirror of https://gitlab.com/kelteseth/ScreenPlay.git synced 2024-11-07 03:22:33 +01:00

Fix wallpaper playing

This commit is contained in:
Elias Steurer 2021-09-10 11:36:47 +02:00
parent 40d8696e99
commit 2b7d6422bd
2 changed files with 16 additions and 12 deletions

View File

@ -1,5 +1,6 @@
import QtQuick 2.0
import QtMultimedia
import ScreenPlayWallpaper 1.0
VideoOutput {
id: root
@ -7,15 +8,17 @@ VideoOutput {
id: mediaPlayer
videoOutput: root
// volume: Wallpaper.volume
//source: Qt.resolvedUrl(Wallpaper.projectSourceFileAbsolute)
source: Qt.resolvedUrl("C:/Users/Eli/Videos/videoplayback.webm")
Component.onCompleted: mediaPlayer.play()
//loops: true
source: Wallpaper.projectSourceFileAbsolute
Component.onCompleted: {
print("play", source)
mediaPlayer.play()
}
// loops: MediaPlayer.Infinite
onErrorOccurred: function (error, errorString) {
if (MediaPlayer.NoError !== error) {
console.log("[qmlvideo] VideoItem.onError error " + error + " errorString " + errorString)
console.log("[qmlvideo] VideoItem.onError error " + error
+ " errorString " + errorString)
root.fatalError()
}
}
}
}

View File

@ -12,7 +12,8 @@ Rectangle {
function init() {
switch (Wallpaper.type) {
case InstalledType.VideoWallpaper:
loader.source = "qrc:/MultimediaView.qml";
loader.source = "qrc:/qml/MultimediaView.qml";
fadeIn();
break;
case InstalledType.HTMLWallpaper:
loader.setSource("qrc:/qml/WebView.qml", {