Browse Source

Removed debug and cleaned up.

pull/100/head
Simon Eisenmann 11 years ago
parent
commit
05b2437378
  1. 33
      static/js/controllers/mediastreamcontroller.js
  2. 5
      static/js/controllers/roomchangecontroller.js
  3. 10
      static/js/mediastream/api.js
  4. 10
      static/js/services/contacts.js
  5. 2
      static/js/services/usersettingsdata.js
  6. 4
      static/js/services/videolayout.js

33
static/js/controllers/mediastreamcontroller.js

@ -267,34 +267,23 @@ define(['underscore', 'bigscreen', 'moment', 'sjcl', 'modernizr', 'webrtc.adapte @@ -267,34 +267,23 @@ define(['underscore', 'bigscreen', 'moment', 'sjcl', 'modernizr', 'webrtc.adapte
if ($window.webrtcDetectedBrowser === "chrome") {
// NOTE(longsleep): We can always enable SCTP data channels, as we have a workaround
// using the "active" event for Firefox < 27.
if (true) {
// SCTP does not work correctly with Chrome 31. Require M32.
if ($window.webrtcDetectedVersion >= 32) {
// SCTP is supported from Chrome M31.
// No need to pass DTLS constraint as it is on by default in Chrome M31.
// For SCTP, reliable and ordered is true by default.
console.info("Using SCTP based Data Channels.");
} else {
// Chrome < M31 does not yet do DTLS-SRTP by default whereas Firefox only
// does DTLS-SRTP. In order to get interop, you must supply Chrome
// with a PC constructor constraint to enable DTLS.
optionalPcConstraints.push({
DtlsSrtpKeyAgreement: true
});
}
// SCTP does not work correctly with Chrome 31. Require M32.
if ($window.webrtcDetectedVersion >= 32) {
// SCTP is supported from Chrome M31.
// No need to pass DTLS constraint as it is on by default in Chrome M31.
// For SCTP, reliable and ordered is true by default.
} else {
// NOTE(longsleep): This disables SCTP data channels, which hacks Firefox
// support by forcing old style Chrome Rtp data channels. SCTP Data Channels
// between Firefox and Chrome will not work until FF 27.
// See https://code.google.com/p/webrtc/issues/detail?id=2279 and
// https://code.google.com/p/chromium/issues/detail?id=295771
// Chrome < M32 does not yet do DTLS-SRTP by default whereas Firefox only
// does DTLS-SRTP. In order to get interop, you must supply Chrome
// with a PC constructor constraint to enable DTLS.
console.warn("Turning on SCTP combatibility - please update your Chrome.");
optionalPcConstraints.push({
RtpDataChannels: true
DtlsSrtpKeyAgreement: true
});
}
}
console.log("WebRTC settings", mediaStream.webrtc.settings);
//console.log("WebRTC settings", mediaStream.webrtc.settings);
};

5
static/js/controllers/roomchangecontroller.js

@ -71,7 +71,10 @@ define([], function() { @@ -71,7 +71,10 @@ define([], function() {
$scope.roomdata = {};
$scope.$watch("roomdata.name", function(n) {
console.log("roomdata.name changed", n);
//console.log("roomdata.name changed", n);
if (!n) {
n = "";
}
var u = encodeURIComponent(n);
$scope.roomdata.url = "/" + u;
$scope.roomdata.link = mediaStream.url.room(n);

10
static/js/mediastream/api.js

@ -139,7 +139,7 @@ define(['jquery', 'underscore'], function($, _) { @@ -139,7 +139,7 @@ define(['jquery', 'underscore'], function($, _) {
switch (dataType) {
case "Self":
console.log("Self received", data);
//console.log("Self received", data);
if (data.Token) {
this.connector.token = data.Token;
}
@ -148,7 +148,7 @@ define(['jquery', 'underscore'], function($, _) { @@ -148,7 +148,7 @@ define(['jquery', 'underscore'], function($, _) {
this.e.triggerHandler("received.self", [data]);
break;
case "Offer":
console.log("Offer received", data.To, data.Offer);
//console.log("Offer received", data.To, data.Offer);
this.e.triggerHandler("received.offer", [data.To, data.Offer, data.Type, d.To, d.From]);
break;
case "Candidate":
@ -156,11 +156,11 @@ define(['jquery', 'underscore'], function($, _) { @@ -156,11 +156,11 @@ define(['jquery', 'underscore'], function($, _) {
this.e.triggerHandler("received.candidate", [data.To, data.Candidate, data.Type, d.To, d.From]);
break;
case "Answer":
console.log("Answer received", data.To, data.Answer);
//console.log("Answer received", data.To, data.Answer);
this.e.triggerHandler("received.answer", [data.To, data.Answer, data.Type, d.To, d.From]);
break;
case "Users":
console.log("Connected users: " + data.Users.length);
//console.log("Connected users: " + data.Users.length);
this.e.triggerHandler("received.users", [data.Users]);
break;
case "Bye":
@ -169,7 +169,7 @@ define(['jquery', 'underscore'], function($, _) { @@ -169,7 +169,7 @@ define(['jquery', 'underscore'], function($, _) {
break;
case "Joined":
case "Left":
console.log("User action received", dataType, data);
//console.log("User action received", dataType, data);
this.e.triggerHandler("received.userleftorjoined", [dataType, data]);
break;
case "Status":

10
static/js/services/contacts.js

@ -33,7 +33,7 @@ define(['underscore', 'jquery', 'modernizr', 'sjcl', 'text!partials/contactsmana @@ -33,7 +33,7 @@ define(['underscore', 'jquery', 'modernizr', 'sjcl', 'text!partials/contactsmana
var transaction = event.target.transaction;
transaction.onerror = _.bind(that.onerror, that);
that.init(db);
console.log("Created contacts database.")
console.info("Created contacts database.")
};
request.onsuccess = _.bind(that.onsuccess, that);
};
@ -57,7 +57,7 @@ define(['underscore', 'jquery', 'modernizr', 'sjcl', 'text!partials/contactsmana @@ -57,7 +57,7 @@ define(['underscore', 'jquery', 'modernizr', 'sjcl', 'text!partials/contactsmana
Database.prototype.onsuccess = function(event) {
this.db = event.target.result;
this.ready = true;
console.log("Openend database", this.db);
//console.log("Openend database", this.db);
this.e.triggerHandler("ready");
};
Database.prototype.put = function(storename, data, successCallback, errorCallback) {
@ -172,7 +172,7 @@ define(['underscore', 'jquery', 'modernizr', 'sjcl', 'text!partials/contactsmana @@ -172,7 +172,7 @@ define(['underscore', 'jquery', 'modernizr', 'sjcl', 'text!partials/contactsmana
this.key = sjcl.codec.base64.fromBits(sjcl.hash.sha256.hash(suserid+mediaStream.config.Token));
// Create database name for user which.
var id = "mediastream-" + this.id(userid);
console.log("Open of database:", id);
//console.log("Open of database:", id);
var database = this.database = new Database(id);
return database;
} else {
@ -210,7 +210,7 @@ define(['underscore', 'jquery', 'modernizr', 'sjcl', 'text!partials/contactsmana @@ -210,7 +210,7 @@ define(['underscore', 'jquery', 'modernizr', 'sjcl', 'text!partials/contactsmana
Contacts.prototype.load = function() {
if (this.database) {
console.log("Load contacts from storage", this);
//console.log("Load contacts from storage", this);
var remove = [];
this.database.all("contacts", _.bind(function(data) {
var d = this.decrypt(data.contact);
@ -251,7 +251,7 @@ define(['underscore', 'jquery', 'modernizr', 'sjcl', 'text!partials/contactsmana @@ -251,7 +251,7 @@ define(['underscore', 'jquery', 'modernizr', 'sjcl', 'text!partials/contactsmana
Contacts.prototype.remove = function(userid) {
var contact = contactData.get(userid);
console.log("contacts remove", userid, contact);
//console.log("contacts remove", userid, contact);
if (contact) {
contactData.remove(userid);
if (this.database) {

2
static/js/services/usersettingsdata.js

@ -57,7 +57,7 @@ define(["sjcl"], function(sjcl) { @@ -57,7 +57,7 @@ define(["sjcl"], function(sjcl) {
if (this.key) {
raw = sjcl.decrypt(this.key, raw);
}
console.log("Found stored user data:", raw);
//console.log("Found stored user data:", raw);
return JSON.parse(raw);
} catch(e) {
console.warn("Failed to load stored user data:", e);

4
static/js/services/videolayout.js

@ -286,7 +286,7 @@ define(["jquery", "underscore", "modernizr"], function($, _, Modernizr) { @@ -286,7 +286,7 @@ define(["jquery", "underscore", "modernizr"], function($, _, Modernizr) {
if (!current) {
current = new renderers[name](container, scope, controller)
console.log("Created new video layout renderer", name, current);
//console.log("Created new video layout renderer", name, current);
$(layoutparent).addClass("renderer-" + name);
return true;
} else {
@ -296,7 +296,7 @@ define(["jquery", "underscore", "modernizr"], function($, _, Modernizr) { @@ -296,7 +296,7 @@ define(["jquery", "underscore", "modernizr"], function($, _, Modernizr) {
$(layoutparent).removeClass("renderer-" + current.name);
current = new renderers[name](container, scope, controller)
$(layoutparent).addClass("renderer-" + name);
console.log("Switched to new video layout renderer", name, current);
//console.log("Switched to new video layout renderer", name, current);
return true;
}
}

Loading…
Cancel
Save