MediaSession class
Experimental: This is an experimental technologyCheck the Browser compatibility table carefully before using this in production. The 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 to make browser playback controllable from that standard/global user interface.
- Available extensions
- Annotations
-
- @JS()
- @staticInterop
Constructors
- MediaSession()
-
factory
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- metadata ↔ MediaMetadata?
-
Available on MediaSession, provided by the PropsMediaSession extension
getter/setter pair - playbackState ↔ MediaSessionPlaybackState
-
Available on MediaSession, provided by the PropsMediaSession extension
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 -
Available on MediaSession, provided by the PropsMediaSession extension
-
setCameraActive(
bool active) → void -
Available on MediaSession, provided by the PropsMediaSession extension
-
setMicrophoneActive(
bool active) → void -
Available on MediaSession, provided by the PropsMediaSession extension
-
setPositionState(
[MediaPositionState? state]) → void -
Available on MediaSession, provided by the PropsMediaSession extension
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited