rohks e74584e6a0 Switch incorrectly configured native multidex to legacy
Native multidex can only be used for binaries with minSdkVersion of 21 or higher, but minSdkVersion was specified to 16.

PiperOrigin-RevId: 470003836
(cherry picked from commit 142d1c062c4ed4fba450465588217ae5506fece3)
2022-08-25 16:07:42 +00:00
..

Media2 module

The Media2 module provides builders for SessionPlayer and MediaSession.SessionCallback in the Media2 library.

Compared to MediaSessionConnector that uses MediaSessionCompat, this provides finer grained control for incoming calls, so you can selectively allow/reject commands per controller.

Getting the module

The easiest way to get the module is to add it as a gradle dependency:

implementation 'com.google.android.exoplayer:extension-media2:2.X.X'

where 2.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.

Using the module

Using SessionPlayerConnector

SessionPlayerConnector is a SessionPlayer implementation wrapping a given Player. You can use a SessionPlayer instance to build a MediaSession, or to set the player associated with a VideoView or MediaControlView

Using SessionCallbackBuilder

SessionCallbackBuilder lets you build a MediaSession.SessionCallback instance given its collaborators. You can use a MediaSession.SessionCallback to build a MediaSession.

  • Javadoc: Classes matching com.google.android.exoplayer2.ext.media2.* belong to this module.