onAudioDeviceStateChanged method

void onAudioDeviceStateChanged(
  1. ZegoUpdateType updateType,
  2. ZegoAudioDeviceType deviceType,
  3. ZegoDeviceInfo deviceInfo
)

The callback triggered when there is a change to audio devices (i.e. new device added or existing device deleted).

Only supports desktop. This callback is triggered when an audio device is added or removed from the system. By listening to this callback, users can update the sound collection or output using a specific device when necessary.

  • updateType Update type (add/delete)
  • deviceType Audio device type
  • deviceInfo Audio device information

Implementation

void onAudioDeviceStateChanged(
  ZegoUpdateType updateType,
  ZegoAudioDeviceType deviceType,
  ZegoDeviceInfo deviceInfo,
) {}