Created
June 26, 2013 14:58
-
-
Save ekr/5868070 to your computer and use it in GitHub Desktop.
Default ICE servers
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/dom/media/PeerConnection.js b/dom/media/PeerConnection.js | |
--- a/dom/media/PeerConnection.js | |
+++ b/dom/media/PeerConnection.js | |
@@ -266,17 +266,19 @@ RTCPeerConnection.prototype = { | |
classID: PC_CID, | |
contractID: PC_CONTRACT, | |
QueryInterface: XPCOMUtils.generateQI([Ci.nsISupports, | |
Ci.nsIDOMGlobalPropertyInitializer, | |
Ci.nsISupportsWeakReference]), | |
init: function(win) { this._win = win; }, | |
__init: function(rtcConfig) { | |
+ dump("CONFIG: " + JSON.stringify(rtcConfig)); | |
if (!rtcConfig.iceServers || | |
+ !rtcConfig.iceServers.length || | |
!Services.prefs.getBoolPref("media.peerconnection.use_document_iceservers")) { | |
rtcConfig = {iceServers: | |
JSON.parse(Services.prefs.getCharPref("media.peerconnection.default_iceservers"))}; | |
} | |
this._mustValidateRTCConfiguration(rtcConfig, | |
"RTCPeerConnection constructor passed invalid RTCConfiguration"); | |
if (_globalPCList._networkdown) { | |
throw new Components.Exception("Can't create RTCPeerConnections when the network is down"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is it no chance for a peerconnection from localhost when the network is down? Very bad.