MediaPositionState - Web APIs 编辑
The Media Session API's MediaPositionState
dictionary is used to represent the current playback position of a media session. Its contents can be used by the user agent to provide a user interface displaying information about the playback position and duration of the media currently being performed.
Properties
duration
- A floating-point value giving the total duration of the current media in seconds. This should always be a positive number, with positive infinity (
Infinity
) indicating media without a defined end, such as a live stream. playbackRate
- A floating-point value indicating the rate at which the media is being played, as a ratio relative to its normal playback speed. Thus, a value of 1 is playing at normal speed, 2 is playing at double speed, and so forth. Negative values indicate that the media is playing in reverse; -1 indicates playback at the normal speed but backward, -2 is double speed in reverse, and so on.
position
- A floating-point value indicating the last reported playback position of the media in seconds. This must always be a positive value.
Specifications
Specification | Status | Comment |
---|---|---|
Media Session Standard The definition of 'MediaPositionState' in that specification. | Draft | Initial definition. |
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论