getCurrentAudioDevice method

Future<ZegoDeviceInfo> getCurrentAudioDevice(
  1. ZegoAudioDeviceType deviceType
)

Get the audio device information currently in use.

Available since: 2.12.0 Description: Get the audio device information currently in use. Use cases: Used for scenes that need to manually switch between multiple audio devices. When to call: Called this function after calling startPublishingStream or startPreview. Restrictions: Only supports Windows and macOS. Related APIs: The default audio device ID can be obtained through getDefaultAudioDeviceID.

  • deviceType Audio device type.Required:Yes.
  • Returns Audio device information.

Implementation

Future<ZegoDeviceInfo> getCurrentAudioDevice(
    ZegoAudioDeviceType deviceType) async {
  return await ZegoExpressImpl.instance.getCurrentAudioDevice(deviceType);
}