Interface 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.

MDN Reference

interface MediaSource {
    $destroyListeners?: any[];
    activeSourceBuffers: SourceBufferList;
    duration: number;
    onsourceclose: Object;
    onsourceended: Object;
    onsourceopen: Object;
    readyState: ReadyState;
    sourceBuffers: SourceBufferList;
    addEventListener<K>(type, listener, options?): void;
    addEventListener(type, listener, options?): void;
    addSourceBuffer(type): SourceBuffer;
    clearLiveSeekableRange(): void;
    dispatchEvent(event): boolean;
    endOfStream(error?): void;
    removeEventListener<K>(type, listener, options?): void;
    removeEventListener(type, listener, options?): void;
    removeSourceBuffer(sourceBuffer): void;
    setLiveSeekableRange(start, end): void;
}

Hierarchy

Properties

$destroyListeners?: any[]
activeSourceBuffers: SourceBufferList
duration: number
onsourceclose: Object
onsourceended: Object
onsourceopen: Object
readyState: ReadyState
sourceBuffers: SourceBufferList

Methods

  • Type Parameters

    Parameters

    Returns void

  • Parameters

    Returns void

  • Returns void

  • Dispatches a synthetic event event to target and returns true if either event's cancelable attribute value is false or its preventDefault() method was not invoked, and false otherwise.

    MDN Reference

    Parameters

    Returns boolean

  • Parameters

    Returns void

  • Type Parameters

    Parameters

    Returns void

  • Parameters

    Returns void

  • Parameters

    Returns void

  • Parameters

    • start: number
    • end: number

    Returns void