Skip to content

Instantly share code, notes, and snippets.

@ekr
Created June 26, 2013 14:58
Show Gist options
  • Save ekr/5868070 to your computer and use it in GitHub Desktop.
Save ekr/5868070 to your computer and use it in GitHub Desktop.
Default ICE servers
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");
@Globik
Copy link

Globik commented Apr 15, 2016

Is it no chance for a peerconnection from localhost when the network is down? Very bad.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment