Amazon Developer

as

Settings
Sign out
Notifications
Alexa
Amazon Appstore
Ring
AWS
Documentation
Support
Contact Us
My Cases
Get Started
Design and Develop
Publish
Reference
Support
Skip to main content
For additional information, see https://www.w3.org/TR/media-source-2/#sourcebuffer.

Extends

Properties

appendWindowEnd

appendWindowEnd: number Get or set the append window end position in seconds. For additional information, see https://www.w3.org/TR/media-source-2/#dom-sourcebuffer-appendwindowend.

appendWindowStart

appendWindowStart: number Get or Set the append window start position in seconds. For additional information, see https://www.w3.org/TR/media-source-2/#dom-sourcebuffer-appendwindowstart.

audioTracks

readonly audioTracks: AudioTrackList Gets the audio track list. For additional information, see https://www.w3.org/TR/media-source-2/#dom-sourcebuffer-audiotracks.

buffered

readonly buffered: TimeRanges Gets the Time ranges of the buffered media. For additional information, see https://www.w3.org/TR/media-source-2/#dom-sourcebuffer-buffered.

mode

mode: AppendMode Get or set the append mode. For additional information, see https://www.w3.org/TR/media-source-2/#dom-sourcebuffer-mode.

onabort

onabort: EventListener For additional information, see https://www.w3.org/TR/media-source-2/#dom-sourcebuffer-onabort

onerror

onerror: EventListener For additional information, see https://www.w3.org/TR/media-source-2/#dom-sourcebuffer-onerror

onupdate

onupdate: EventListener For additional information, see https://www.w3.org/TR/media-source-2/#dom-sourcebuffer-onupdate

onupdateend

onupdateend: EventListener For additional information, see https://www.w3.org/TR/media-source-2/#dom-sourcebuffer-onupdateend

onupdatestart

onupdatestart: EventListener For additional information, see https://www.w3.org/TR/media-source-2/#dom-sourcebuffer-onupdatestart

textTracks

readonly textTracks: TextTrackList Gets the text track list. For additional information, see https://www.w3.org/TR/media-source-2/#dom-sourcebuffer-texttracks.

timestampOffset

timestampOffset: number Get or set the timestamp offset to be applied to every coded frame. For additional information, see https://www.w3.org/TR/media-source-2/#dom-sourcebuffer-timestampoffset.

updating

readonly updating: boolean Checks if Source Buffer is upating track buffers. For additional information, see https://www.w3.org/TR/media-source-2/#dom-sourcebuffer-updating.

videoTracks

readonly videoTracks: VideoTrackList Gets the video track list. For additional information, see https://www.w3.org/TR/media-source-2/#dom-sourcebuffer-videotracks.

Methods

abort()

abort(): void Abort the source buffer operations. For additional information, see https://www.w3.org/TR/media-source-2/#dom-sourcebuffer-abort.

Returns

void

addEventListener()

addEventListener(type, listener, options?): void Adds an event listener.

Parameters

type
string The event to listen to.
listener
EventListener The Event Handler function.
options?
Ignore.

Returns

void

Inherited from

EventTarget.addEventListener

appendBuffer()

appendBuffer(data): void Append the media segment. For additional information, see https://www.w3.org/TR/media-source-2/#dom-sourcebuffer-appendbuffer.

Parameters

data

Returns

void

dispatchEvent()?

optional dispatchEvent(event): boolean Dispatches an event to the target

Parameters

event
Event The event which signals an occurrenceo.

Returns

boolean

TODO

Add and define in the implementations, keep it optional for now.

Inherited from

EventTarget.dispatchEvent

remove()

remove(start, end): void Remove the media samples from the internal track buffer queue between start and end timestamp positions. For additional information, see https://www.w3.org/TR/media-source-2/#dom-sourcebuffer-remove.

Parameters

start
number
end
number

Returns

void

removeEventListener()

removeEventListener(type, listener, options?): void Removes an event listener.

Parameters

type
string The event to listen to.
listener
EventListener The Event Handler function to be removed.
options?
Ignore.

Returns

void

Inherited from

EventTarget.removeEventListener
Last modified on February 25, 2026