Interface DeviceChangeObserver

[[DeviceChangeObserver]] can be registered with a [[DeviceController]] to receive callbacks on device change events.

interface DeviceChangeObserver {
    audioInputMuteStateChanged(
        device: string | MediaStream,
        muteState: boolean,
    ): void;
    audioInputsChanged(freshAudioInputDeviceList?: MediaDeviceInfo[]): void;
    audioInputStreamEnded(deviceId?: string): void;
    audioOutputsChanged(freshAudioOutputDeviceList?: MediaDeviceInfo[]): void;
    videoInputsChanged(freshVideoInputDeviceList?: MediaDeviceInfo[]): void;
    videoInputStreamEnded(deviceId?: string): void;
}

Methods

  • Called when the selected input device is indicated by the browser to be muted or unmuted at the operating system or hardware level, and thus the SDK will be unable to send audio regardless of the application's own mute state.

    This method will always be called after a device is selected or when the mute state changes after selection.

    If the selected input device is a MediaStream, it will be passed here as the value of device. Otherwise, the selected device ID will be provided.

    Parameters

    • device: string | MediaStream

      the currently selected audio input device.

    • muteState: boolean

      whether the input device is known to be muted.

    Returns void