1
0
mirror of https://gitlab.com/kelteseth/ScreenPlay.git synced 2024-09-14 22:42:34 +02:00

Add fadeIn workaround #2

This commit is contained in:
Elias Steurer 2023-01-22 16:28:41 +01:00
parent ae845d2604
commit d06f5b04c1

View File

@ -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