muteAudioCapture method
@valid since 3.58.1
@detail api
@author shiyayun
@brief Set whether to mute the recording signal (without changing the local hardware).
@param mute Whether to mute audio capture.
- True: Mute (disable microphone)
- False: (Default) Enable microphone
@return
- 0: Success.
- < 0 : Failure. See ReturnStatus{@link #ReturnStatus} for more details.
@note
- Calling this API does not affect the status of SDK audio stream publishing.
- 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?> muteAudioCapture({required bool mute}) async {
$a() => ($instance as $p_a.RTCEngine).muteAudioCapture(mute);
$i() => ($instance as $p_i.ByteRTCEngine).muteAudioCapture(mute);
if (Platform.isAndroid) {
return $a();
} else if (Platform.isIOS) {
return $i();
} else {
throw UnsupportedError(
'Not Support Platform ${Platform.operatingSystem}');
}
}