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

SourceBufferImpl

This class implements SourceBuffer interface. It uses EventEmitter to emit events

Extends

  • EventAttributes

Implements

Constructors

new SourceBufferImpl()

new SourceBufferImpl(mediaElement, mediaSource, sourceBufferId, type): SourceBufferImpl

Parameters

mediaElement

NativeInterfaces.NativeMediaElement | null

mediaSource

MediaSource

sourceBufferId

string

type

string

Returns

SourceBufferImpl

Methods

abort()

abort(): void


addEventListener()

addEventListener(type: string, listener: EventListener, options?: boolean | AddEventListenerOptions | undefined): void

Parameters

type

string

listener

EventListener

options?

boolean | AddEventListenerOptions | undefined


appendBuffer()

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

Parameters

data

ArrayBuffer | Uint8Array<ArrayBufferLike>


changeType()

changeType(type: string): void

Parameters

type

string


checkforValidNumber()

checkforValidNumber(value: number): boolean

Parameters

value

number

Returns

boolean


getId()

getId(): string

Returns

string


handleEvent()

handleEvent(event: NativeInterfaces.NativeMediaElementEvent): void

Parameters

event

NativeInterfaces.NativeMediaElementEvent


remove()

remove(start: number, end: number): void

Parameters

start

number

end

number


removeEventListener()

removeEventListener(type: string, listener: EventListener, options?: boolean | EventListenerOptions | undefined): void

Parameters

type

string

listener

EventListener

options?

boolean | EventListenerOptions | undefined


Last updated: Jul 31, 2026