Open danjenkins opened 6 years ago
@danjenkins any progress on that?
Yes, webrtc will change audio mode internally, and it's global audio session instance. To avoid this:
I wonder if we can use react native's NativeModule
to have more info of react-native-webrtc
and cooperate more tightly as an config option.
The auto
mode of this library should have handled this issue. Take a glance on the source code if you are using this lib manually.
Hi !
We've also upgraded to react-native-webrtc 1.69.2
and having this issue too.
@danjenkins have you found a way the solve this ?
hey all - sorry I havent come back to this recently! Let me test some things out this week :)
I don't see this issue. :thinking:
I'm using: InCallManager.start({media: (shouldUseVideo ? 'video' : 'audio'), ringback: '_DTMF_'});
on android, and using callKit on ios
Btw, both M69 and M75 works fine
react-native-webrtc 1.69.2 on ios device has this issue. It is fine to call InCallManager.start when there is no webrtc connection (e.g, calling the start function after launch the app) but the ringback plays less than 1 second when there is webrtc connection.
But does't webrtc connection established means "Answer" in terms of telecommunication?
When the remote party send "early media" or "answered" ( which means webrtc connection established and the rtp stream is starting to send), the "ringback" should stop and play the remote rtp.
What is your scenario?
If you really need to play local ringback when rtp has established, have you tried to mute
/enable=false
on all webrtc tracks first?
I had this problem too.
For me, the source of the problem was the moment of calling InCallManager.start(...)
- if you will call this before RNCallKeep didActivateAudioSession
event, it will cut the sound in the moment of activating the audio session.
Originally I placed the InCallManager.start(...)
in the didActivateAudioSession
listener but I had other problems with unlocking the screen described in this issue: https://github.com/react-native-webrtc/react-native-callkeep/issues/231.
As a final solution, I just wait until the didActivateAudioSession
event occurs and then call InCallManager.start(...)
.
Now it works like a charm. :)
Hope that it helps somebody.
PS. Thx for the great library!
Thanks this solved my problem!
@swiety85 , hi, did u call InCallManager.start(...) in outgoing case? In this case i dont have any method to trigger 'configAudioSession' method
I need to double check with the current release of
react-native-webrtc
but with the M69 work thats now in master branch, ringback works on outgoing calls very briefly and then stops (before I call InCallManager.stop()) - I presume the webrtc audio session gets started and then that stops the ringback using the shared app audio instanceHave you come across this before?