Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TURN Server Support #33

Open
Jorger opened this issue Jun 2, 2013 · 8 comments
Open

TURN Server Support #33

Jorger opened this issue Jun 2, 2013 · 8 comments

Comments

@Jorger
Copy link

Jorger commented Jun 2, 2013

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
Copy link

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
Copy link
Member

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
Copy link

Thanks! I'll try that!

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

Cheers

@Jorger
Copy link
Author

Jorger commented Jun 26, 2013

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
Copy link
Member

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 (#33 (comment)).

@Jorger
Copy link
Author

Jorger commented Jun 26, 2013

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
Copy link

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

replace @ by %40

@Junaidy07
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants