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:
Specifications
Browser compatibility
Desktop | Mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
Chrome | Edge | Firefox | Internet Explorer | Opera | Safari | WebView Android | Chrome Android | Firefox for Android | Opera Android | Safari on IOS | Samsung Internet | |
action |
73 |
79 |
82
71
|
No |
No |
No |
No |
57 |
82
Firefox exposes the API, but does not provide a corresponding user-facing media control interface.
|
No |
No |
7.0 |
See also
- Media Session API
- Refer to the
MediaSession
methodsetActionHandler()
© 2005–2021 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/MediaSessionActionDetails/action