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

Seeking Improved Approach for Accessing Metadata Changes in ExoPlayer During Playback #1094

Open
akhilaravind123 opened this issue Feb 15, 2024 · 1 comment
Assignees
Labels

Comments

@akhilaravind123
Copy link

Description:
I am currently working on an Android application that utilizes ExoPlayer for media playback. One of the key requirements of the project is to dynamically update the UI based on metadata changes during playback. We have an "onCue" method for Amazon IVS player for this specific requirement. I need something similar to that in ExoPlayer . I found a code snippet for doing this in ExoPlayer .

Capture

Issue:
I am seeking advice and suggestions from the community about this approach, Is there any better way for accessing metadata changes in ExoPlayer during playback?

Questions:

  1. Are there any best practices or examples available for accessing metadata change in ExoPlayer?
  2. Any considerations or challenges I should be aware of when implementing this feature in ExoPlayer compared to AWS IVS Player?

Reference:
Embedding Metadata in Amazon IVS Player: https://docs.aws.amazon.com/ivs/latest/LowLatencyUserGuide/metadata.html

Additional Context:
Android version: Android SDK 21 or above
Any relevant code snippets or resources would be greatly appreciated.

@marcbaechinger
Copy link
Contributor

marcbaechinger commented Feb 16, 2024

The approach with MetadataOutput.onMetadata seems to me to be the right way to do that if you want to receive proprietary ID3 tags (proprietary as in non-standard semantic like 'artist'). I don't know Amazon IVS, so I'm guessing they are using some kind of ID3 tags with content specific to their use case.

ExoPlayerImpl itself is using MetadataOutput.onMetadata(). It receives the in-band metadata and merges it with the MediaMetadata object of the item currently being played. That's probably also kind of the code sample that you are looking for. Check it out here.

My guess would be that you are looking for one of the Id3Frame types, probably TextInformationFrame, that you can find here. I think with such a stream and once having a break point in onMetadata you should be able to figure that out without me reading the AMazon docs. :)

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

No branches or pull requests

2 participants