SourceBuffer.timestampOffset

Limited availability

This feature is not Baseline because it does not work in some of the most widely-used browsers.

实验性: 这是一项实验性技术
在将其用于生产之前,请仔细检查浏览器兼容性表格

SourceBuffer 接口的 timestampOffset 属性控制应用于随后附加到 SourceBuffer 的媒体片段内的时间戳偏移量。

timestampOffset 的初始值是 0。

一个双精度浮点数,偏移量以秒为单位。

异常

为该属性设置新值时可能会引发以下异常:

InvalidStateError DOMException

如果 SourceBuffer 对象正在更新(即它的 SourceBuffer.updating 属性当前为 true)、当前正在解析 SourceBuffer 内的媒体片段或者此 SourceBuffer 已经从 MediaSource 移除。

示例

待定

规范

Specification
Media Source Extensions™
# dom-sourcebuffer-timestampoffset

浏览器兼容性

Report problems with this compatibility data on GitHub
desktopmobile
Chrome
Edge
Firefox
Opera
Safari
Chrome Android
Firefox for Android
Opera Android
Safari on iOS
Samsung Internet
WebView Android
WebView on iOS
timestampOffset
Available in workers
Experimental

Legend

Tip: you can click/tap on a cell for more information.

Full support
Full support
Partial support
Partial support
No support
No support
Experimental. Expect behavior to change in the future.

参见