Media3 ExoPlayer

A media player is an app-level component that allows playback of video and audio files. Such files can be stored locally or streamed over the Internet. Jetpack Media3 provides a Player interface that defines basic functionality such as the ability to play, pause, seek, and display track information.

ExoPlayer is the default implementation of this interface in Media3. Compared to Android's MediaPlayer API, it adds additional conveniences such as support for multiple streaming protocols, default audio and video renderers, and components that handle media buffering. ExoPlayer is easy to customize and extend, and can be updated through Play Store application updates.

While there are several third-party players to choose from, ExoPlayer has been brought into Media3 as the recommended player because its implementations provide a comprehensive set of features that cover most playback use cases. If your app uses ExoPlayer, you also don't need to implement low-level playback controls.

ExoPlayer and Media3 ExoPlayer

For the time being, ExoPlayer currently exists simultaneously as a standalone library and a module within Media3. Over time, the standalone library will be deprecated in favour of the Media3 implementation.

It is important to note that the Media3 implementation of ExoPlayer is identical to the existing independent ExoPlayer, aside from the new package name. See the table below for some examples:

Media3 (androidx.media3) ExoPlayer (com.google.android.exoplayer2)
:media3-exoplayer :exoplayer-core
:media3-ui :exoplayer-ui
:media3-cast :extension-cast