Sound disappears when receiving call from another app, like Skype

Hello everyone,

Our team is developing chat application with 1-1 and group calls. We came upon an issue that when we are on active call, and so we have active audio stream, and I can hear everyone, and everyone can hear me. But when I get a call from another messenger, for example Skype, I lose my audio stream on iOS, neither I can hear anyone, nor anyone can hear me while I have notification from Skype. But even when I swipe it away, I can not hear anyone, looks like I lose my audio stream, or another app takes it away.

Does anyone have an idea why this is happening and what to do with it?

We have the same problem. I think it’s because apps like Skype and Zoom have a higher audio priority, so your app gets pre-empted. I’m not exactly sure about the details.

You can get notifications about these interrupts from libwebrtc. So, at least you can communicate to the user that the audio isn’t available. Check out this class for tips. In particular check out the failedToSetActive event.

https://chromium.googlesource.com/external/webrtc/+/refs/heads/master/sdk/objc/components/audio/RTCAudioSession.h

To access these events, you have to pass a delegate into addDelegate and then pass things through the React Native bridge back to your app.

If you have react-native-webrtc installed, you should be able to include this file without any other configuration.

#import <WebRTC/RTCAudioSession.h>