MediaSessionService

Advertises media playback for a Player instance, through a MediaSession, by displaying media controls on the lock screen and in the notification area.

Constructors

Link copied to clipboard
constructor()

Functions

Link copied to clipboard
fun addSession(session: MediaSession)
Link copied to clipboard
Link copied to clipboard
override fun onGetSession(controllerInfo: MediaSession.ControllerInfo): MediaSession?

abstract fun onGetSession(controllerInfo: ControllerInfo): MediaSession?

Needs to be overridden to provide a MediaSession instance. MediaSession instances have to be created using either the MediaSession factory method or MediaSessionBuilder.

Link copied to clipboard