
Unconditionally sleep for offload, if the audio buffer is full. Previously ExoPlayer would not sleep if the expected wake-up was in 2s. This was to prevent underrun if the wake-up was delayed. Experiments have shown that the wakup audio buffer is far more than 2s (around 1min). Additionally, the metric was incorrect because it measured both, AudioTrack + DSP. Finally, this metric was erroneous after a gapless transition, when the head position would reset to 0 and thus the computed delay until next wakeup was too large. PiperOrigin-RevId: 451383701
ExoPlayer module
This module provides ExoPlayer
, the Player
implementation for local media
playback on Android.
Getting the module
The easiest way to get the module is to add it as a gradle dependency:
implementation 'androidx.media3:media3-exoplayer:1.X.X'
where 1.X.X
is the version, which must match the version of the other media
modules being used.
Alternatively, you can clone this GitHub project and depend on the module locally. Instructions for doing this can be found in the top level README.