ios_setBluetoothMode method
@platform ios @hidden(macOS) @detail api @author dixing @brief 在纯媒体音频场景下,切换 iOS 设备与耳机之间的蓝牙传输协议。 @param mode 蓝牙传输协议。详见 ByteRTCBluetoothMode{@link #ByteRTCBluetoothMode}。 @return - 0: 调用成功。 - < 0 : 调用失败。查看 ByteRTCReturnStatus{@link #ByteRTCReturnStatus} 获得更多错误说明 @note 以下场景你会收到 rtcEngine:onAudioDeviceWarning:deviceType:deviceWarning:{@link #ByteRTCEngineDelegate#rtcEngine:onAudioDeviceWarning:deviceType:deviceWarning} 回调:1)当前不支持设置 HFP;2)非纯媒体音频场景,建议在调用此接口前调用 setAudioScenario:{@link #ByteRTCEngine#setAudioScenario} 设置纯媒体音频场景。
Implementation
Future<int?> ios_setBluetoothMode($p_i.ByteRTCBluetoothMode mode) async {
$() => ($instance as $p_i.ByteRTCEngine).setBluetoothMode(mode);
if (Platform.isIOS) {
return $();
} else {
throw UnsupportedError(
'Not Support Platform ${Platform.operatingSystem}');
}
}