getAudioRoute method
@detail api @author dixing @brief Get the information of currently-using playback route. @return See AudioRoute{@link #AudioRoute}. @note To set the audio playback route, see setAudioRoute{@link #RTCEngine#setAudioRoute}.
Implementation
Future<AudioRoute?> getAudioRoute() async {
$a() async {
final funcResult = await ($instance as $p_a.RTCEngine).getAudioRoute();
if (funcResult == null) {
throw StateError('Android getAudioRoute() cannot be null');
}
return t_AudioRoute.android_to_code(funcResult);
}
;
$i() async {
final funcResult =
await ($instance as $p_i.ByteRTCEngine).getAudioRoute();
if (funcResult == null) {
throw StateError('iOS getAudioRoute() cannot be null');
}
return t_AudioRoute.ios_to_code(funcResult);
}
;
if (Platform.isAndroid) {
return $a();
} else if (Platform.isIOS) {
return $i();
} else {
throw UnsupportedError(
'Not Support Platform ${Platform.operatingSystem}');
}
}