iOS Audio not working during call answered when phone is locked. WebRTC used for calling

后端 未结 2 1964
忘了有多久
忘了有多久 2021-01-13 17:47

I am facing a problem with Audio When using Callkit with WebRTC for VOIP call, While answering the call from Lock Screen.

General Functionality :

相关标签:
2条回答
  • 2021-01-13 18:48

    I am able to resolve this issue.

    Steps that I followed -

    • I checked the code related to WebRTC here

    • I added RTCAudioSession header file which is actually a private class of Webrtc. So every time I receive a call event from signaling, I enable RTCAudiosession and on end of the call, I disable it.

    • I have to render the incoming streams to a dummy view (Although it is not displayed when the call is going and the app is not yet open, but it is required to make audio working).

    I hope this will help if someone is facing the same issue.

    0 讨论(0)
  • 2021-01-13 18:53

    @abhimanyu are you still facing the issue or you made it work. I am facing same issue with CallKit.

    As per my understanding in WebRTC M60 release they have fixed on issue related to CallKit, which I think created a side effect and caused this issue.

    The issue which they have fixed is related to System AudioSession, when ever CallKit presents incoming call UI and play ringer tone CallKit takes control of AudioSession and after user action (accept/ decline) it releases control. In WebRTC M60 release, now they have added observers for this control exchange. That's why it is working if app is in foreground, but if phone is locked and any incoming call is accepted then (I am assuming you are using CallKit UI for call and not redirecting user to App on accept from lock screen) due to Native UI of call it is not possible for WebRTC to activate its own AudioSession instance as call is going through CallKit Screen.

    Link for bug which has been fixed on WebRTC M60: https://bugs.chromium.org/p/webrtc/issues/detail?id=7446

    If you found any workaround for this issue please let me know.

    0 讨论(0)
提交回复
热议问题