Options
All
  • Public
  • Public/Protected
  • All
Menu

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.

Hierarchy

Index

Properties

EventTarget

EventTarget: { constructor: any; prototype: EventTarget }

Type declaration

Readonly activeSourceBuffers

activeSourceBuffers: SourceBufferList

duration

duration: number

onsourceclose

onsourceclose: ((this: MediaSource, ev: Event) => any) | null

onsourceended

onsourceended: ((this: MediaSource, ev: Event) => any) | null

onsourceopen

onsourceopen: ((this: MediaSource, ev: Event) => any) | null

Readonly readyState

readyState: ReadyState

Readonly sourceBuffers

sourceBuffers: SourceBufferList

Methods

addEventListener

addSourceBuffer

  • Parameters

    • type: string

    Returns SourceBuffer

clearLiveSeekableRange

  • clearLiveSeekableRange(): void
  • Returns void

dispatchEvent

  • dispatchEvent(event: Event): boolean
  • 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.

    Parameters

    Returns boolean

endOfStream

  • Parameters

    Returns void

removeEventListener

removeSourceBuffer

  • Parameters

    Returns void

setLiveSeekableRange

  • setLiveSeekableRange(start: number, end: number): void
  • Parameters

    • start: number
    • end: number

    Returns void

Generated using TypeDoc