Browse Source

do not use xmpp module in AudioLevels

master
isymchych 10 years ago
parent
commit
c21c9ce1b8
3 changed files with 15 additions and 6 deletions
  1. 8
    0
      app.js
  2. 6
    4
      modules/UI/audio_levels/AudioLevels.js
  3. 1
    2
      modules/UI/toolbars/ToolbarToggler.js

+ 8
- 0
app.js View File

@@ -37,6 +37,14 @@ function createConference(connection, room) {
37 37
         setNickname: function (nickname) {
38 38
             // FIXME check if room is available etc.
39 39
             room.setDisplayName(nickname);
40
+        },
41
+
42
+        isModerator: function () {
43
+            return false;
44
+        },
45
+
46
+        myJid: function () {
47
+            return room.myUserId();
40 48
         }
41 49
     };
42 50
 }

+ 6
- 4
modules/UI/audio_levels/AudioLevels.js View File

@@ -109,10 +109,10 @@ var AudioLevels = (function(my) {
109 109
         drawContext.drawImage(canvasCache, 0, 0);
110 110
 
111 111
         if(resourceJid === AudioLevels.LOCAL_LEVEL) {
112
-            if(!APP.xmpp.myJid()) {
112
+            resourceJid = APP.conference.localId();
113
+            if (!resourceJid) {
113 114
                 return;
114 115
             }
115
-            resourceJid = APP.xmpp.myResource();
116 116
         }
117 117
 
118 118
         if(resourceJid === largeVideoResourceJid) {
@@ -224,10 +224,12 @@ var AudioLevels = (function(my) {
224 224
     function getVideoSpanId(resourceJid) {
225 225
         var videoSpanId = null;
226 226
         if (resourceJid === AudioLevels.LOCAL_LEVEL ||
227
-            (APP.xmpp.myResource() && resourceJid === APP.xmpp.myResource()))
227
+            (APP.conference.localId() && resourceJid === APP.conference.localId())) {
228 228
             videoSpanId = 'localVideoContainer';
229
-        else
229
+        }
230
+        else {
230 231
             videoSpanId = 'participant_' + resourceJid;
232
+        }
231 233
 
232 234
         return videoSpanId;
233 235
     }

+ 1
- 2
modules/UI/toolbars/ToolbarToggler.js View File

@@ -75,8 +75,7 @@ var ToolbarToggler = {
75 75
             toolbarTimeout = interfaceConfig.TOOLBAR_TIMEOUT;
76 76
         }
77 77
 
78
-        if (APP.xmpp.isModerator())
79
-        {
78
+        if (APP.conference.isModerator()) {
80 79
 //            TODO: Enable settings functionality.
81 80
 //                  Need to uncomment the settings button in index.html.
82 81
 //            $('#settingsButton').css({visibility:"visible"});

Loading…
Cancel
Save