MediaSessionService
abstract class MediaSessionService : 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
| MediaSessionService | constructor() |
Functions
| Name | Summary |
|---|---|
| addSession | fun addSession(session: MediaSession) |
| isSessionAdded | fun isSessionAdded(session: MediaSession): Boolean |
| onGetSession | 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. |
| removeSession | fun removeSession(session: MediaSession) |