mirror of
https://gitlab.com/kelteseth/ScreenPlay.git
synced 2024-09-18 16:32:33 +02:00
Fix wallpaper playing
This commit is contained in:
parent
40d8696e99
commit
2b7d6422bd
@ -1,21 +1,24 @@
|
|||||||
import QtQuick 2.0
|
import QtQuick 2.0
|
||||||
import QtMultimedia
|
import QtMultimedia
|
||||||
|
import ScreenPlayWallpaper 1.0
|
||||||
|
|
||||||
VideoOutput {
|
VideoOutput {
|
||||||
id:root
|
id: root
|
||||||
MediaPlayer {
|
MediaPlayer {
|
||||||
id: mediaPlayer
|
id: mediaPlayer
|
||||||
videoOutput: root
|
videoOutput: root
|
||||||
//volume: Wallpaper.volume
|
// volume: Wallpaper.volume
|
||||||
//source: Qt.resolvedUrl(Wallpaper.projectSourceFileAbsolute)
|
source: Wallpaper.projectSourceFileAbsolute
|
||||||
source: Qt.resolvedUrl("C:/Users/Eli/Videos/videoplayback.webm")
|
Component.onCompleted: {
|
||||||
Component.onCompleted: mediaPlayer.play()
|
print("play", source)
|
||||||
//loops: true
|
mediaPlayer.play()
|
||||||
onErrorOccurred: function(error, errorString) {
|
}
|
||||||
if (MediaPlayer.NoError !== error) {
|
|
||||||
console.log("[qmlvideo] VideoItem.onError error " + error + " errorString " + errorString)
|
// loops: MediaPlayer.Infinite
|
||||||
root.fatalError()
|
onErrorOccurred: function (error, errorString) {
|
||||||
}
|
console.log("[qmlvideo] VideoItem.onError error " + error
|
||||||
|
+ " errorString " + errorString)
|
||||||
|
root.fatalError()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -12,7 +12,8 @@ Rectangle {
|
|||||||
function init() {
|
function init() {
|
||||||
switch (Wallpaper.type) {
|
switch (Wallpaper.type) {
|
||||||
case InstalledType.VideoWallpaper:
|
case InstalledType.VideoWallpaper:
|
||||||
loader.source = "qrc:/MultimediaView.qml";
|
loader.source = "qrc:/qml/MultimediaView.qml";
|
||||||
|
fadeIn();
|
||||||
break;
|
break;
|
||||||
case InstalledType.HTMLWallpaper:
|
case InstalledType.HTMLWallpaper:
|
||||||
loader.setSource("qrc:/qml/WebView.qml", {
|
loader.setSource("qrc:/qml/WebView.qml", {
|
||||||
|
Loading…
Reference in New Issue
Block a user