MediaSource
The MediaSource
interface of the Media Source Extensions API represents a source of media data for an HTMLMediaElement object.
Properties
The activeSourceBuffers
read-only property of the MediaSource interface returns a SourceBufferList object containing a subset of the SourceBuffer objects contained within MediaSource.sourceBuffers — the list of objects providing the selected video track, enabled audio tracks, and shown/hidden text tracks.
The readyState
read-only property of the MediaSource interface returns an enum representing the state of the current MediaSource
.
The sourceBuffers
read-only property of the MediaSource interface returns a SourceBufferList object containing the list of SourceBuffer objects associated with this MediaSource
.
Functions
The addSourceBuffer()
method of the MediaSource interface creates a new SourceBuffer of the given MIME type and adds it to the MediaSource
's MediaSource.sourceBuffers list.
The clearLiveSeekableRange()
method of the MediaSource interface clears a seekable range previously set with a call to MediaSource.setLiveSeekableRange().
The endOfStream()
method of the MediaSource interface signals the end of the stream.
The removeSourceBuffer()
method of the MediaSource interface removes the given SourceBuffer from the SourceBufferList associated with this MediaSource
object.
The setLiveSeekableRange()
method of the MediaSource interface sets the range that the user can seek to in the media element.