muteScreenAudioCapture method

Future<int?> muteScreenAudioCapture(
  1. bool mute
)

@valid since 3.60. @detail api @author shiyayun @brief Mutes/unmutes the audio captured when screen sharing.
Calling this method will send muted data instead of the screen audio data, and it does not affect the local audio device capture status and the SDK audio stream publishing status. @param mute Whether to mute the audio capture when screen sharing.
- True: Mute the audio capture when screen sharing.
- False: (Default) Unmute the audio capture when screen sharing. @return - 0: Success. - < 0 : Failure. See ReturnStatus{@link #ReturnStatus} for more details. @note - Adjusting the volume by calling setCaptureVolume{@link #RTCEngine#setCaptureVolume} after muting will not cancel the mute state. The volume state will be retained until unmuted. - You can use this interface to set the capture volume before or after calling startAudioCapture{@link #RTCEngine#startAudioCapture} to enable audio capture.

Implementation

Future<int?> muteScreenAudioCapture(bool mute) async {
  $a() => ($instance as $p_a.RTCEngine).muteScreenAudioCapture(mute);
  $i() => ($instance as $p_i.ByteRTCEngine).muteScreenAudioCapture(mute);

  if (Platform.isAndroid) {
    return $a();
  } else if (Platform.isIOS) {
    return $i();
  } else {
    throw UnsupportedError(
        'Not Support Platform ${Platform.operatingSystem}');
  }
}