Browse Source

上传

weicu
liwei1dao 1 year ago
parent
commit
ce2b43c174
  1. 6
      local_plugins/classic_bluetooth/ios/classic_bluetooth/Sources/classic_bluetooth/ClassicBluetoothHelper.swift

6
local_plugins/classic_bluetooth/ios/classic_bluetooth/Sources/classic_bluetooth/ClassicBluetoothHelper.swift

@ -65,16 +65,16 @@ public class ClassicBluetoothHelper: NSObject, CBCentralManagerDelegate {
case .stateChanged: case .stateChanged:
if let state = data["state"] as? String { if let state = data["state"] as? String {
print("蓝牙状态变化: \(state)") print("蓝牙状态变化: \(state)")
configureAudioRouteBasedOnBluetoothState() // configureAudioRouteBasedOnBluetoothState()
} }
case .deviceConnected: case .deviceConnected:
print("蓝牙设备已连接") print("蓝牙设备已连接")
// 蓝牙设备连接时:末端在手机,输出端在耳机 // 蓝牙设备连接时:末端在手机,输出端在耳机
configureAudioForBluetoothConnected() // configureAudioForBluetoothConnected()
case .deviceDisconnected: case .deviceDisconnected:
print("蓝牙设备已断开") print("蓝牙设备已断开")
// 蓝牙设备断开时:末端和输出端都在手机 // 蓝牙设备断开时:末端和输出端都在手机
configureAudioForBluetoothDisconnected() /*configureAudioForBluetoothDisconnected*/()
} }
} }

Loading…
Cancel
Save