getRangeAudio method
@detail api
@author luomingkang
@brief Gets the range audio instance of the game room.
@return API call result:
- IRangeAudio: Success. You will get an IRangeAudio{@link #IRangeAudio} returned from the SDK.
- null: Failure. The current SDK does not offer range audio function.
@note The first time this API is called must be between you create a room and you actually enter the room. Refer to Range Voice for more information.
Implementation
Future<IRangeAudio?> getRangeAudio() async {
$a() async => packObject(
await ($instance as $p_a.IGameRoom).getRangeAudio(),
() => IRangeAudio());
$i() async => packObject(
await ($instance as $p_i.ByteRTCGameRoom).getRangeAudio(),
() => IRangeAudio());
if (Platform.isAndroid) {
return $a();
} else if (Platform.isIOS) {
return $i();
} else {
throw UnsupportedError(
'Not Support Platform ${Platform.operatingSystem}');
}
}