SourceBuffer

The SourceBuffer interface represents a chunk of media to be passed into an HTMLMediaElement and played, via a MediaSource object.

MDN Reference

Properties

Link copied to clipboard

The appendWindowEnd property of the timestamp range that can be used to filter what media data is appended to the SourceBuffer.

Link copied to clipboard

The appendWindowStart property of the timestamp range that can be used to filter what media data is appended to the SourceBuffer.

Link copied to clipboard

The buffered read-only property of the buffered in the SourceBuffer as a normalized TimeRanges object.

Link copied to clipboard

The mode property of the SourceBuffer interface controls whether media segments can be appended to the SourceBuffer in any order, or in a strict sequence.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

The timestampOffset property of the media segments that are appended to the SourceBuffer.

Link copied to clipboard

The updating read-only property of the currently being updated — i.e., whether an SourceBuffer.appendBuffer() or SourceBuffer.remove() operation is currently in progress.

Functions

Link copied to clipboard
fun abort()

The abort() method of the SourceBuffer interface aborts the current segment and resets the segment parser.

Link copied to clipboard

The appendBuffer() method of the to the SourceBuffer.

Link copied to clipboard
fun changeType(type: String)

The changeType() method of the data to conform to.

Link copied to clipboard
Link copied to clipboard
fun remove(start: Double, end: Double)

The remove() method of the SourceBuffer interface removes media segments within a specific time range from the SourceBuffer.

Link copied to clipboard