setBluetoothMode method
Set bluetooth mode, only available on iOS.
Implementation
Future<int?> setBluetoothMode(BluetoothMode mode) async {
var $modeMap = {
BluetoothMode.hfp: $i.ByteRTCBluetoothMode.hfp,
BluetoothMode.a2dp: $i.ByteRTCBluetoothMode.a2dp,
BluetoothMode.auto: $i.ByteRTCBluetoothMode.auto,
};
if (!($modeMap.containsKey(mode))) {
throw Exception("setBluetoothMode not support:" + mode.toString());
}
if (Platform.isIOS) {
return ($instance as $i.ByteRTCEngine).setBluetoothMode($modeMap[mode]!);
} else {
throw UnsupportedError(
'Not Support Platform ${Platform.operatingSystem}',
);
}
}