MediaSession extension type

The MediaSession interface of the Media Session API 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.

For example, a smartphone might have a standard panel in its lock screen that provides controls for media playback and information display. A browser on the device can use MediaSession to make browser playback controllable from that standard/global user interface.

on
Implemented types

Properties

hashCode int
The hash code for this object.
no setterinherited
metadata MediaMetadata?
getter/setter pair
playbackState MediaSessionPlaybackState
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
setActionHandler(MediaSessionAction action, MediaSessionActionHandler? handler) → void
The setActionHandler() method of the MediaSession interface sets a handler for a media session action. These actions let a web app receive notifications when the user engages a device's built-in physical or onscreen media controls, such as play, stop, or seek buttons.
setCameraActive(bool active) → void
The setCameraActive() method of the MediaSession interface is used to indicate to the user agent whether the user's camera is considered to be active.
setMicrophoneActive(bool active) → void
The setMicrophoneActive() method of the MediaSession interface is used to indicate to the user agent whether the user's microphone is considered to be currently muted.
setPositionState([MediaPositionState state]) → void
The setPositionState() method of the MediaSession interface is used to update the current document's media playback position and speed for presentation by user's device in any kind of interface that provides details about ongoing media. This can be particularly useful if your code implements a player for type of media not directly supported by the browser.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited