Fix playerIcons

Show pause button when playingState
Show play button when pausingState
This commit is contained in:
molan-git 2020-05-11 09:05:45 +02:00 committed by GitHub
parent 141e25e0d7
commit c4820adaf2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -57,10 +57,10 @@ Page {
console.log(playbackState) console.log(playbackState)
switch (playbackState){ switch (playbackState){
case MediaPlayer.PlayingState: case MediaPlayer.PlayingState:
playerIcon.icon.source = "image://theme/icon-m-play" playerIcon.icon.source = "image://theme/icon-m-pause"
return; return;
case MediaPlayer.PausedState: case MediaPlayer.PausedState:
playerIcon.icon.source = "image://theme/icon-m-pause" playerIcon.icon.source = "image://theme/icon-m-play"
return; return;
case MediaPlayer.StoppedState: case MediaPlayer.StoppedState:
playerIcon.icon.source = "image://theme/icon-m-stop" playerIcon.icon.source = "image://theme/icon-m-stop"