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.

Type parameters:

  • Events - List of all events emitted by this TypedEventEmitter. Normally an enum type.
  • Arguments - A ListenerMap type providing mappings from event names to listener types.
  • SuperclassArguments - TODO: not really sure. Alternative listener mappings, I think? But only honoured for .emit?

Hierarchy (View Summary)

Constructors

Properties

activeSpeaker?: CallFeed
activeSpeakerInterval: number = 1000
allowCallWithoutVideoAndAudio: boolean
groupCallId: string
isPtt: boolean
localCallFeed?: CallFeed
localDesktopCapturerSourceId?: string
localScreenshareFeed?: CallFeed
participantTimeout: number = ...
pttMaxTransmitTime: number = ...
retryCallInterval: number = 5000
room: Room
screenshareFeeds: CallFeed[] = []
userMediaFeeds: CallFeed[] = []

Accessors

  • get creationTs(): null | number
  • The timestamp at which the call was created, or null if it has not yet been created.

    Returns null | number

  • set creationTs(value: null | number): void
  • Parameters

    • value: null | number

    Returns void

  • get enteredViaAnotherSession(): boolean
  • Whether the local device has entered this call via another session, such as a widget.

    Returns boolean

  • set enteredViaAnotherSession(value: boolean): void
  • Parameters

    • value: boolean

    Returns void

Methods

  • Cleans up our member state by filtering out logged out devices, inactive devices, and our own device (if we know we haven't entered).

    Returns Promise<void>

  • Sets the mute state of the local participants's video.

    Parameters

    • muted: boolean

      Whether to mute the video

    Returns Promise<boolean>

    Whether muting/unmuting was successful

  • Sets the mute state of the local participants's microphone.

    Parameters

    • muted: boolean

      Whether to mute the microphone

    Returns Promise<boolean>

    Whether muting/unmuting was successful