使用 CallKit 框架音频不会路由到扬声器 当我从设置应用程序断开蓝牙连接时。 以下代码用于设置 AVaudioSessions。
do {
try AVAudioSession.sharedInstance().setCategory(AVAudioSession.Category.playAndRecord, mode: AVAudioSession.Mode.videoChat, options: [.defaultToSpeaker, .mixWithOthers, .allowBluetoothA2DP, .allowBluetooth, .allowAirPlay])
try AVAudioSession.sharedInstance().setActive(true)
} catch { }
我想要以下行为