fix: mirror a live service timeline after the UI is recreated
The media service can keep playing after the task is swiped. A new UI now adopts its queue, index and position instead of showing a stale paused state. Notification artwork also uses cached offline covers. Version 0.4.1.
This commit is contained in:
1 parent
8cf77f156d
commit
8e737fae2e
6 files changed
+37
-4
No files matched your search
+4
-1
@@ -184,7 +184,10 @@ class MediaControllerAudioPlayer(context: Context) : AudioPlayer {
|
||||
Bundle().apply { putDouble(GAIN_DB_KEY, track.gainDb ?: 0.0) },
|
||||
)
|
||||
.apply {
|
||||
if (!track.artworkUri.isNullOrBlank()) {
|
||||
val bytes = track.artworkBytes
|
||||
if (bytes != null && bytes.isNotEmpty()) {
|
||||
setArtworkData(bytes, MediaMetadata.PICTURE_TYPE_FRONT_COVER)
|
||||
} else if (!track.artworkUri.isNullOrBlank()) {
|
||||
setArtworkUri(Uri.parse(track.artworkUri))
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user