Video Stream become Black screen if not using WIFI

Hi everyone, I just faced an issue on when trying to connect between the devices, if I using the same network with WIFI it running well all devices that connected can see each device that connected,
but if I change the network like using Mobile Data Plan, and the others using wifi, the one that using Mobile Data Plan just showing a black screen for a video that streamed and also in another device, it will show a black screen

the case:
#1
DEVICE 1 : USING WIFI (Same Networks)
DEVICE 2 : USING WIFI (Same Networks)
DEVICE 3 : USING WIFI (Same Networks)
this will be running well

#2
DEVICE 1 : USING WIFI
DEVICE 2 : MOBILE DATA PLAN
DEVICE 3 : MOBILE DATA PLAN
2,3 device will show a black screen

this show that showing running perfectly because use the same networks and WIFI

this is pict that showing a black screen, at the bottom left, it should show video stream from another peer

the getting offer and sending answer was logged same,

what things can be caused this issue? is that because of the signaling server? or ISP ? or firewall? or just my code? still cannot get the real issue of this.

Thanks a lot

I had similar issue using mobile data. Anyone can help us on this?

Best bet would be to use a STUN and TURN server.
Some mobile networks can be overly unpredictable.

I’m already using TURN server connection through numb.viagenie.ca but I’m still getting a black screen and I see no errors on degub console. Any help would be greatly appreciated.

It seems that WEBRTC peer connection only works if both devices are connected on the same network. How can we resolve this problem?

ya bro, ive changed it, and now its running well

you can try this one for testing and development purpose
hi @bcgoodmate i just fixed this issues with changing our STUN and TURN server, you can try this public server

  webex_config: {
    iceServers: [
      {urls: 'stun:stun.l.google.com:19302'},
      {
        url: 'turn:numb.viagenie.ca',
        credential: 'muazkh',
        username: 'webrtc@live.com',
      },
    ],
  },
1 Like

Wow. It worked. Thank you so much.

I found that sample earlier but never tried it as thought it’s an outdated one. Instead I created my own by registering it here https://numb.viagenie.ca/cgi-bin/numbacct but I wonder why it doesn’t worked when in fact the only difference is the credential and username and it also passed when I tested it on https://webrtc.github.io/samples/src/content/peerconnection/trickle-ice. Did I missed some important configuration? Hmmm…