Background artwork for audio in Cast
See original GitHub issueUsing com.google.android.exoplayer2.MediaMetadata
it’s possible to add only one artwork with .setArtworkUri()
.
On a cast device with display, that artwork would display next to the title with no possibility to set a background, leaving the screen black when the playing controls disappear after a few settings.
A background artwork was displayed up until version 15 when we could use ‘MediaMetadata.loadItems’.
Is there a way to display a background again?
Issue Analytics
- State:
- Created a year ago
- Comments:11 (5 by maintainers)
Top Results From Across the Web
Ambient Mode for Chromecast and Chromecast Ultra
When you select Art gallery, you can display photos in Ambient Mode from sources around the internet, such as Google Earth. You can...
Read more >Android TV adds background Chromecast audio support
Google has quietly added support for background audio streaming for Chromecast apps on Android TV devices presumably through an update.
Read more >Set image in media player - Home Assistant Community
Hi, Can anybody help me with how I can set the album art or image in the media player? I have added chrome...
Read more >Sound wave background. Music sound digital equalizer wirefra
Dec 5, 2020 - Download Sound wave background. Music sound digital equalizer wirefra (788271) instantly now! Trusted by millions + EASY to use...
Read more >Android TV can now play casted audio in the background
Android TV has added support for playing casted audio in the background while using other apps. Simply open Spotify or YouTube Music then...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
You can add it to the extras with your own key and then take it from there in the
MediaItemConverter
:Then in the
MediaItemConverter
you can get the image uri frommediaItem.mediaMetadata.extras.getString(MY_KEY_CAST_BACKGROUND_IMAGE_URI)
and use it to create a castWebImage
to be added to the cast item.same issue, can’t find an alternative to addImage on MediaItem and MediaItem is needed for .setMediaItem() on the CastPlayer. Also, the Chromecast TV interface dims after a couple of seconds, I assume because there is only one image loaded.
Looking at the CastPlayer it does internally convert MediaItem to MediaQueueItem before its sends data to the cast device, I think it would make sense to open the interface and make CastPlayer accept MediaQueueItem.
@marcbaechinger The issue is I think that currently there can be only one image set on the MediaItem, even if there is a custom converter class, MediaItem builder has an option to set only setArtworkUri() and I think we are missing something like setBackgroundArtworkUri(). The way that was done before was by calling addImage() multiple times.