js/media_session_web library

The interface to the Media Session API, navigator.mediaSession.

Useful links:

Classes

MediaSession
The interface to the Media Session API which allows a web page to provide custom behaviors for standard media playback interactions, and to report metadata that can be sent by the user agent to the device or operating system for presentation in standardized user interface elements.
MediaSessionActionDetails
Specifies the type of action which needs to be performed as well as the data needed to perform the action.
MediaSessionActions
Actions that the user may perform in a media session.
MediaSessionPlaybackState
Media session playback state types.
MediaSessionPositionState
A representation of the current playback.

Typedefs

MediaSessionActionHandler = dynamic Function(MediaSessionActionDetails)
A callback signature for the MediaSession.setActionHandler.