Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MediaSessionConnector: Document how to provide metadata asynchronously #6047

Closed
ojw28 opened this issue Jun 17, 2019 · 0 comments
Closed

MediaSessionConnector: Document how to provide metadata asynchronously #6047

ojw28 opened this issue Jun 17, 2019 · 0 comments
Assignees

Comments

@ojw28
Copy link
Contributor

ojw28 commented Jun 17, 2019

To provide metadata asynchronously, you can:

  1. Return placeholder metadata from MediaMetadataProvider.getMetadata
  2. Kick off the async operation, which will to place the metadata into some kind of cache
  3. Call invalidateMediaSessionMetadata when the async operation completes
  4. Return real metadata from MediaMetadataProvider.getMetadata, assuming the player is still playing the same media item (probably implemented by having the cache be keyed on an identifier)

We should more clearly document this somehow. The best place would be to document this on getMetadata directly. If we write a web page about MediaSessionConnector, it would be good to document there also.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants