enableMicrophone abstract method

Future<void> enableMicrophone(
  1. bool enable
)

Turn the microphone on or off.

Available since: 2.11.0 Description: When enable is true, turn on the microphone and push audio stream; when it is false, turn off the microphone and stop pushing audio stream. Use case: The user turns on or off the microphone to communicate in the room. Default value: When this function is not called, the microphone is turned off by default. When to call: After initializing the range audio createRangeAudio and login room loginRoom. Caution: Turning on the microphone will automatically use the main channel to push the audio stream. Related callbacks: Get the microphone switch state change through the callback onRangeAudioMicrophoneStateUpdate.

  • enable Whether to turn on the microphone.

Implementation

Future<void> enableMicrophone(bool enable);