X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=app%2FMediaPlayer.qml;h=9562f14c82ce2864ed2d7a499e349ae2b3f3e5c3;hb=288364b4644ae41be94b0b38b9a508d1b494a1d7;hp=7cca337af9d64db6d610a079bc5c4c9b8db9f180;hpb=01820c0e9c4a64eca10ede8222c2c7ad719f286d;p=apps%2Fmediaplayer.git diff --git a/app/MediaPlayer.qml b/app/MediaPlayer.qml index 7cca337..9562f14 100644 --- a/app/MediaPlayer.qml +++ b/app/MediaPlayer.qml @@ -59,10 +59,6 @@ ApplicationWindow { player.av_connected = metadata.connected } - if ('position' in metadata) { - player.position = metadata.position - } - if (track) { if ('image' in track) { player.cover_art = track.image @@ -77,6 +73,10 @@ ApplicationWindow { playlistview.currentIndex = track.index } } + + if ('position' in metadata) { + player.position = metadata.position + } } } @@ -213,7 +213,6 @@ ApplicationWindow { target: play offImage: './images/AGL_MediaPlayer_Player_Pause.svg' onClicked: { - player.status = "stopped" mediaplayer.pause() } } @@ -247,8 +246,9 @@ ApplicationWindow { else mediaplayer.disconnect() } - offImage: './images/AGL_MediaPlayer_Bluetooth_Inactive.svg' - onImage: './images/AGL_MediaPlayer_Bluetooth_Active.svg' + contentItem: Image { + source: player.av_connected ? './images/AGL_MediaPlayer_Bluetooth_Active.svg' : './images/AGL_MediaPlayer_Bluetooth_Inactive.svg' + } } } }