enableAudioDecoding method

Future enableAudioDecoding(
  1. bool enable
)

@hidden for internal use only @region 自定义音频采集渲染 @brief 是否使用sdk音频解码功能。 @param enable 是否使用sdk音频解码功能。 true: 打开音频解码功能(默认) false: 关闭音频解码功能直接转推。 @note - 在registerRemoteEncodedAudioFrameObserver之前调用。

Implementation

Future enableAudioDecoding(bool enable) async {
  $a() => ($instance as $p_a.RTCEngine).enableAudioDecoding(enable);
  $i() => ($instance as $p_i.ByteRTCEngine).enableAudioDecoding(enable);

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