How to configure audio session when using WebRTC along with CallKit?
Asked Answered
U

0

8

I am very confused on how to configure Audio Session when using WebRTC along with CallKit. I referred to Speakerbox App but there was a separate AudioController used for configuring the Audio Session. When I have implemented this I was hearing my own voice. I somehow think that I need to configure the Audio Session using the RTCAudioSession instead AudioController used in the Speakerbox App.

If I am correct pls tell me how to configure Audio Session using RTCAudioSession and if not then how can I fix the issue of my own voice being heard.

I have wasted days and not getting anywhere on how to do this and also I was not able to find any tutorial of WebRTC and CallKit working together.

Ulita answered 6/9, 2017 at 5:45 Comment(9)
Hi Aakash did you found any solution ?Cankerous
Yes, webrtc now provides this feature in its framework.Ulita
Yeah thx its working mistake was at my end..Cankerous
Hi @Ulita could you point me to any doc that would should me how to configure RTCAudioSession? I'm having a hard time making it work properlyCraal
@PierrOz check out this answer https://mcmap.net/q/926779/-callkit-no-sound-when-i-use-webrtc, you may also look into 'RTCAudioSession.h' file to get hold of available properties and methods.Ulita
@Aakash, @ PierrOz, Do you have any working demo? It will be really helpful. Or can you share a details code snippet? The above URL is not helping me much.Mayoralty
@TanayMondal Don't have the demo, will try to create one as even till now there are no open source demo on GitHub for WebRTC along with CallKit. This one might help you github.com/stasel/WebRTC-iOS#callkit-integrationUlita
I have one weird issue. For the first time when the device is killed and locked, there is no audio issue, Everything works perfectly. But If I end the call from CallKit screen and again receive an incoming call, there is no audio in the call. Both parties can't hear anything, though didActivateAudioSession was called. I am stuck here. Any help will be very helpful.Mayoralty
@TanayMondal Can't figure what can be the cause for this. You can try to keep the app open both the devices and check is audio is heard on the second call, if yes then there is a issue with call kit else you need to check for audio session handling.Ulita

© 2022 - 2024 — McMap. All rights reserved.