Class DefaultDeviceController

When you are done using a DeviceController, you should perform some cleanup steps in order to avoid memory leaks:

  1. Call DeviceController.destroy to stop all active audio and video inputs.
  2. Remove any device change observers that you registered by using DeviceControllerFacade.removeDeviceChangeObserver.
  3. Drop your reference to the controller to allow it to be garbage collected.

Implements

Constructors

Properties

eventController?: EventController

EventController for publishing events.

Methods

  • Returns the Web Audio AudioContext used by the DefaultDeviceController. The AudioContext is created lazily the first time this function is called.

    This function will not attempt to recreate a stopped context, or resume a suspended one.

    Returns AudioContext

    a Web Audio AudioContext

  • Overrides the default latency hint used by the user agent when creating the AudioContext. By default, user agents will choose "interactive" which opts for the smallest possible audio buffer. This can cause choppy audio in some cases on Windows. Therefore, "playback" will be chosen on Windows unless this value is overridden with this function.

    Parameters

    • OptionallatencyHint: number | AudioContextLatencyCategory

      The latency hint to be used when creating the Web Audio AudioContext

    Returns void

  • Calls suspend on reusable audio context. This is useful if you want an application to power down the audio hardware when it will not be using an audio context for a while (i.e. if you have an application that isn't always running a Chime SDK meeting). This is preferrable to calling [[closeAudioContext]]

    Returns Promise<void>