setBluetoothMode method

FutureOr<int> setBluetoothMode(
  1. ByteRTCBluetoothMode mode
)

@hidden(macOS) @detail api @author dixing @brief On iOS, you can change the Bluetooth profile when the media volume is set in all scenarios. @param mode The Bluetooth profiles. See ByteRTCBluetoothMode{@link #ByteRTCBluetoothMode}. @return - 0: Success. - < 0 : Fail. See ByteRTCReturnStatus{@link #ByteRTCReturnStatus} for more details @note You will receive rtcEngine:onAudioDeviceWarning:deviceType:deviceWarning:{@link #ByteRTCEngineDelegate#rtcEngine:onAudioDeviceWarning:deviceType:deviceWarning} in the following scenarios: 1) You cannot change the Bluetooth profile to HFP.;2) The media volume is not set in all scenarios. We suggest that you call setAudioScenario:{@link #ByteRTCEngine#setAudioScenario} to set the media volume scenario before calling this API.

Implementation

FutureOr<int> setBluetoothMode(ByteRTCBluetoothMode mode) async {
  return await nativeCall('setBluetoothMode:', [mode.$value]);
}