Limited availability
Note: This feature is available in Dedicated Web Workers.
The removeSourceBuffer()
method of the MediaSource
interface removes the given SourceBuffer
from the SourceBufferList
associated with this MediaSource
object.
removeSourceBuffer(sourceBuffer)
Parameters
sourceBuffer
The SourceBuffer
object to be removed.
None (undefined
).
NotFoundError
DOMException
Thrown if the supplied sourceBuffer doesn't exist in MediaSource.sourceBuffers
.
for (let i = 0; i < 10; i++) {
const sourceBuffer = mediaSource.addSourceBuffer(mimeCodec);
}
mediaSource.removeSourceBuffer(mediaSource.sourceBuffers[0]);
Specifications Browser compatibility See also
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4