Class ManagedStream

This class provides access to media control functions during a call This class must never be directly instantiated

Constructors

Properties

local: boolean
mediaStream: MediaStream

Provides access to the underlying WebRTC MediaStream object

mediaTypes: Readonly<MediaTypes>

Methods

  • Provides access to the audio tracks of the managed stream

    Returns MediaStreamTrack[]

  • Provides access to all the tracks of the managed stream

    Returns MediaStreamTrack[]

  • Provides access to the video tracks of the managed stream

    Returns MediaStreamTrack[]

  • Allows to know if the managed stream has audio tracks

    Returns boolean

    A boolean value indicating if the managed stream has at least one audio track

  • Allows to know if the managed stream has video tracks

    Returns boolean

    A boolean value indicating if the managed stream has at least one video track

  • Indicates if this managed stream is local. This means that its sources are local devices of this machine and that it was obtained of a getUserMedia call and not from a RTCPeerConnection

    Returns boolean

  • Indicates if this managed stream is remote. This means that its sources are not local devices of this machine and that it was obtained from a RTCPeerConnection and not from a getUserMedia call

    Returns boolean

  • Mutes or unmutes audio tracks of this stream

    Parameters

    • mute: boolean = !this.isAudioMuted()

      If true disables audio tracks, if false enables them If not argument is provided it toggles the mute state on audio tracks

    Returns void

  • Mutes or unmutes video tracks of this stream

    Parameters

    • mute: boolean = !this.isVideoMuted()

      If true disables video tracks, if false enables them If not argument is provided it toggles the mute state on video tracks

    Returns void

  • Allows taking captures of the video tracks of this stream

    Returns Promise<Blob[]>

    A promise containing an array of Blobs with a capture of the video. One Blob for each video track of this stream