This CL will add support of passing all turn urls returned by the CEOD to PeerConnection object.
R=juberti@webrtc.org, vikasmarwaha@webrtc.org Review URL: https://webrtc-codereview.appspot.com/1949004 git-svn-id: http://webrtc.googlecode.com/svn/trunk@4506 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
parent
58d76cb635
commit
5a27e49f35
@ -86,11 +86,14 @@
|
||||
|
||||
if (xmlhttp.status === 200) {
|
||||
var turnServer = JSON.parse(xmlhttp.responseText);
|
||||
// Create a turnUri using the polyfill (adapter.js).
|
||||
var iceServer = createIceServer(turnServer.uris[0], turnServer.username,
|
||||
turnServer.password);
|
||||
if (iceServer !== null) {
|
||||
pcConfig.iceServers.push(iceServer);
|
||||
for (i = 0; i < turnServer.uris.length; i++) {
|
||||
// Create a turnUri using the polyfill (adapter.js).
|
||||
var iceServer = createIceServer(turnServer.uris[i],
|
||||
turnServer.username,
|
||||
turnServer.password);
|
||||
if (iceServer !== null) {
|
||||
pcConfig.iceServers.push(iceServer);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
console.log('Request for TURN server failed.');
|
||||
|
Loading…
x
Reference in New Issue
Block a user