enableAudioAEDReport method

Future<int?> enableAudioAEDReport(
  1. int interval
)

@hidden 3.60 for internal use only @detail api @author gengjunjie @brief Enables AED detection. After that, you will receive onAudioAEDStateUpdate{@link #IRTCEngineEventHandler#onAudioAEDStateUpdate}. @param interval Callback interval, in milliseconds.
+ <= 0: Disable AED detection. + [100, 3000]: Enable AED detection and set the callback interval to this value. It is recommended to set it to 2000. + Invalid interval value: If the value is less than 100, it is set to 100. If the value is greater than 3000, it is set to 3000. @return + 0: Success. + <0: Fail. See ReturnStatus{@link #ReturnStatus} for more details.

Implementation

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

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