From b61743a42c7ffb5f10205e2fffc6a97501813eeb Mon Sep 17 00:00:00 2001 From: Daniel Roesler Date: Sun, 25 Jan 2015 22:03:19 -0800 Subject: [PATCH] made STUN server the same for both chrome and firefox --- index.html | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/index.html b/index.html index 2d80a54..a980893 100644 --- a/index.html +++ b/index.html @@ -24,7 +24,7 @@ || window.mozRTCPeerConnection || window.webkitRTCPeerConnection; var mediaConstraints = { - optional: [{RtpDataChannels: true}, {DtlsSrtpKeyAgreement: false}] + optional: [{RtpDataChannels: true}] }; //firefox already has a default stun server in about:config @@ -32,9 +32,9 @@ // [{"url": "stun:stun.services.mozilla.com"}] var servers = undefined; - //add stun server for chrome + //add same stun server for chrome if(window.webkitRTCPeerConnection) - servers = {iceServers: [{url: "stun:stun.l.google.com:19302"}]}; + servers = {iceServers: [{urls: "stun:stun.services.mozilla.com"}]}; //construct a new RTCPeerConnection var pc = new RTCPeerConnection(servers, mediaConstraints); @@ -63,7 +63,7 @@ //create an offer sdp pc.createOffer(function(result){ - //trigger the + //trigger the stun server request pc.setLocalDescription(result, function(){}); }, function(){});