iOS Audio not working during call answered when phone is locked. WebRTC used for calling -
i facing problem audio when using callkit webrtc voip call, while answering call lock screen.
general functionality :
my app activates audiosession when it's launched. incoming call, sdp offer & answer generated , exchanged. peer connection set up. both audio , video streams generated, whether it's audio call or video call. call reported callkit using following code:
callprovider.reportnewincomingcall(with: currentcalluuid!, update: update) { error in }
if app in foreground, works fine.
but, when phone locked, , user answers call lock screen, streams exchanged no audio comes on either end until user enters app himself.
as user enters app, audio becomes active on both ends.
all background settings , capabilities set properly.
i have referred following work around provided apple staff. not work.
https://forums.developer.apple.com/thread/64544
as mentioned, using webrtc calling. if exchange media streams after user answers call( still on lock screen) , peer connection set @ time. works fine (but adds delay in making call connection).
but if peer connection made before displaying call (say before reporting call callkit), audio stops working.
i able resolve issue.
steps followed -
i checked code related webrtc here
i added rtcaudiosession header file private class of webrtc. every time receive call event signaling, enable rtcaudiosession , on end of call, disable it.
i have render incoming streams dummy view (although not displayed when call going , app not yet open, required make audio working).
i hope if facing same issue.
Comments
Post a Comment