Ali Aqdas
Ali Aqdas

Reputation: 445

WebRTC audio is not working in lock screen using CallKit

I have tried many solutions from here but no one is working. WebRTC is working fine and I get connected status when accepting the call while the device is locked and after the unlock the audio opens and video starts. How could I get only audio when the screen remains locked?

I have enabled RTCAudioSession and disabled it when the call stops.

It's working fine when the device is unlocked the first time and when I lock it back I'm getting the audio. But the first time, when I answer the call from CallKit, it is not working. It only starts working after the device is unlocked.

Upvotes: 3

Views: 697

Answers (1)

Ashraf Sabry
Ashraf Sabry

Reputation: 3182

I don't know the cause of your specific problem, but what I learnt from similar issue while integrating CallKit with WebRTC, you must acquire camera and microphone access only inside the DidActivateAudioSession method of your implementation of the CXProviderDelegate class. Otherwise, you will get weird issues.

Upvotes: 0

Related Questions