Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

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,
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,
options?: boolean | EventListenerOptions,
): void;
}
var SourceBuffer: {
prototype: SourceBuffer;
new (): SourceBuffer;
}
;

§Extends

§Properties

§
appendWindowEnd: number
[src]
§
appendWindowStart: number
[src]
§
readonly buffered: TimeRanges
[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]
§
timestampOffset: number
[src]
§
readonly updating: boolean
[src]

§Methods

§
abort(): void
[src]
§
addEventListener<K extends keyof SourceBufferEventMap>(
type: K,
listener: (this: SourceBuffer, ev: SourceBufferEventMap[K]) => any,
options?: boolean | AddEventListenerOptions,
): void
[src]
§
addEventListener(
type: string,
options?: boolean | AddEventListenerOptions,
): void
[src]
§
appendBuffer(data: BufferSource): void
[src]
§
changeType(type: string): void
[src]
§
remove(start: number, end: number): void
[src]
§
removeEventListener<K extends keyof SourceBufferEventMap>(
type: K,
listener: (this: SourceBuffer, ev: SourceBufferEventMap[K]) => any,
options?: boolean | EventListenerOptions,
): void
[src]
§
removeEventListener(
type: string,
options?: boolean | EventListenerOptions,
): void
[src]