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.
let mediaSessionActionDetails = { action: actionType };
let actionType = mediaSessionActionDetails.action;
A
DOMString
specifying which of the action types the callback is being invoked for:
nexttrack
Advances playback to the next track.
pause
暂停媒体回放。
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
stop
Halts playback entirely.
| 规范 | 状态 | 注释 |
|---|---|---|
|
Media Session Standard
The definition of 'MediaSessionActionDetails.action' in that specification. |
草案 | 初始定义。 |
No compatibility data found. Please contribute data for "api.MediaSessionActionDetails.action" (depth: 1) to the MDN 兼容性数据存储库 .
MediaSession
方法
setActionHandler()
MediaSessionActionDetails
action
fastSeek
seekOffset
seekTime