mirror of
https://github.com/samsonjs/media.git
synced 2026-04-27 15:07:40 +00:00
MediaSessionConnector: Document how to provide metadata asynchronously
Issue: #6047 PiperOrigin-RevId: 255992898
This commit is contained in:
parent
7798c07f64
commit
259bea1652
1 changed files with 7 additions and 0 deletions
|
|
@ -378,6 +378,13 @@ public final class MediaSessionConnector {
|
||||||
/**
|
/**
|
||||||
* Gets the {@link MediaMetadataCompat} to be published to the session.
|
* Gets the {@link MediaMetadataCompat} to be published to the session.
|
||||||
*
|
*
|
||||||
|
* <p>An app may need to load metadata resources like artwork bitmaps asynchronously. In such a
|
||||||
|
* case the app should return a {@link MediaMetadataCompat} object that does not contain these
|
||||||
|
* resources as a placeholder. The app should start an asynchronous operation to download the
|
||||||
|
* bitmap and put it into a cache. Finally, the app should call {@link
|
||||||
|
* #invalidateMediaSessionMetadata()}. This causes this callback to be called again and the app
|
||||||
|
* can now return a {@link MediaMetadataCompat} object with all the resources included.
|
||||||
|
*
|
||||||
* @param player The player connected to the media session.
|
* @param player The player connected to the media session.
|
||||||
* @return The {@link MediaMetadataCompat} to be published to the session.
|
* @return The {@link MediaMetadataCompat} to be published to the session.
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue