MediaSource

The MediaSource interface of the Media Source Extensions API represents a source of media data for an HTMLMediaElement object.

MDN Reference

Constructors

Link copied to clipboard
constructor()

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

The activeSourceBuffers read-only property of the containing a subset of the SourceBuffer objects contained within providing the selected video track, enabled audio tracks, and shown/hidden text tracks.

Link copied to clipboard

The duration property of the MediaSource interface gets and sets the duration of the current media being presented.

Link copied to clipboard

The readyState read-only property of the current MediaSource.

Link copied to clipboard

The sourceBuffers read-only property of the containing the list of SourceBuffer objects associated with this MediaSource.

Functions

Link copied to clipboard

The addSourceBuffer() method of the given MIME type and adds it to the MediaSource's SourceBuffer is also returned.

Link copied to clipboard

The clearLiveSeekableRange() method of the to MediaSource.setLiveSeekableRange().

Link copied to clipboard
Link copied to clipboard
fun endOfStream(error: EndOfStreamError = definedExternally)

The endOfStream() method of the ``js-nolint endOfStream() endOfStream(endOfStreamError) `` - endOfStreamError MISSING: optional_inline] - : A string representing an error to throw when the end of the stream is reached.

Link copied to clipboard
fun removeSourceBuffer(sourceBuffer: SourceBuffer)

The removeSourceBuffer() method of the MediaSource interface removes the given SourceBuffer from the SourceBufferList associated with this MediaSource object.

Link copied to clipboard

The setLiveSeekableRange() method of the media element.

Link copied to clipboard