Abnormal behavior of speaker button on system prov

2019-04-09 05:18发布

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.

2条回答
2楼-- · 2019-04-09 06:10

The same issue has been experienced in the previous versions as well. So this is not the new issue happening on the call kit.

This issue has to be resolved from iOS. We don't have any control over this.

查看更多
Explosion°爆炸
3楼-- · 2019-04-09 06:10
    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.

查看更多
登录 后发表回答