
Currently, DrmSessionManager takes player specific values (= the playback looper) through (pre)acquireSession calls and requires the caller to pass in the same values every time. Instead, we can configure the DrmSessionManager for playback with a player once before it's being used. We can't simply extend the prepare() method as prepare may be called before the player is created to prewarm the DrmSessionManager. The new method also takes a PlayerId which is bound to the lifetime of the player similar to the playback looper. To avoid breakage of custom MediaSources with DRM, we can keep the old the SampleQueue.createWithDrm method as deprecated. PiperOrigin-RevId: 410998240
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.