Browse Source

Removes unused connection settings form.

master
paweldomas 10 years ago
parent
commit
f48633fa1d
5 changed files with 7 additions and 54 deletions
  1. 1
    1
      app.js
  2. 0
    4
      css/main.css
  3. 0
    9
      index.html
  4. 0
    16
      modules/UI/UI.js
  5. 6
    24
      modules/xmpp/xmpp.js

+ 1
- 1
app.js View File

21
 function init() {
21
 function init() {
22
 
22
 
23
     APP.RTC.start();
23
     APP.RTC.start();
24
-    APP.xmpp.start(APP.UI.getCredentials());
24
+    APP.xmpp.start();
25
     APP.statistics.start();
25
     APP.statistics.start();
26
     APP.connectionquality.init();
26
     APP.connectionquality.init();
27
 
27
 

+ 0
- 4
css/main.css View File

29
     z-index: 5;
29
     z-index: 5;
30
 }
30
 }
31
 
31
 
32
-#settings {
33
-    display:none;
34
-}
35
-
36
 #nowebrtc {
32
 #nowebrtc {
37
     display:none;
33
     display:none;
38
 }
34
 }

+ 0
- 9
index.html View File

211
             </div>
211
             </div>
212
             <div id="subject"></div>
212
             <div id="subject"></div>
213
         </div>
213
         </div>
214
-        <div id="settings">
215
-          <h1 data-i18n="connectionsettings"></h1>
216
-          <form id="loginInfo">
217
-            <label>JID: <input id="jid" type="text" name="jid" placeholder="me@example.com"/></label>
218
-            <label>Password: <input id="password" type="password" name="password" placeholder="secret"/></label>
219
-            <label>BOSH URL: <input id="boshURL" type="text" name="boshURL" placeholder="/http-bind"/></label>
220
-            <input id="connect" type="submit" value="Connect" />
221
-          </form>
222
-        </div>
223
         <div id="reloadPresentation"><a id="reloadPresentationLink"><i title="Reload Prezi" class="fa fa-repeat fa-lg"></i></a></div>
214
         <div id="reloadPresentation"><a id="reloadPresentationLink"><i title="Reload Prezi" class="fa fa-repeat fa-lg"></i></a></div>
224
         <div id="videospace">
215
         <div id="videospace">
225
             <div id="largeVideoContainer" class="videocontainer">
216
             <div id="largeVideoContainer" class="videocontainer">

+ 0
- 16
modules/UI/UI.js View File

626
     return VideoLayout.connectionIndicators[id].showMore();
626
     return VideoLayout.connectionIndicators[id].showMore();
627
 };
627
 };
628
 
628
 
629
-UI.getCredentials = function () {
630
-    var settings = this.getSettings();
631
-    return {
632
-        bosh: document.getElementById('boshURL').value,
633
-        password: document.getElementById('password').value,
634
-        jid: document.getElementById('jid').value,
635
-        email: settings.email,
636
-        displayName: settings.displayName,
637
-        uid: settings.uid
638
-    };
639
-};
640
-
641
-UI.disableConnect = function () {
642
-    document.getElementById('connect').disabled = true;
643
-};
644
-
645
 UI.showLoginPopup = function(callback)
629
 UI.showLoginPopup = function(callback)
646
 {
630
 {
647
     console.log('password is required');
631
     console.log('password is required');

+ 6
- 24
modules/xmpp/xmpp.js View File

1
+/* global $, APP, config, Strophe*/
1
 var Moderator = require("./moderator");
2
 var Moderator = require("./moderator");
2
 var EventEmitter = require("events");
3
 var EventEmitter = require("events");
3
 var Recording = require("./recording");
4
 var Recording = require("./recording");
11
 var connection = null;
12
 var connection = null;
12
 var authenticatedUser = false;
13
 var authenticatedUser = false;
13
 
14
 
14
-function connect(jid, password, uiCredentials) {
15
-    var bosh
16
-        = (uiCredentials && uiCredentials.bosh? uiCredentials.bosh : null)
17
-        || config.bosh || '/http-bind';
15
+function connect(jid, password) {
16
+    var bosh = config.bosh || '/http-bind';
18
     connection = new Strophe.Connection(bosh);
17
     connection = new Strophe.Connection(bosh);
19
     Moderator.setConnection(connection);
18
     Moderator.setConnection(connection);
20
 
19
 
21
-    if(uiCredentials) {
22
-        var email = uiCredentials.email;
23
-        var displayName = uiCredentials.displayName;
24
-        if (email) {
25
-            connection.emuc.addEmailToPresence(email);
26
-        } else {
27
-            connection.emuc.addUserIdToPresence(uiCredentials.uid);
28
-        }
29
-        if (displayName) {
30
-            connection.emuc.addDisplayNameToPresence(displayName);
31
-        }
32
-    }
33
-
34
     if (connection.disco) {
20
     if (connection.disco) {
35
         // for chrome, add multistream cap
21
         // for chrome, add multistream cap
36
     }
22
     }
42
         connection.jingle.pc_constraints.optional.push({googIPv6: true});
28
         connection.jingle.pc_constraints.optional.push({googIPv6: true});
43
     }
29
     }
44
 
30
 
45
-    if(!password)
46
-        password = uiCredentials.password;
47
-
48
     var anonymousConnectionFailed = false;
31
     var anonymousConnectionFailed = false;
49
     connection.connect(jid, password, function (status, msg) {
32
     connection.connect(jid, password, function (status, msg) {
50
         console.log('Strophe status changed to',
33
         console.log('Strophe status changed to',
53
             if (config.useStunTurn) {
36
             if (config.useStunTurn) {
54
                 connection.jingle.getStunAndTurnCredentials();
37
                 connection.jingle.getStunAndTurnCredentials();
55
             }
38
             }
56
-            APP.UI.disableConnect();
57
 
39
 
58
             console.info("My Jabber ID: " + connection.jid);
40
             console.info("My Jabber ID: " + connection.jid);
59
 
41
 
150
      * @type {boolean}
132
      * @type {boolean}
151
      */
133
      */
152
     forceMuted: false,
134
     forceMuted: false,
153
-    start: function (uiCredentials) {
135
+    start: function () {
154
         setupEvents();
136
         setupEvents();
155
         initStrophePlugins();
137
         initStrophePlugins();
156
         registerListeners();
138
         registerListeners();
161
             window.location.search.indexOf("login=true") !== -1) {
143
             window.location.search.indexOf("login=true") !== -1) {
162
             configDomain = config.hosts.domain;
144
             configDomain = config.hosts.domain;
163
         }
145
         }
164
-        var jid = uiCredentials.jid || configDomain || window.location.hostname;
165
-        connect(jid, null, uiCredentials);
146
+        var jid = configDomain || window.location.hostname;
147
+        connect(jid, null);
166
     },
148
     },
167
     promptLogin: function () {
149
     promptLogin: function () {
168
         APP.UI.showLoginPopup(connect);
150
         APP.UI.showLoginPopup(connect);

Loading…
Cancel
Save