Typed Event Emitter class which can act as a Base Model for all our model and communication events. This makes it much easier for us to distinguish between events, as we now need to properly type this, so that our events are not stringly-based and prone to silly typos.

Hierarchy

Constructors

Properties

audioInput?: string
audioSettings?: AudioSettings
client: MatrixClient
localUserMediaStream?: MediaStream
screensharingStreams: MediaStream[] = []
userMediaStreams: MediaStream[] = []
videoInput?: string

Methods

  • Parameters

    • audio: boolean
    • video: boolean

    Returns MediaStreamConstraints

  • Returns

    based on passed parameters

    Parameters

    • audio: boolean

      should have an audio track

    • video: boolean

      should have a video track

    • reusable: boolean = true

      is allowed to be reused by the MediaHandler

    Returns Promise<MediaStream>

  • Parameters

    • audioInput: string
    • videoInput: string

    Returns void

  • Set an audio input device to use for MatrixCalls

    Parameters

    • deviceId: string

      the identifier for the device undefined treated as unset

    Returns Promise<void>

  • Set media input devices to use for MatrixCalls

    Parameters

    • audioInput: string

      the identifier for the audio device

    • videoInput: string

      the identifier for the video device undefined treated as unset

    Returns Promise<void>

  • Set a video input device to use for MatrixCalls

    Parameters

    • deviceId: string

      the identifier for the device undefined treated as unset

    Returns Promise<void>

  • Stops all tracks on the provided screensharing stream

    Parameters

    • mediaStream: MediaStream

    Returns void

  • Stops all tracks on the provided usermedia stream

    Parameters

    • mediaStream: MediaStream

    Returns void

Generated using TypeDoc