interface MediaSource
implements EventTarget
import { type MediaSource } from "https://deno.land/x/evt@v2.5.2/lib/types/lib.dom.ts";
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.
Properties
readonly
activeSourceBuffers: SourceBufferListonsourceclose: ((this: MediaSource, ev: Event) => any) | null
onsourceended: ((this: MediaSource, ev: Event) => any) | null
onsourceopen: ((this: MediaSource, ev: Event) => any) | null
readonly
readyState: ReadyStatereadonly
sourceBuffers: SourceBufferListMethods
addSourceBuffer(type: string): SourceBuffer
endOfStream(error?: EndOfStreamError): void
removeSourceBuffer(sourceBuffer: SourceBuffer): void
addEventListener<K extends keyof MediaSourceEventMap>(): void
type: K,
listener: (this: MediaSource, ev: MediaSourceEventMap[K]) => any,
options?: boolean | AddEventListenerOptions,
addEventListener(): void
type: string,
listener: EventListenerOrEventListenerObject,
options?: boolean | AddEventListenerOptions,
removeEventListener<K extends keyof MediaSourceEventMap>(): void
type: K,
listener: (this: MediaSource, ev: MediaSourceEventMap[K]) => any,
options?: boolean | EventListenerOptions,