setAudioProfile method
@detail api @author zhangyuanyuan.0101 @brief Sets the sound quality. Call this API to change the sound quality if the audio settings in the current ChannelProfile{@link #ChannelProfile} can not meet your requirements. @param audioProfile Sound quality. See AudioProfileType{@link #AudioProfileType} @return - 0: Success. - < 0 : Fail. See ReturnStatus{@link #ReturnStatus} for more details @note - This method can be called before and after entering the room. - Support dynamic switching of sound quality during a call.
Implementation
Future<int?> setAudioProfile(AudioProfileType audioProfile) async {
$a() => ($instance as $p_a.RTCEngine)
.setAudioProfile(t_AudioProfileType.code_to_android(audioProfile));
$i() => ($instance as $p_i.ByteRTCEngine)
.setAudioProfile(t_AudioProfileType.code_to_ios(audioProfile));
if (Platform.isAndroid) {
return $a();
} else if (Platform.isIOS) {
return $i();
} else {
throw UnsupportedError(
'Not Support Platform ${Platform.operatingSystem}');
}
}