muteLocalAudioStream method

  1. @override
Future<void> muteLocalAudioStream(
  1. bool muted
)

Stops/Resumes sending the local audio stream.

A successful RtcEngine.muteLocalAudioStream method call triggers the RtcEngineEventHandler.userMuteAudio callback on the remote client.

Note

  • When muted is set as true, this method does not disable the microphone and thus does not affect any ongoing recording.
  • If you call RtcEngine.setChannelProfile after this method, the SDK resets whether or not to mute the local audio according to the channel profile and user role. Therefore, we recommend calling this method after the RtcEngine.setChannelProfile method.

Parameter muted Sets whether to send/stop sending the local audio stream:

  • true: Stop sending the local audio stream.
  • false: (Default) Send the local audio stream.

Implementation

@override
Future<void> muteLocalAudioStream(bool muted) {
  return _invokeMethod('muteLocalAudioStream', {
    'muted': muted,
  });
}