muteLocalAudioStreamEx abstract method

Future<void> muteLocalAudioStreamEx({
  1. required bool mute,
  2. required RtcConnection connection,
})

Stops or resumes publishing the local audio stream.

This method does not affect any ongoing audio recording, because it does not disable the audio capture device. A successful call of this method triggers the onUserMuteAudio and onRemoteAudioStateChanged callbacks on the remote client.

  • mute Whether to stop publishing the local audio stream: true : Stops publishing the local audio stream. false : (Default) Resumes publishing the local audio stream.
  • connection The connection information. See RtcConnection.

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.

Implementation

Future<void> muteLocalAudioStreamEx(
    {required bool mute, required RtcConnection connection});