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

Hierarchy

Properties

activeSourceBuffers: SourceBufferList
duration: number
onsourceclose: ((this, ev) => any)

Type declaration

onsourceended: ((this, ev) => any)

Type declaration

onsourceopen: ((this, ev) => any)

Type declaration

readyState: ReadyState
sourceBuffers: SourceBufferList

Methods

  • 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

    • start: number
    • end: number

    Returns void