enableAudio abstract method

Future<void> enableAudio()

Enables the audio module.

The audio module is enabled by default. If you have called disableAudio to disable the audio module, you can call this method to re-enable it. Calling this method resets the entire engine and has a relatively slow response time. You can use the following methods to control specific audio module features based on your needs: enableLocalAudio : Whether to enable microphone capture and create a local audio stream. muteLocalAudioStream : Whether to publish the local audio stream. muteRemoteAudioStream : Whether to receive and play the remote audio stream. muteAllRemoteAudioStreams : Whether to receive and play all remote audio streams. When calling this method in a channel, it resets the settings of enableLocalAudio, muteRemoteAudioStream, and muteAllRemoteAudioStreams. Use with caution.

Returns When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown. You need to catch the exception and handle it accordingly. See Error Codes for details and resolution suggestions.

Implementation

Future<void> enableAudio();