Skip to content
This repository has been archived by the owner on Dec 4, 2017. It is now read-only.

Commit

Permalink
Move gHasInternetAccess to webrtcMedia.hasInternetAccess per Mark's r…
Browse files Browse the repository at this point in the history
…eview comment.
  • Loading branch information
fqueze committed Feb 6, 2013
1 parent 62f554e commit 2784682
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion static/checks.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ var webrtcChecks = {
this.displaySidebarWarning();

if (!this.hasBrowserId()) {
gHasInternetAccess = false;
webrtcMedia.hasInternetAccess = false;
$("#guest").show();
startGuest();
}
Expand Down
5 changes: 2 additions & 3 deletions static/media.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
var gHasInternetAccess = true;

// This object currently assumes the following elements are defined in the web page for calls:
// remoteVideo, remoteAudio, localVideo, localAudio
var webrtcMedia = {
hasInternetAccess: true,
startCall: function webrtcMedia_startCall(aPerson, aWin, aAudioOnly, aConnectionCallback,
aDataConnectionCallback) {
var pc = this._createBasicPc(aWin, aPerson, true, aAudioOnly, aConnectionCallback,
Expand Down Expand Up @@ -104,7 +103,7 @@ var webrtcMedia = {
aConnectionCallback,
aDataConnectionCallback) {
var params;
if (!gHasInternetAccess)
if (!this.hasInternetAccess)
params = {iceServers: []};
var pc = new aWin.mozRTCPeerConnection(params);
pc.onaddstream = function(obj) {
Expand Down

0 comments on commit 2784682

Please sign in to comment.