Skip to content

Commit

Permalink
clarified where ice server entries go
Browse files Browse the repository at this point in the history
  • Loading branch information
EricDavies committed Mar 10, 2017
1 parent db89c84 commit 080f699
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions docs/easyrtc_server_ice.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ STUN servers generally require very little bandwidth, thus there are many free s

It is estimated that 85-90% of connections do not require TURN, however that still leaves a significant percentage which does require it.

Note: the example code fragments below are intended to be put in your server_example.js file.
They run on the server side, not the client side.

TURN Details:
-------------
Expand All @@ -27,14 +29,14 @@ The appIceConfig option accepts an array containing zero or more URL's to STUN a


var myIceServers = [
{"url":"stun:[ADDRESS]:[PORT]"},
{"urls":"stun:[ADDRESS]:[PORT]"},
{
"url":"turn:[ADDRESS]:[PORT]",
"urls":"turn:[ADDRESS]:[PORT]",
"username":"[USERNAME]",
"credential":"[CREDENTIAL]"
},
{
"url":"turn:[ADDRESS]:[PORT][?transport=tcp]",
"urls":"turn:[ADDRESS]:[PORT][?transport=tcp]",
"username":"[USERNAME]",
"credential":"[CREDENTIAL]"
}
Expand Down Expand Up @@ -67,9 +69,9 @@ In this example we are supplying a custom username for the TURN server.

easyrtc.on("getIceConfig", function(connectionObj, callback){
var myIceServers=[
{"url":"stun:stun.easyrtc.com:3478"},
{"urls":"stun:stun.easyrtc.com:3478"},
{
"url": "turn:turn.easyrtc.com:3478",
"urls": "turn:turn.easyrtc.com:3478",
"username": connectionObj.getUsername(),
"credential": "345yRTC!"
}
Expand Down

0 comments on commit 080f699

Please sign in to comment.