mirror of
https://gitlab.com/kelteseth/ScreenPlay.git
synced 2024-11-22 10:42:29 +01:00
Add slight delay to wait for MM to start outputting some frames
This commit is contained in:
parent
7abc937e0e
commit
7f230df175
@ -33,12 +33,23 @@ Item {
|
||||
mediaPlayer.play();
|
||||
}
|
||||
|
||||
// Add slight delay to give the multimedia
|
||||
// engine some time to put out some frames. This
|
||||
// fixes some white frame flickering
|
||||
Timer {
|
||||
id: startTimer
|
||||
interval: 50
|
||||
onTriggered: {
|
||||
Wallpaper.requestFadeIn();
|
||||
}
|
||||
}
|
||||
|
||||
MediaPlayer {
|
||||
id: mediaPlayer
|
||||
onPlaybackStateChanged: {
|
||||
if (mediaPlayer.playbackState == MediaPlayer.PlayingState && !fadeInDone) {
|
||||
fadeInDone = true;
|
||||
Wallpaper.requestFadeIn();
|
||||
startTimer.start()
|
||||
}
|
||||
}
|
||||
loops: root.loops ? MediaPlayer.Infinite : 1
|
||||
@ -85,7 +96,6 @@ Item {
|
||||
}
|
||||
|
||||
function onVisualsPausedChanged(visualsPaused) {
|
||||
print(visualsPaused)
|
||||
if(!Wallpaper.isPlaying)
|
||||
return
|
||||
if(visualsPaused)
|
||||
|
Loading…
Reference in New Issue
Block a user