setAudioSelectionConfig method

Future<int?> setAudioSelectionConfig(
  1. AudioSelectionPriority audioSelectionPriority
)

@valid since 3.52 @detail api @author yejing.luna @brief Set the priority of the local audio stream to be published. @param audioSelectionPriority The priority of the local audio stream which defaults to be subscribable only up to the result of the Audio Selection. Refer to AudioSelectionPriority{@link #AudioSelectionPriority}. @note You must enable Audio Selection in the RTC console before using this API. You can call this API whether the user has joined a room. Refer to Audio Selection.
The setting is independent in each room that the user joins.

Implementation

Future<int?> setAudioSelectionConfig(
    AudioSelectionPriority audioSelectionPriority) async {
  $a() => ($instance as $p_a.RTCRoom).setAudioSelectionConfig(
      t_AudioSelectionPriority.code_to_android(audioSelectionPriority));
  $i() => ($instance as $p_i.ByteRTCRoom).setAudioSelectionConfig(
      t_AudioSelectionPriority.code_to_ios(audioSelectionPriority));

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