muteLocalAudioStreamEx abstract method

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

Stops or resumes publishing the local audio stream.

After this method is called successfully, remote users receive the onUserMuteAudio and onRemoteAudioStateChanged callbacks. This method does not affect the audio capture status because it does not disable the audio capture device.

  • mute Whether to stop publishing the local audio stream. true : Stop publishing. false : (Default) Publish.
  • connection 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. See Error Codes for details and resolution suggestions.

Implementation

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