onHardwareEchoDetectionResult method

FutureOr<void> onHardwareEchoDetectionResult(
  1. dynamic hardwareEchoDetectionResult
)
override

@detail callback @brief Callback that notifies you the result of the echo detection before a call @param hardwareEchoDetectionResult Refer to HardwareEchoDetectionResult{@link #HardwareEchoDetectionResult} for more details. @note - This callback notifies you the result of the echo detection by calling startHardwareEchoDetection{@link #RTCEngine#startHardwareEchoDetection}. - We recommend to call stopHardwareEchoDetection{@link #RTCEngine#stopHardwareEchoDetection} to stop the detection. - Listen to MEDIA_DEVICE_WARNING_DETECT_LEAK_ECHO in the callback of onAudioDeviceWarning{@link #IRTCEngineEventHandler#onAudioDeviceWarning} for the echo issue during a call.

Implementation

FutureOr<void> onHardwareEchoDetectionResult(
    dynamic hardwareEchoDetectionResult) async {
  if ($instance == null || $instance is! IRTCEngineEventHandler) {
    return;
  }
  return ($instance as IRTCEngineEventHandler)
      .onHardwareEchoDetectionResult
      ?.call(t_HardwareEchoDetectionResult.android_to_code(
          $p_a.HardwareEchoDetectionResult.values.firstWhere((t) =>
              t.$value == hardwareEchoDetectionResult ||
              t.name == hardwareEchoDetectionResult)));
}