androidx / media

Jetpack Media3 support libraries for media use cases, including ExoPlayer, an extensible media player for Android
https://developer.android.com/media/media3
Apache License 2.0
1.75k stars 419 forks source link

API to query ExoPlayer audio latency #1837

Open ryanheise opened 1 month ago

ryanheise commented 1 month ago

Audio latency in ExoPlayer can be introduced when using Bluetooth headphones, or when running audio processors.

What if I want to query the current player position and then render a certain UI based on the current position? Without being able to query the audio latency, it would not be possible to make the UI updates sync with the audio.

Now ExoPlayer is somehow already able to do this with video playback where the video frames on the screen sync up with the audio coming through the Bluetooth headphones. But is there an API that allows me to have access to this same timing information so that I can make my UI sync up with the audio?

Tolriq commented 1 month ago

+1 for synced lyrics, currently using arbitrary delays.

ryanheise commented 1 month ago

Yes, synced lyrics is quite a good use case for this.