We write VoIP application using CallKit and PortSIP and here is a problem is reproduced only on iOS 11.2.x. When user taps speaker button on CallKit provided screen system enables speaker but icon remains in disabled state. If user taps again system also turns speaker on and forgets about button. To disable speaker user should tap button twice. Has anybody met this bug? And what was your solution? (:
Thanks.
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()
}
It helps me for CallKit. Speaker button works as expected.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With