Options
All
  • Public
  • Public/Protected
  • All
Menu

Class PeerStream

Hierarchy

Index

Properties

Readonly active

active: boolean

Readonly id

id: string

onaddtrack

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

onremovetrack

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

peerId

peerId: string = ""

Static MediaStream

MediaStream: { constructor: any; prototype: MediaStream }

Type declaration

Methods

addEventListener

  • addEventListener<K>(type: K, listener: (this: MediaStream, ev: MediaStreamEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void
  • addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void
  • Type parameters

    • K: keyof MediaStreamEventMap

    Parameters

    • type: K
    • listener: (this: MediaStream, ev: MediaStreamEventMap[K]) => any
        • Parameters

          Returns any

    • Optional options: boolean | AddEventListenerOptions

    Returns void

  • Parameters

    • type: string
    • listener: EventListenerOrEventListenerObject
    • Optional options: boolean | AddEventListenerOptions

    Returns void

addTrack

  • addTrack(track: MediaStreamTrack): void
  • Parameters

    • track: MediaStreamTrack

    Returns void

clone

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

    • event: Event

    Returns boolean

getAudioTracks

  • getAudioTracks(): MediaStreamTrack[]
  • Returns MediaStreamTrack[]

getTrackById

  • getTrackById(trackId: string): MediaStreamTrack | null
  • Parameters

    • trackId: string

    Returns MediaStreamTrack | null

getTracks

  • getTracks(): MediaStreamTrack[]
  • Returns MediaStreamTrack[]

getVideoTracks

  • getVideoTracks(): MediaStreamTrack[]
  • Returns MediaStreamTrack[]

removeEventListener

  • removeEventListener<K>(type: K, listener: (this: MediaStream, ev: MediaStreamEventMap[K]) => any, options?: boolean | EventListenerOptions): void
  • removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void
  • Type parameters

    • K: keyof MediaStreamEventMap

    Parameters

    • type: K
    • listener: (this: MediaStream, ev: MediaStreamEventMap[K]) => any
        • Parameters

          Returns any

    • Optional options: boolean | EventListenerOptions

    Returns void

  • Parameters

    • type: string
    • listener: EventListenerOrEventListenerObject
    • Optional options: boolean | EventListenerOptions

    Returns void

removeTrack

  • removeTrack(track: MediaStreamTrack): void
  • Parameters

    • track: MediaStreamTrack

    Returns void

Generated using TypeDoc