我们使用CallKit和PortSIP编写了CallKit应用程序,这里有一个问题仅在iOS 11.2.x上重现。当用户点击CallKit上的扬声器按钮时,屏幕系统启用扬声器,但图标仍处于禁用状态。如果用户再次点击,系统也会打开扬声器并忘记使用按钮。要禁用扬声器,用户应该点击两次按钮。有人见过这个虫子吗?你的解决方案是什么?
谢谢。
发布于 2017-12-31 08:59:09
以前的版本也遇到了同样的问题。所以这不是新的问题发生在呼叫工具包。
这个问题必须从iOS中解决。我们对此没有任何控制权。
发布于 2018-02-15 11:34:51
RTCDispatcher.dispatchAsync(on: RTCDispatcherQueueType.typeAudioSession) {
let audioSession = RTCAudioSession.sharedInstance()
audioSession.lockForConfiguration()
let configuration = RTCAudioSessionConfiguration.webRTC()
configuration.categoryOptions = [AVAudioSessionCategoryOptions.allowBluetoothA2DP,AVAudioSessionCategoryOptions.duckOthers,
AVAudioSessionCategoryOptions.allowBluetooth]
try? audioSession.setConfiguration(configuration)
audioSession.unlockForConfiguration()
}它帮助我做CallKit。扬声器按钮按预期工作。
https://stackoverflow.com/questions/48023629
复制相似问题