1*30877f79SAndroid Build Coastguard Worker# MediaSession module
2*30877f79SAndroid Build Coastguard Worker
3*30877f79SAndroid Build Coastguard WorkerThe MediaSession module mediates between a `Player` and a [MediaSession][]. It
4*30877f79SAndroid Build Coastguard Workerautomatically retrieves and implements playback actions and syncs the player
5*30877f79SAndroid Build Coastguard Workerstate with the state of the media session. The behaviour can be extended to
6*30877f79SAndroid Build Coastguard Workersupport other playback and custom actions.
7*30877f79SAndroid Build Coastguard Worker
8*30877f79SAndroid Build Coastguard Worker[MediaSession]: https://developer.android.com/reference/android/support/v4/media/session/MediaSessionCompat.html
9*30877f79SAndroid Build Coastguard Worker
10*30877f79SAndroid Build Coastguard Worker## Getting the module
11*30877f79SAndroid Build Coastguard Worker
12*30877f79SAndroid Build Coastguard WorkerThe easiest way to get the module is to add it as a gradle dependency:
13*30877f79SAndroid Build Coastguard Worker
14*30877f79SAndroid Build Coastguard Worker```gradle
15*30877f79SAndroid Build Coastguard Workerimplementation 'com.google.android.exoplayer:extension-mediasession:2.X.X'
16*30877f79SAndroid Build Coastguard Worker```
17*30877f79SAndroid Build Coastguard Worker
18*30877f79SAndroid Build Coastguard Workerwhere `2.X.X` is the version, which must match the version of the other media
19*30877f79SAndroid Build Coastguard Workermodules being used.
20*30877f79SAndroid Build Coastguard Worker
21*30877f79SAndroid Build Coastguard WorkerAlternatively, you can clone this GitHub project and depend on the module
22*30877f79SAndroid Build Coastguard Workerlocally. Instructions for doing this can be found in the [top level README][].
23*30877f79SAndroid Build Coastguard Worker
24*30877f79SAndroid Build Coastguard Worker[top level README]: https://github.com/google/ExoPlayer/blob/release-v2/README.md
25*30877f79SAndroid Build Coastguard Worker
26*30877f79SAndroid Build Coastguard Worker## Links
27*30877f79SAndroid Build Coastguard Worker
28*30877f79SAndroid Build Coastguard Worker* [Javadoc][]: Classes matching
29*30877f79SAndroid Build Coastguard Worker  `com.google.android.exoplayer2.ext.mediasession.*` belong to this module.
30*30877f79SAndroid Build Coastguard Worker
31*30877f79SAndroid Build Coastguard Worker[Javadoc]: https://exoplayer.dev/doc/reference/index.html
32