diff --git a/app.js b/app.js index 23d5b2369..4a86b546a 100644 --- a/app.js +++ b/app.js @@ -21,7 +21,7 @@ var APP = function init() { APP.RTC.start(); - APP.xmpp.start(APP.UI.getCredentials()); + APP.xmpp.start(); APP.statistics.start(); APP.connectionquality.init(); diff --git a/css/main.css b/css/main.css index 4f55b58e8..75d28af0f 100644 --- a/css/main.css +++ b/css/main.css @@ -29,10 +29,6 @@ html, body{ z-index: 5; } -#settings { - display:none; -} - #nowebrtc { display:none; } diff --git a/index.html b/index.html index 87594337c..4d70fb545 100644 --- a/index.html +++ b/index.html @@ -211,15 +211,6 @@
-
-

-
- - - - -
-
diff --git a/modules/UI/UI.js b/modules/UI/UI.js index 967db113b..c5d04ec73 100644 --- a/modules/UI/UI.js +++ b/modules/UI/UI.js @@ -626,22 +626,6 @@ UI.connectionIndicatorShowMore = function(id) return VideoLayout.connectionIndicators[id].showMore(); }; -UI.getCredentials = function () { - var settings = this.getSettings(); - return { - bosh: document.getElementById('boshURL').value, - password: document.getElementById('password').value, - jid: document.getElementById('jid').value, - email: settings.email, - displayName: settings.displayName, - uid: settings.uid - }; -}; - -UI.disableConnect = function () { - document.getElementById('connect').disabled = true; -}; - UI.showLoginPopup = function(callback) { console.log('password is required'); diff --git a/modules/xmpp/xmpp.js b/modules/xmpp/xmpp.js index d038925e6..0db29858d 100644 --- a/modules/xmpp/xmpp.js +++ b/modules/xmpp/xmpp.js @@ -1,3 +1,4 @@ +/* global $, APP, config, Strophe*/ var Moderator = require("./moderator"); var EventEmitter = require("events"); var Recording = require("./recording"); @@ -11,26 +12,11 @@ var eventEmitter = new EventEmitter(); var connection = null; var authenticatedUser = false; -function connect(jid, password, uiCredentials) { - var bosh - = (uiCredentials && uiCredentials.bosh? uiCredentials.bosh : null) - || config.bosh || '/http-bind'; +function connect(jid, password) { + var bosh = config.bosh || '/http-bind'; connection = new Strophe.Connection(bosh); Moderator.setConnection(connection); - if(uiCredentials) { - var email = uiCredentials.email; - var displayName = uiCredentials.displayName; - if (email) { - connection.emuc.addEmailToPresence(email); - } else { - connection.emuc.addUserIdToPresence(uiCredentials.uid); - } - if (displayName) { - connection.emuc.addDisplayNameToPresence(displayName); - } - } - if (connection.disco) { // for chrome, add multistream cap } @@ -42,9 +28,6 @@ function connect(jid, password, uiCredentials) { connection.jingle.pc_constraints.optional.push({googIPv6: true}); } - if(!password) - password = uiCredentials.password; - var anonymousConnectionFailed = false; connection.connect(jid, password, function (status, msg) { console.log('Strophe status changed to', @@ -53,7 +36,6 @@ function connect(jid, password, uiCredentials) { if (config.useStunTurn) { connection.jingle.getStunAndTurnCredentials(); } - APP.UI.disableConnect(); console.info("My Jabber ID: " + connection.jid); @@ -150,7 +132,7 @@ var XMPP = { * @type {boolean} */ forceMuted: false, - start: function (uiCredentials) { + start: function () { setupEvents(); initStrophePlugins(); registerListeners(); @@ -161,8 +143,8 @@ var XMPP = { window.location.search.indexOf("login=true") !== -1) { configDomain = config.hosts.domain; } - var jid = uiCredentials.jid || configDomain || window.location.hostname; - connect(jid, null, uiCredentials); + var jid = configDomain || window.location.hostname; + connect(jid, null); }, promptLogin: function () { APP.UI.showLoginPopup(connect);