iceConnectionState failed when not on same wifi as server

Issues when playing with WebRTC Player

iceConnectionState failed when not on same wifi as server

Postby goodyes » Tue Jan 22, 2019 10:51 am

Hello, If I run my web with webrtc publisher, via wifi (same subnet on my office) then I have no troubles, but
If I run the web, from my mobile data, say outside my office, then iceConnectionState goes from "checking" to "failed"

How to resolve this issue, that don't allow webrtc-publisher to publish when the internet comes from outside the wifi networkd
goodyes
 
Posts: 0
Joined: Sun Jan 20, 2019 9:12 am

Re: iceConnectionState failed when not on same wifi as serve

Postby goodyes » Tue Jan 22, 2019 10:58 am

problem might be related to NAT, as server.endpoint.candidate:
4077567720 1 udp 2122260223 192.168.1.10 53350 typ host generation 0 ufrag 0vDK network-id 1 network-cost 50

Any idea or suggestioon / help ?
goodyes
 
Posts: 0
Joined: Sun Jan 20, 2019 9:12 am

Re: iceConnectionState failed when not on same wifi as serve

Postby goodyes » Tue Jan 22, 2019 11:15 am

solved, by using:
on publisher.js:
serverEndpoint.candidate = serverEndpoint.candidate.toString().replace("192.168.1.10", "89.129.183.221");
on web:
var WebRTCProtocol = "tcp"; //"udp";
goodyes
 
Posts: 0
Joined: Sun Jan 20, 2019 9:12 am

Re: iceConnectionState failed when not on same wifi as serve

Postby admin » Tue Jan 22, 2019 12:02 pm

WebRTC protocol can be both TCP and UDP, as long as you have "use central WebRTC port" checked.
admin
Site Admin
 
Posts: 1039
Joined: Fri Aug 21, 2009 10:13 am


Return to Playing with WebRTC Player

Who is online

Users browsing this forum: No registered users and 0 guests

cron