enableAudioPropertiesReport method

Future<int?> enableAudioPropertiesReport(
  1. AudioPropertiesConfig config
)

@detail api @author wangjunzheng @brief Enable audio information prompts. After that, you will receive onLocalAudioPropertiesReport{@link #IRTCEngineEventHandler#onLocalAudioPropertiesReport}, onRemoteAudioPropertiesReport{@link #IRTCEngineEventHandler#onRemoteAudioPropertiesReport}, and onActiveSpeaker{@link #IRTCEngineEventHandler#onActiveSpeaker}. @param config See AudioPropertiesConfig{@link #AudioPropertiesConfig} @return - 0: Success. - < 0 : Fail. See ReturnStatus{@link #ReturnStatus} for more details

Implementation

Future<int?> enableAudioPropertiesReport(AudioPropertiesConfig config) async {
  $a() => ($instance as $p_a.RTCEngine).enableAudioPropertiesReport(
      unpackObject<$p_a.AudioPropertiesConfig>(config));
  $i() => ($instance as $p_i.ByteRTCEngine).enableAudioPropertiesReport(
      unpackObject<$p_i.ByteRTCAudioPropertiesConfig>(config));

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