SourceBuffer
A chunk of media to be passed into an HTMLMediaElement and played, via a MediaSource object. This can be made up of one or several media segments.
interface SourceBuffer extends EventTarget {
appendWindowEnd: number;
appendWindowStart: number;
readonly buffered: TimeRanges;
mode: AppendMode;
onabort: ((this: SourceBuffer, ev: Event) => any) | null;
onerror: ((this: SourceBuffer, ev: Event) => any) | null;
onupdate: ((this: SourceBuffer, ev: Event) => any) | null;
onupdateend: ((this: SourceBuffer, ev: Event) => any) | null;
onupdatestart: ((this: SourceBuffer, ev: Event) => any) | null;
timestampOffset: number;
readonly updating: boolean;
abort(): void;
addEventListener<K extends keyof SourceBufferEventMap>(
type: K,
listener: (this: SourceBuffer, ev: SourceBufferEventMap[K]) => any,
options?: boolean | AddEventListenerOptions,
): void;addEventListener(
type: string,
listener: EventListenerOrEventListenerObject,
options?: boolean | AddEventListenerOptions,
): void;appendBuffer(data: BufferSource): void;
changeType(type: string): void;
remove(start: number, end: number): void;
removeEventListener<K extends keyof SourceBufferEventMap>(
type: K,
listener: (this: SourceBuffer, ev: SourceBufferEventMap[K]) => any,
options?: boolean | EventListenerOptions,
): void;removeEventListener(
}type: string,
listener: EventListenerOrEventListenerObject,
options?: boolean | EventListenerOptions,
): void;var SourceBuffer: {
prototype: SourceBuffer;
new (): SourceBuffer;
};§Extends
§Properties
§
readonly buffered: TimeRanges
[src]§
mode: AppendMode
[src]§
onabort: ((this: SourceBuffer, ev: Event) => any) | null
[src]§
onerror: ((this: SourceBuffer, ev: Event) => any) | null
[src]§
onupdate: ((this: SourceBuffer, ev: Event) => any) | null
[src]§
onupdateend: ((this: SourceBuffer, ev: Event) => any) | null
[src]§
onupdatestart: ((this: SourceBuffer, ev: Event) => any) | null
[src]§Methods
§
addEventListener<K extends keyof SourceBufferEventMap>(
[src]type: K,
listener: (this: SourceBuffer, ev: SourceBufferEventMap[K]) => any,
options?: boolean | AddEventListenerOptions,
): void§
addEventListener(
[src]type: string,
listener: EventListenerOrEventListenerObject,
options?: boolean | AddEventListenerOptions,
): void§
appendBuffer(data: BufferSource): void
[src]§
removeEventListener<K extends keyof SourceBufferEventMap>(
[src]type: K,
listener: (this: SourceBuffer, ev: SourceBufferEventMap[K]) => any,
options?: boolean | EventListenerOptions,
): void§
removeEventListener(
[src]type: string,
listener: EventListenerOrEventListenerObject,
options?: boolean | EventListenerOptions,
): void