webRTC-io / webRTC.io

An abstraction layer for webRTC. Aim is to simplify the HTML5 web standard webRTC in a similar manner to socket.io w/ websockets. Highly experimental technology
1.6k stars 293 forks source link

TURN Server Support #33

Open Jorger opened 11 years ago

Jorger commented 11 years ago

Hello, webrtc.io is excellent, it works great, but I have problems in some places associated with the firewall, I read about TURN server, I wonder if webrtc.io has support for TURN, since in the code I have not found reference , STUN only.

Thanks for the care and support provided.

Jorge Rubiano.

NicolasRannou commented 11 years ago

I would love to see that too. I would allow us to use webtrc.io within institution/companies networks. It would be a very useful addition.

Any update on that?

dennismartensson commented 11 years ago

If you set the rtc.SERVER function to this and have a nice turn server it should work good. I did try it with

http://numb.viagenie.ca/

rtc.SERVER = function() { if (navigator.mozGetUserMedia) { return { "iceServers": [{ "url": "stun:23.21.150.121" }, { "credential": "webrtc", "url": "turn:", "username": "" } ] }; }

return {
  "iceServers": [{
      "url": "stun:stun.l.google.com:19302"
    }, {
      "url": "turn:<SERVER>",
      "credential": "<USER>"
    }
  ]
};

};

NicolasRannou commented 11 years ago

Thanks! I'll try that!

By the way, the webrtc.io demo is down.

Cheers

Jorger commented 11 years ago

Hi, I tested a server associated TURN (http://numb.viagenie.ca/), on two computers with Chrome Canary I have problems, but in Chrome stable out errors like:

Uncaught Error: NotSupportedError: DOM Exception 9 webrtc.io.js: 258 webrtc.io.js rtc.createPeerConnection 258 (anonymous function) webrtc.io.js: 202 webrtc.io.js rtc.fire 74 rtc._socket.onmessage

Uncaught TypeError: Can not call method 'setRemoteDescription' of undefined webrtc.io.js: 332 rtc.sendAnswer webrtc.io.js: 332 rtc.receiveOffer webrtc.io.js: 327 (anonymous function) webrtc.io.js: 220 webrtc.io.js rtc.fire 74 rtc._socket.onmessage

I found a link that says Chrome> 28 does not use the new URI TURN server: https://code.google.com/p/webrtc/issues/detail?id=1944

Thanks for your attention and help.

Jorge Rubiano.

dennismartensson commented 11 years ago

Remember to not have a @ in the url. Make sure to url encode

/Dennis

Dennis Mårtensson +46768670934 me@dennis.is

QR code for reading contact data in to phone.

On Wednesday, June 26, 2013 at 16:39 , Jorger wrote:

Hi, I tested a server associated TURN (http://numb.viagenie.ca/), on two computers with Chrome Canary I have problems, but in Chrome stable out errors like: Uncaught Error: NotSupportedError: DOM Exception 9 webrtc.io.js: 258 webrtc.io.js rtc.createPeerConnection 258 (anonymous function) webrtc.io.js: 202 webrtc.io.js rtc.fire 74 rtc._socket.onmessage
Uncaught TypeError: Can not call method 'setRemoteDescription' of undefined webrtc.io.js: 332 rtc.sendAnswer webrtc.io.js: 332 rtc.receiveOffer webrtc.io.js: 327 (anonymous function) webrtc.io.js: 220 webrtc.io.js rtc.fire 74 rtc._socket.onmessage
I found a link that says Chrome> 28 does not use the new URI TURN server: https://code.google.com/p/webrtc/issues/detail?id=1944 Thanks for your attention and help. Jorge Rubiano.

— Reply to this email directly or view it on GitHub (https://github.com/webRTC/webRTC.io/issues/33#issuecomment-20051842).

Jorger commented 11 years ago

Hello, thank you very much for the help, currently I have the following code:

return {          "iceServers": [{"url": "stun: stun.l.google.com: 19302"}, {"url": "turn: numb.viagenie.ca" credential: "xxxxx", username: "xxxx@email.com"}]      };

Under the direction of Numb registration email, it tells me:

  STUN / TURN Server: numb.viagenie.ca    Username: xxxx@email.com    Password: **** (the one you chose)

According to the link the correct form is:

var pc_config = {iceServers: [{url: 'turn: username@numb.viagenie.ca: 3478', credential: 'password'}]};

https://groups.google.com/forum/ #! topic/discuss-webrtc/bnC1vLVfdX0

This means that the configuration would be:

return {          "iceServers": [{"url": "stun: stun.l.google.com: 19302"}, {"url": "turn: xxxx@email.com@numb.viagenie.ca" credential: "xxxxx"}]      };

And as I see you must use the port 3478.

I appreciate the attention and help, and I hope I was clear in my questions

Jorge Rubiano.

NicolasRannou commented 11 years ago

"Remember to not have a @ in the url. Make sure to url encode"

replace @ by %40

Junaidy07 commented 10 years ago

how to make webrtc on localhost? and how to set that server?