Removes unused connection settings form.

This commit is contained in:
paweldomas 2015-03-09 16:16:06 +01:00
parent 66a53c7dc0
commit f48633fa1d
5 changed files with 7 additions and 54 deletions

2
app.js
View File

@ -21,7 +21,7 @@ var APP =
function init() { function init() {
APP.RTC.start(); APP.RTC.start();
APP.xmpp.start(APP.UI.getCredentials()); APP.xmpp.start();
APP.statistics.start(); APP.statistics.start();
APP.connectionquality.init(); APP.connectionquality.init();

View File

@ -29,10 +29,6 @@ html, body{
z-index: 5; z-index: 5;
} }
#settings {
display:none;
}
#nowebrtc { #nowebrtc {
display:none; display:none;
} }

View File

@ -211,15 +211,6 @@
</div> </div>
<div id="subject"></div> <div id="subject"></div>
</div> </div>
<div id="settings">
<h1 data-i18n="connectionsettings"></h1>
<form id="loginInfo">
<label>JID: <input id="jid" type="text" name="jid" placeholder="me@example.com"/></label>
<label>Password: <input id="password" type="password" name="password" placeholder="secret"/></label>
<label>BOSH URL: <input id="boshURL" type="text" name="boshURL" placeholder="/http-bind"/></label>
<input id="connect" type="submit" value="Connect" />
</form>
</div>
<div id="reloadPresentation"><a id="reloadPresentationLink"><i title="Reload Prezi" class="fa fa-repeat fa-lg"></i></a></div> <div id="reloadPresentation"><a id="reloadPresentationLink"><i title="Reload Prezi" class="fa fa-repeat fa-lg"></i></a></div>
<div id="videospace"> <div id="videospace">
<div id="largeVideoContainer" class="videocontainer"> <div id="largeVideoContainer" class="videocontainer">

View File

@ -626,22 +626,6 @@ UI.connectionIndicatorShowMore = function(id)
return VideoLayout.connectionIndicators[id].showMore(); 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) UI.showLoginPopup = function(callback)
{ {
console.log('password is required'); console.log('password is required');

View File

@ -1,3 +1,4 @@
/* global $, APP, config, Strophe*/
var Moderator = require("./moderator"); var Moderator = require("./moderator");
var EventEmitter = require("events"); var EventEmitter = require("events");
var Recording = require("./recording"); var Recording = require("./recording");
@ -11,26 +12,11 @@ var eventEmitter = new EventEmitter();
var connection = null; var connection = null;
var authenticatedUser = false; var authenticatedUser = false;
function connect(jid, password, uiCredentials) { function connect(jid, password) {
var bosh var bosh = config.bosh || '/http-bind';
= (uiCredentials && uiCredentials.bosh? uiCredentials.bosh : null)
|| config.bosh || '/http-bind';
connection = new Strophe.Connection(bosh); connection = new Strophe.Connection(bosh);
Moderator.setConnection(connection); 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) { if (connection.disco) {
// for chrome, add multistream cap // for chrome, add multistream cap
} }
@ -42,9 +28,6 @@ function connect(jid, password, uiCredentials) {
connection.jingle.pc_constraints.optional.push({googIPv6: true}); connection.jingle.pc_constraints.optional.push({googIPv6: true});
} }
if(!password)
password = uiCredentials.password;
var anonymousConnectionFailed = false; var anonymousConnectionFailed = false;
connection.connect(jid, password, function (status, msg) { connection.connect(jid, password, function (status, msg) {
console.log('Strophe status changed to', console.log('Strophe status changed to',
@ -53,7 +36,6 @@ function connect(jid, password, uiCredentials) {
if (config.useStunTurn) { if (config.useStunTurn) {
connection.jingle.getStunAndTurnCredentials(); connection.jingle.getStunAndTurnCredentials();
} }
APP.UI.disableConnect();
console.info("My Jabber ID: " + connection.jid); console.info("My Jabber ID: " + connection.jid);
@ -150,7 +132,7 @@ var XMPP = {
* @type {boolean} * @type {boolean}
*/ */
forceMuted: false, forceMuted: false,
start: function (uiCredentials) { start: function () {
setupEvents(); setupEvents();
initStrophePlugins(); initStrophePlugins();
registerListeners(); registerListeners();
@ -161,8 +143,8 @@ var XMPP = {
window.location.search.indexOf("login=true") !== -1) { window.location.search.indexOf("login=true") !== -1) {
configDomain = config.hosts.domain; configDomain = config.hosts.domain;
} }
var jid = uiCredentials.jid || configDomain || window.location.hostname; var jid = configDomain || window.location.hostname;
connect(jid, null, uiCredentials); connect(jid, null);
}, },
promptLogin: function () { promptLogin: function () {
APP.UI.showLoginPopup(connect); APP.UI.showLoginPopup(connect);