Bayram
Bayram

Reputation: 515

React Native Audio Routing VoxImplant nad CallKeep

In my project I have a WebRTC based Calling system.

But I'm having hard times with audio routing before/in the call. I want to make a device select menu. Like Whatsapp, a list of connected audio outputs from the device, and you can switch between them.

At the beginning i was using InCallManager which is a sub project of webrtc. But i was not enough to achieve what I want.

After that i switched to react-native-callkeep which is also sub repo of webrtc. But this one is a bit advanced module.

Anyways, The problem with calkeep was, It was working fine on IOS but on Android it was not. Since I was only using 2 methods from it, getAudioRoutes and setAudioRoute, these 2 things were enough to achieve what I want. But somehow it was not working on Android, i deeply investigated this, and find out that, in the native code it requires to setup CallKeep by running RNCallKeep.setup function.There is something called VoiceConnection and it should not be null, but in my case it was null in Android, on the IOS side in the other hand, there is no such requirement. However you can use both get and set audio routes on IOS side without doing anything. In Android you get use getAudioRoutes but you can't use the setAudioRoute method, which is a must.

After that I researched again and, wanted to try with Voximplant SDK. It performs well but at the end, pretty much the same story. You can't use set audio route method in Android, which is selectAudioDevice on their side.

I don't know, maybe there is something missing in my project but, there are no more alternatives.

If anyone has a idea how to handle this situation with audio routing, please share with me.

If there is a another module or api to do that, I'll be happy to know.

Thank you

Upvotes: 0

Views: 89

Answers (0)

Related Questions