Android webrtc app doesn't work on different network

1.4k views Asked by At

I have developed an android native app which shares screen with the web dashboard using MediaProjection and WebRTC.

The problem is the app works fine if the android app and the web dashboard is in the same network.

As soon as they are in the different network app didn't work.

I am using Web sockets as a Signaling channel.

The stun server used : stun:stun.l.google.com:19302

WebRTC library : io.pristine:libjingle:11139@aar

Any idea what could be the issue?

1

There are 1 answers

0
yavuz On

On different network you may need TURN server in addition to STUN server. STUN server is used to get external IP, but you may need TURN Server to relay traffic if peer to peer connection fails.

You can find detailed explanation from link

It is very hard to find a free TURN server. You can use the link to deploy your own TURN server