createAndroidMediaSession

Builds a MediaSession over the same ExoPlayer used by createAndroidPlayer.


fun createAndroidMediaSession(context: Context, exoPlayer: ExoPlayer, player: Player, scope: CoroutineScope): MediaSession

Builds a MediaSession whose system next/previous commands control the common queue. The host supplies a service-owned scope and remains responsible for releasing the session.