mirror of
https://gitlab.com/kelteseth/ScreenPlay.git
synced 2024-11-07 03:22:33 +01:00
Fix qt6 qml capture =>
This commit is contained in:
parent
b0c36c4c67
commit
b52f9fcfa8
@ -2,23 +2,22 @@ import QtQuick 2.0
|
||||
import QtMultimedia
|
||||
import ScreenPlayWallpaper 1.0
|
||||
|
||||
VideoOutput {
|
||||
Video {
|
||||
id: root
|
||||
MediaPlayer {
|
||||
id: mediaPlayer
|
||||
videoOutput: root
|
||||
// volume: Wallpaper.volume
|
||||
source: Wallpaper.projectSourceFileAbsolute
|
||||
Component.onCompleted: {
|
||||
print("play", source)
|
||||
mediaPlayer.play()
|
||||
}
|
||||
|
||||
// loops: MediaPlayer.Infinite
|
||||
onErrorOccurred: function (error, errorString) {
|
||||
console.log("[qmlvideo] VideoItem.onError error " + error
|
||||
+ " errorString " + errorString)
|
||||
root.fatalError()
|
||||
}
|
||||
volume: Wallpaper.volume
|
||||
source: Wallpaper.projectSourceFileAbsolute
|
||||
Component.onCompleted: {
|
||||
root.play()
|
||||
}
|
||||
onStopped: {
|
||||
if (Wallpaper.loops)
|
||||
root.play()
|
||||
}
|
||||
|
||||
//loops: MediaPlayer.Infinite
|
||||
// onErrorOccurred: function (error, errorString) {
|
||||
// console.log("[qmlvideo] VideoItem.onError error " + error
|
||||
// + " errorString " + errorString)
|
||||
// root.fatalError()
|
||||
// }
|
||||
}
|
||||
|
@ -94,8 +94,7 @@ Rectangle {
|
||||
if (oldType === InstalledType.VideoWallpaper)
|
||||
return ;
|
||||
|
||||
imgCover.state = "showDefaultBackgroundImage";
|
||||
loader.source = "qrc:/qml/WebView.qml";
|
||||
loader.source = "qrc:/qml/MultimediaView.qml";
|
||||
}
|
||||
|
||||
target: Wallpaper
|
||||
|
@ -41,7 +41,7 @@ Item {
|
||||
anchors.fill: parent
|
||||
url: "qrc:/index.html"
|
||||
backgroundColor: "transparent"
|
||||
onJavaScriptConsoleMessage: print(lineNumber, message)
|
||||
onJavaScriptConsoleMessage:(lineNumber, message)=> print(lineNumber, message)
|
||||
onLoadProgressChanged: {
|
||||
if ((loadProgress === 100)) {
|
||||
if (Wallpaper.type === InstalledType.VideoWallpaper)
|
||||
|
Loading…
Reference in New Issue
Block a user