cannot transfer sound if not on wifi

I am using mediasoup for an app built with React Native. Everything works perfectly fine while phones are on wifi. However, the phone do not transfer sound/audio if it is not on wifi. I tried to debug, and it looks like both devices successfuly produce and consume according to methods provided by mediasoup.

any ideas?

No idea without having logs. You need to check the logs in the server or even the client app and see what is happening.

Exactly. mediasoup (server) provides lot of logs and methods (getStats()) and events to check what is happening.

Those methods, events and logs are for the user to inspect. We cannot help if you don’t you it.

@mkh @ibc you guys were right. I tried producer.getStats() and it does not give me anything if I am using data. If I connect to wifi, it starts producing, but if I get disconnected from wifi, the bitrate becomes zero. Any ideas?

You should diagnose UDP/network issues when not using WiFi. That’s the only I can say.

You may also disable UDP in the server app and see if it works with TCP.