I have implemeted video streaming in android using mediasoup library. When i stream between web and android it works when when android app is in foreground. But when i put android app in backgroind iceConnectionState changes to disconnected. I have tried running foreground service when initiating the call, but connection still disconnects. Do you guys know what might be the issue.
When you say “Android app” do you mean a web app running in Chrome in Android?
No, not running in chrome. React native app running natively in android.
No idea. Ask in the react-native-webrtc forum.
I don’t use react native, but I had to run the mediasoup client in a foreground service with a wakelock to keep it running in the background, or else Android os would pause it which results in disconnects in signalling/transports, whichever comes first.