Demo not working on mobile hotspot on two sessions on one machine

Hi,

I was trying the mediasoup demo app at https://v3demo.mediasoup.org demo link, on internet transmitted through mobile hotspot on desktop chrome Version 97.0.4692.99 (Official Build) (64-bit). I opened one window in normal window and another in the incognito mode. However it doesn’t play video or audio on the mediasoup. I had tried this demo link on normal wifi earlier and it worked perfectly, there wasn’t a problem. What might be the issue?

How to produce?

  1. Use Mobile Hotspot for connecting the laptop to the internet using the wifi transmitted through the hotspot
  2. Open https://v3demo.mediasoup.org link on the chrome in normal window and start the meeting
  3. Copy the meeting url and open the Incognito tab and start the meeting there as well.
  4. the audio and video both does not transmit.
  5. I observed that the tracks and stream is transferred and the video and audio elements created but the video & audio doesn’t play

Your response and resolution would be really helpful.

PS.
I have my normal webRTC Mesh application. that application is able to capture both the camera feeds from these two tabs and able to transmit using rtcPeerConnection and play both videos and audios.

Dear experts, any luck?

NAT issues is all, possibly bad configurations or in need of TURN. Hotspots aren’t all the same so it’s not really easy to give you further explanation.

mediasoup is not P2P, NAT has nothing to do with this.

Dear Cosmosis,

Thanks for response.

I also suspect it to be NAT problems or ICE connection problem.

Thanks Nazar, but the problem is only on mobile hotspot or connecting mobile hotspot and desktop on 4g / mobile data connectivity… Things work very well on wifi… So I suspect there has to some NAT issue. May be you can let us know in case you are able to resolve it.

Thanks for support

I have more observations from chomre://webrtc-internals. The ICE connection state: new => checking => disconnected and it shows error as iceconnectionstatechange (legacy)

Ideally Mediasoup shouldn’t require TURN server, as its a direct connection over TCP or UDP port, but somehow its not able to resolve the ICE connection. 3 ICE Candidates in the SDP are

a=candidate:2358288537 1 udp 2122262783 2402:xxxx:187f:xxxx:318e:6453:12a:cb20 63978 typ host generation 0 network-id 2 network-cost 10
a=candidate:1531540168 1 udp 2122197247 2402:xxxx:187f:xxxx:bc3b:44f2:85ad:3e3c 63979 typ host generation 0 network-id 3 network-cost 10
a=candidate:2832572806 1 udp 2122129151 192.168.xxx.xxx 63980 typ host generation 0 network-id 1 network-cost 10

My end IP is 2402:xxxx:187f:xxxx:bc3b:44f2:85ad:3e3c, which is a second candidate, but it never tries on that IPV6.

the fingerprints are

a=fingerprint:sha-256 67:C8:B4:08:E8:00:D3:6F:D0:FC:28:B0:DF:BB:CC:EC:D7:1F:2D:97:57:A9:A2:09:B3:B0:4B:80:B8:DE:F4:65
a=candidate:2358288537 1 udp 2122262783 2402:xxxx:187f:xxxx:318e:6453:12a:cb20 63978 typ host generation 0 network-id 2 network-cost 10
a=candidate:1531540168 1 udp 2122197247 2402:xxxx:187f:xxxx:bc3b:44f2:85ad:3e3c 63979 typ host generation 0 network-id 3 network-cost 10
a=candidate:2832572806 1 udp 2122129151 192.168.xxx.xxx 63980 typ host generation 0 network-id 1 network-cost 10

icegatheringstatechange is “complete”
setLocalDescriptionOnSuccess
signalingstatechange is “stable”
transceiverModified
iceconnectionstatechange is “disconnected”
iceconnectionstatechange (legacy) is “failed”

I checked with netstat in windows and the ports are open . So, it must be something at mediasoup side, which is not able to connect.

Please do let me know if this helps.

Why should it try? v3demo.mediasoup.org provides only an IPv4 candidate as far as I know.

Okay, I thought it supports IPV6 also. But regardless, but the mobile hotspot also has the public IPV4 but still it not connecting the meetings between participants of wifi to mobile hotspot.

Normally the browser would have received it as a peer reflexive candidate by trying to reach the server through 192.168.xxx.xxx first.

Yes, you are right.

I checked the v3demo.mediasoup again and again and also tried downloading and running locally but its not helping… the chrone://webrtc-internals on mobile data shows connection stuck up at “new”

Please consider this data NOT directly from v3demo.mediasoup.com but from the running local copy of it. Thanks.

But you can try same on your machines (mobile as well as mobile hotspot and connect to desktop.

Here is the process;

  1. connect to the mobile hotspot (disconnect the wifi)
  2. open mediasoup demo
  3. open chrome://webrtc-internals on another tab
  4. open the same url on mobile or 3 test scenarios as open it on any other device
    1. same mobile using same mobile data,
    1. different mobile on its own mobile data or
    1. any another (mobile - desktop - laptop) device with wifi)
  1. Now it wont connect. Check the ebrtc-internals.
  2. now check the site My IP Information - WhatIsMyIP.com® to check your own public IP address (IPV4 and IPV6)
  3. now check the chrome://webrtc-internals iceCandiate grid for the connections established. It would show local-candidate 192.168.xxx.xxx or some other IP but not the IP shown by public sites as public IP. It will also show remote-candidate is 62.210.xxx.xxx. Which is mediasoup server address of v3demo.mediasoup.org
  4. now in the command prompt if we do the tracert mediasoup.org, it doens’t connect using the IPV4 public IP it shows the IPV6 ip trace…

Which means that the IPV4 and IPV6 are being used and being mixed and thats where the issue is. The demo server isn’t configred for IPV6, so it should have picked up the public IP, as the others also give like My IP Information - WhatIsMyIP.com®

Please do let me know after your checking, if there any solution.

If solution is in the server side, then please do let me know, I can download and run locally and test. Or best, if the demo can be updated on github and also the actual server v3demo.mediasoup.org

Thanks

This seems to be an issue of either mediasoup-client or the mediasoup libray… I am posting another question under that category.