A stream of media content. A stream consists of several tracks such as video or audio tracks. Each track is specified as an instance of MediaStreamTrack.

interface MediaStream {
    active: boolean;
    id: string;
    onaddtrack: ((this, ev) => any);
    onremovetrack: ((this, ev) => any);
    addEventListener<K>(type, listener, options?): void;
    addEventListener(type, listener, options?): void;
    addTrack(track): void;
    clone(): MediaStream;
    dispatchEvent(event): boolean;
    getAudioTracks(): MediaStreamTrack[];
    getTrackById(trackId): MediaStreamTrack;
    getTracks(): MediaStreamTrack[];
    getVideoTracks(): MediaStreamTrack[];
    removeEventListener<K>(type, listener, options?): void;
    removeEventListener(type, listener, options?): void;
    removeTrack(track): void;
}

Hierarchy

  • EventTarget
    • MediaStream

Properties

active: boolean
id: string
onaddtrack: ((this, ev) => any)

Type declaration

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

Type declaration

Methods

  • Type Parameters

    Parameters

    Returns void

  • Parameters

    Returns void

  • Parameters

    Returns void

  • Returns MediaStream

  • 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

    • event: Event

    Returns boolean

  • Parameters

    • trackId: string

    Returns MediaStreamTrack

  • Type Parameters

    Parameters

    Returns void

  • Parameters

    Returns void

  • Parameters

    Returns void

Generated using TypeDoc