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

MediaSource

This Media Source Extensions API interface represents a source of media data for an HTMLMediaElement object. A MediaSource object can be attached to a HTMLMediaElement to be played in the user agent.

interface MediaSource extends EventTarget {
readonly activeSourceBuffers: SourceBufferList;
duration: number;
onsourceclose: ((this: MediaSource, ev: Event) => any) | null;
onsourceended: ((this: MediaSource, ev: Event) => any) | null;
onsourceopen: ((this: MediaSource, ev: Event) => any) | null;
readonly readyState: ReadyState;
readonly sourceBuffers: SourceBufferList;
addEventListener<K extends keyof MediaSourceEventMap>(
type: K,
listener: (this: MediaSource, ev: MediaSourceEventMap[K]) => any,
options?: boolean | AddEventListenerOptions,
): void;
addEventListener(
type: string,
options?: boolean | AddEventListenerOptions,
): void;
addSourceBuffer(type: string): SourceBuffer;
clearLiveSeekableRange(): void;
endOfStream(error?: EndOfStreamError): void;
removeEventListener<K extends keyof MediaSourceEventMap>(
type: K,
listener: (this: MediaSource, ev: MediaSourceEventMap[K]) => any,
options?: boolean | EventListenerOptions,
): void;
removeEventListener(
type: string,
options?: boolean | EventListenerOptions,
): void;
removeSourceBuffer(sourceBuffer: SourceBuffer): void;
setLiveSeekableRange(start: number, end: number): void;
}
var MediaSource: {
prototype: MediaSource;
new (): MediaSource;
isTypeSupported(type: string): boolean;
}
;

§Extends

§Properties

§
readonly activeSourceBuffers: SourceBufferList
[src]
§
duration: number
[src]
§
onsourceclose: ((this: MediaSource, ev: Event) => any) | null
[src]
§
onsourceended: ((this: MediaSource, ev: Event) => any) | null
[src]
§
onsourceopen: ((this: MediaSource, ev: Event) => any) | null
[src]
§
readonly readyState: ReadyState
[src]
§
readonly sourceBuffers: SourceBufferList
[src]

§Methods

§
addEventListener<K extends keyof MediaSourceEventMap>(
type: K,
listener: (this: MediaSource, ev: MediaSourceEventMap[K]) => any,
options?: boolean | AddEventListenerOptions,
): void
[src]
§
addEventListener(
type: string,
options?: boolean | AddEventListenerOptions,
): void
[src]
§
addSourceBuffer(type: string): SourceBuffer
[src]
§
clearLiveSeekableRange(): void
[src]
§
endOfStream(error?: EndOfStreamError): void
[src]
§
removeEventListener<K extends keyof MediaSourceEventMap>(
type: K,
listener: (this: MediaSource, ev: MediaSourceEventMap[K]) => any,
options?: boolean | EventListenerOptions,
): void
[src]
§
removeEventListener(
type: string,
options?: boolean | EventListenerOptions,
): void
[src]
§
removeSourceBuffer(sourceBuffer: SourceBuffer): void
[src]
§
setLiveSeekableRange(start: number, end: number): void
[src]