enableAudioCaptureDevice method

Future<void> enableAudioCaptureDevice(
  1. bool enable
)

Enables or disables the audio capture device.

Available since: 1.1.0 Description: This function is used to control whether to use the audio collection device. When the audio collection device is turned off, the SDK will no longer occupy the audio device. Of course, if the stream is being published at this time, by default, mute data will be used as audio data for streaming. Use cases: When the user never needs to use the audio, you can call this function to close the audio collection. Default value: The default is true. When to call: After creating the engine createEngine. Restrictions: None. Related APIs: Turning off or turning on the microphone on the hardware is a time-consuming operation, and there is a certain performance overhead when the user performs frequent operations. muteMicrophone is generally recommended.

  • enable Whether to enable the audio capture device, true: enable audio capture device, false: disable audio capture device.

Implementation

Future<void> enableAudioCaptureDevice(bool enable) async {
  return await ZegoExpressImpl.instance.enableAudioCaptureDevice(enable);
}