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
Skips past the currently playing advertisement or commercial. This action may or may not be available, depending on the platform and 用户代理 , or may be disabled due to subscription level or other circumstances.
stop

Halts playback entirely.

规范

规范 状态 注释
Media Session Standard
The definition of 'MediaSessionActionDetails.action' in that specification.
草案 初始定义。

浏览器兼容性

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 兼容性数据存储库 .

另请参阅

元数据

  • 最后修改: