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() {
APP.RTC.start();
APP.xmpp.start(APP.UI.getCredentials());
APP.xmpp.start();
APP.statistics.start();
APP.connectionquality.init();

View File

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

View File

@ -211,15 +211,6 @@
</div>
<div id="subject"></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="videospace">
<div id="largeVideoContainer" class="videocontainer">

View File

@ -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');

View File

@ -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);