muteRemoteAudio method

  1. @override
void muteRemoteAudio(
  1. String userId,
  2. bool mute
)
override

Pause/Resume playing back remote audio stream

When you mute the remote audio of a specified user, the SDK will stop playing back the user's audio and pulling the user's audio data.

Parameters:

  • mute(bool):
    • true: mute;
    • false: unmute.
  • userId(String):
    • ID of the specified remote user.

Note: This API works when called either before or after room entry (enterRoom), and the mute status will be reset to false after room exit (exitRoom).

Implementation

@override
void muteRemoteAudio(String userId, bool mute) {
  TRTCLog(_tag, "muteRemoteAudio: $userId mute: $mute");
  TRTCCloudNative.instance.muteRemoteAudio(userId, mute);
}