SourceBufferList

草案
此页面不完整。

这是 实验性技术
检查 浏览器兼容性表格 在生产中使用这之前。

SourceBufferList interface represents a simple container list for multiple SourceBuffer 对象。

The source buffer list containing the SourceBuffer s appended to a particular MediaSource can be retrieved using the MediaSource.sourceBuffers property. The individual source buffers can be accessed using array operator (i.e. [] ) or functions such as forEach() 例如。

特性

SourceBufferList.length 只读
Returns the number of SourceBuffer objects in the list.

事件处理程序

SourceBufferList.onaddsourcebuffer
The event handler for the addsourcebuffer 事件。
SourceBufferList.onremovesourcebuffer
The event handler for the removesourcebuffer 事件。

方法

Inherits methods from its parent interface, EventTarget .

SourceBufferList : indexed property getter
This getter allows the SourceBuffer objects in the list to be accessed with an array operator (i.e. [] .)

范例

TBD.

规范

规范 状态 Comment
媒体源扩展
The definition of 'SourceBufferList' in that specification.
Recommendation 初始定义。

浏览器兼容性

更新 GitHub 上的兼容性数据
Desktop Mobile
Chrome Edge Firefox Internet Explorer Opera Safari Android webview Chrome for Android Firefox for Android Opera for Android Safari on iOS Samsung Internet
SourceBufferList
Chrome 31
31
23 — 31
Prefixed
Prefixed Implemented with the vendor prefix: WebKit
Edge 12 Firefox 42
42
25 — 42
注意事项 Disabled
Limited support to an allowed list of sites, for example YouTube, Netflix, and other popular streaming sites. The limitation was removed when Media Source Extensions was enabled by default in Firefox 42.
Disabled From version 25 until version 42 (exclusive): this feature is behind the media.mediasource.enabled preference. To change preferences in Firefox, visit about:config.
IE 11
注意事项
11
注意事项
Only works on Windows 8+.
Opera 15 Safari 8 WebView Android 4.4.3 Chrome Android 33 Firefox Android 不支持 No Opera Android 14 Safari iOS 不支持 No Samsung Internet Android 3.0
SourceBuffer
Chrome 45 Edge 12 Firefox 42
42
25 — 42
注意事项 Disabled
Limited support to an allowed list of sites, for example YouTube, Netflix, and other popular streaming sites. The limitation was removed when Media Source Extensions was enabled by default in Firefox 42.
Disabled From version 25 until version 42 (exclusive): this feature is behind the media.mediasource.enabled preference. To change preferences in Firefox, visit about:config.
IE 11
注意事项
11
注意事项
Only works on Windows 8+.
Opera 32 Safari 8 WebView Android 45 Chrome Android 45 Firefox Android 不支持 No Opera Android 32 Safari iOS 不支持 No Samsung Internet Android 5.0
length
Chrome 23 Edge 12 Firefox 42
42
25 — 42
注意事项 Disabled
Limited support to an allowed list of sites, for example YouTube, Netflix, and other popular streaming sites. The limitation was removed when Media Source Extensions was enabled by default in Firefox 42.
Disabled From version 25 until version 42 (exclusive): this feature is behind the media.mediasource.enabled preference. To change preferences in Firefox, visit about:config.
IE 11
注意事项
11
注意事项
Only works on Windows 8+.
Opera 15 Safari 8 WebView Android 4.4.3 Chrome Android 33 Firefox Android 不支持 No Opera Android 14 Safari iOS 不支持 No Samsung Internet Android 3.0
onaddsourcebuffer
Chrome 53 Edge 17 Firefox 42
42
25 — 42
注意事项 Disabled
Limited support to an allowed list of sites, for example YouTube, Netflix, and other popular streaming sites. The limitation was removed when Media Source Extensions was enabled by default in Firefox 42.
Disabled From version 25 until version 42 (exclusive): this feature is behind the media.mediasource.enabled preference. To change preferences in Firefox, visit about:config.
IE 11
注意事项
11
注意事项
Only works on Windows 8+.
Opera 40 Safari 8 WebView Android 53 Chrome Android 53 Firefox Android 不支持 No Opera Android 41 Safari iOS 不支持 No Samsung Internet Android 6.0
onremovesourcebuffer
Chrome 53 Edge 17 Firefox 42
42
25 — 42
注意事项 Disabled
Limited support to an allowed list of sites, for example YouTube, Netflix, and other popular streaming sites. The limitation was removed when Media Source Extensions was enabled by default in Firefox 42.
Disabled From version 25 until version 42 (exclusive): this feature is behind the media.mediasource.enabled preference. To change preferences in Firefox, visit about:config.
IE 11
注意事项
11
注意事项
Only works on Windows 8+.
Opera 40 Safari 8 WebView Android 53 Chrome Android 53 Firefox Android 不支持 No Opera Android 41 Safari iOS 不支持 No Samsung Internet Android 6.0

图例

完整支持
完整支持
不支持
不支持
实验。期望将来行为有所改变。
实验。期望将来行为有所改变。
见实现注意事项。
用户必须明确启用此特征。
用户必须明确启用此特征。
要求使用供应商前缀或不同名称。
要求使用供应商前缀或不同名称。

另请参阅