Interface MediaSession
interface MediaSession {
metadata: MediaMetadata;
playbackState: MediaSessionPlaybackState;
setActionHandler(
action: MediaSessionAction,
handler: MediaSessionActionHandler,
): void;
setPositionState(state?: MediaPositionState): void;
}
metadata: MediaMetadata;
playbackState: MediaSessionPlaybackState;
setActionHandler(
action: MediaSessionAction,
handler: MediaSessionActionHandler,
): void;
setPositionState(state?: MediaPositionState): void;
}
Index
Properties
Methods
Methods
setActionHandler
- setActionHandler(
action: MediaSessionAction,
handler: MediaSessionActionHandler,
): void Parameters
- action: MediaSessionAction
- handler: MediaSessionActionHandler
Returns void
setPositionState
- setPositionState(state?: MediaPositionState): void
Parameters
Optional
state: MediaPositionState
Returns void
MDN Reference