setAudioDeviceMode method
- ZegoAudioDeviceMode deviceMode
Set the audio device mode.
Available since: 2.22.0 Description: Select audio equipment mode according to the need of the scene (only supported by Android and iOS). Use cases: In the case of KTV, the General mode must be used, but in the language room, the Communication2 or Communication3 mode is required in order to avoid the sound of third-party music being collected. For details on how to set the audio device mode, see https://doc-zh.zego.im/faq/AudioDeviceMod?product=ExpressVideo&platform=macos When to call: After creating the engine createEngine. Caution: This interface triggers startup switchover of the device. You are advised not to invoke this interface frequently to avoid unnecessary overhead and hardware problems. This interface may cause the volume mode to switch between call and media. If the media volume is inconsistent with the call volume, the volume may change.
deviceMode
Audio device mode
Implementation
Future<void> setAudioDeviceMode(ZegoAudioDeviceMode deviceMode) async {
return await ZegoExpressImpl.instance.setAudioDeviceMode(deviceMode);
}