-
Notifications
You must be signed in to change notification settings - Fork 6k
Closed
Labels
Description
When using the MediaSession extension for ExoPlayer, it is possible to specify whether or not metadata should be updated with the doMaintainMetadata constructor parameter. If true, MediaSessionConnector will internally call the private method updateMediaSessionMetadata to recreate a MediaMetadataCompat from the currently playing MediaDescriptionCompat.
I already have MediaMetadataCompat objects stored in memory cache, and I'd like to retrieve them from it instead of creating them again. One solution would be to subclass MediaSessionConnector to redefine setPlayer and attach another Player.Listener to call my own updateMediaSessionMetadata, but it's not very handy.
Is there any easier way ? If not, I suggest the following:
- Make
updateMediaSessionMetadataprotected, or - Provide a
MetadataProviderinterface to customize MediaSessionConnector, along with aDefaultMetadataProviderto retain the current behavior.
Thanks in advance !
Reactions are currently unavailable