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:
nexttrackpauseplayprevioustrackseekbackwardseekforwardseektoskipadstopSpecifications
| Specification | Status | Comment |
|---|---|---|
| Media Session Standard The definition of 'MediaSessionActionDetails.action' in that specification. |
Draft | Initial definition. |
Browser compatibility
The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
No compatibility data found. Please contribute data for "api.MediaSessionActionDetails.action" (depth: 1) to the MDN compatibility data repository.
See also
- Media Session API
- Refer to the
MediaSessionmethodsetActionHandler()
