MediaSessionActionDetails.action

The action property is the only required property MediaSessionActionDetails dictionary, specifying the type of media session action which the action handler callback is being executed for.

Syntax

let mediaSessionActionDetails = { action: actionType };

let actionType = mediaSessionActionDetails.action;

Value

A DOMString specifying which of the action types the callback is being invoked for:

nexttrack
Advances playback to the next track.
pause
Pauses playback of the media.
play
Begins (or resumes) playback of the media.
previoustrack
Moves back to the previous track.
seekbackward
Seeks backward through the media from the current position.
seekforward
Seeks forward from the current position through the media.
seekto
Moves the playback position to the specified time within the media.
skipad
Skips past the currently playing advertisement or commercial. This action may or may not be available, depending on the platform and user agent, or may be disabled due to subscription level or other circumstances.
stop
Halts playback entirely.

Specifications

Specification Status Comment
Media Session Standard
The definition of 'MediaSessionActionDetails.action' in that specification.
Draft Initial definition.

Browser compatibility

No compatibility data found. Please contribute data for "api.MediaSessionActionDetails.action" (depth: 1) to the MDN compatibility data repository.

See also