enableLocalAudio abstract method

Future<void> enableLocalAudio(
  1. bool enabled
)

Enables/Disables the local audio capture. The audio function is enabled by default. This method disables or re-enables the local audio function to stop or restart local audio capturing. This method does not affect receiving or playing the remote audio streams, and enableLocalAudio (false) applies to scenarios where the user wants to receive remote audio streams without sending any audio stream to other users in the channel. Once the local audio function is disabled or re-enabled, the SDK triggers the localAudioStateChanged callback, which reports Stopped(0) or Recording(1). This method is different from the muteLocalAudioStream method: enableLocalVideo: Disables/Re-enables the local audio capturing and processing. If you disable or re-enable local audio capturing using the enableLocalAudio method, the local user might hear a pause in the remote audio playback. muteLocalAudioStream: Sends/Stops sending the local audio streams. You can call this method either before or after joining a channel.

Param enabled true: (Default) Re-enable the local audio function, that is, to start the local audio capturing device (for example, the microphone). false: Disable the local audio function, that is, to stop local audio capturing.

Implementation

Future<void> enableLocalAudio(bool enabled);