From d06f5b04c14e85a6bb24413dd2a012a82eb1f5dc Mon Sep 17 00:00:00 2001 From: Elias Steurer Date: Sun, 22 Jan 2023 16:28:41 +0100 Subject: [PATCH] Add fadeIn workaround #2 --- ScreenPlayWallpaper/qml/MultimediaView.qml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/ScreenPlayWallpaper/qml/MultimediaView.qml b/ScreenPlayWallpaper/qml/MultimediaView.qml index bf1f11d2..a957d158 100644 --- a/ScreenPlayWallpaper/qml/MultimediaView.qml +++ b/ScreenPlayWallpaper/qml/MultimediaView.qml @@ -24,7 +24,7 @@ Item { onIsPlayingChanged: isPlaying ? mediaPlayer.play() : mediaPlayer.pause() property bool isWindows: Qt.platform.os === "windows" - signal requestFadeIn + property bool ready: false property string source: Wallpaper.projectSourceFileAbsolute onSourceChanged: { @@ -36,10 +36,11 @@ Item { MediaPlayer { id: mediaPlayer - Component.onCompleted: { - mediaPlayer.play() - root.requestFadeIn() - } + onPlaybackStateChanged:{ + if( mediaPlayer.playbackState == MediaPlayer.PlayingState){ + root.ready = true + } + } loops: root.loops ? MediaPlayer.Infinite : 1 videoOutput: vo audioOutput: ao