Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface MediaStream

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.

Hierarchy

Index

Properties

EventTarget

EventTarget: { constructor: any; prototype: EventTarget }

Type declaration

Readonly active

active: boolean

Readonly id

id: string

onaddtrack

onaddtrack: ((this: MediaStream, ev: MediaStreamTrackEvent) => any) | null

onremovetrack

onremovetrack: ((this: MediaStream, ev: MediaStreamTrackEvent) => any) | null

Methods

addEventListener

addTrack

  • Parameters

    Returns void

clone

  • Returns MediaStream

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

getAudioTracks

  • Returns MediaStreamTrack[]

getTrackById

  • Parameters

    • trackId: string

    Returns MediaStreamTrack | null

getTracks

  • Returns MediaStreamTrack[]

getVideoTracks

  • Returns MediaStreamTrack[]

removeEventListener

removeTrack

  • Parameters

    Returns void

Generated using TypeDoc