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

SourceBuffer

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

Extends

Properties

mode

mode: AppendMode

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


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.


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.


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.


audioTracks

readonly audioTracks: AudioTrackList

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


videoTracks

readonly videoTracks: VideoTrackList

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


textTracks

readonly textTracks: TextTrackList

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


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.


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.


onupdatestart

onupdatestart: EventListener

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


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


onerror

onerror: EventListener

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


onabort

onabort: EventListener

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

Methods

appendBuffer()

appendBuffer(data: ArrayBuffer | Uint8Array<ArrayBufferLike>): void

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

Parameters

data

ArrayBuffer | Uint8Array<ArrayBufferLike>


abort()

abort(): void

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


changeType()

changeType(type: string): void

Change the mime type of the source buffer.

https://www.w3.org/TR/media-source-2/#dom-sourcebuffer-changetype

Parameters

type

string


remove()

remove(start: number, end: number): 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


Last updated: Jul 22, 2026