SourceBuffer.remove()
Limited availability
This feature is not Baseline because it does not work in some of the most widely-used browsers.
SourceBuffer
接口的 remove()
方法从 SourceBuffer
中移除指定时间范围的媒体片段。该方法仅能在 SourceBuffer.updating
为 false
时调用。如果 SourceBuffer.updating
不等于 false
,请调用 SourceBuffer.abort()
。
语法
js
remove(start, end)
参数
返回值
无(undefined
)。
异常
InvalidAccessError
DOMException
-
如果
MediaSource.duration
属性为NaN
、start
参数是负数或者大于MediaSource.duration
,或者end
参数小于或等于start
或等于NaN
,则抛出异常。 InvalidStateError
DOMException
-
如果
SourceBuffer.updating
属性等于true
,或者这个SourceBuffer
已经从MediaSource
移除,则抛出异常。
示例
待定
规范
Specification |
---|
Media Source Extensions™ # dom-sourcebuffer-remove |
浏览器兼容性
Report problems with this compatibility data on GitHubdesktop | mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
remove | ||||||||||||
Available in workers |
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.
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.