Pārlūkot izejas kodu

Merge pull request #679 from damencho/follow-me

Fixes follow-me to work without etherpad
j8
yanas 9 gadus atpakaļ
vecāks
revīzija
346ff889ea
2 mainītis faili ar 9 papildinājumiem un 4 dzēšanām
  1. 2
    1
      conference.js
  2. 7
    3
      modules/FollowMe.js

+ 2
- 1
conference.js Parādīt failu

1178
             if(config.debug)
1178
             if(config.debug)
1179
             {
1179
             {
1180
                 this.audioLevelsMap[id] = lvl;
1180
                 this.audioLevelsMap[id] = lvl;
1181
-                console.log("AudioLevel:" + id + "/" + lvl);
1181
+                if(config.debugAudioLevels)
1182
+                    console.log("AudioLevel:" + id + "/" + lvl);
1182
             }
1183
             }
1183
 
1184
 
1184
             APP.UI.setAudioLevel(id, lvl);
1185
             APP.UI.setAudioLevel(id, lvl);

+ 7
- 3
modules/FollowMe.js Parādīt failu

154
 
154
 
155
         this._nextOnStage(smallVideo, isPinned);
155
         this._nextOnStage(smallVideo, isPinned);
156
 
156
 
157
-        this._sharedDocumentToggled
158
-            .bind(this, this._UI.getSharedDocumentManager().isVisible());
159
-
157
+        // check whether shared document is enabled/initialized
158
+        if(this._UI.getSharedDocumentManager())
159
+            this._sharedDocumentToggled
160
+                .bind(this, this._UI.getSharedDocumentManager().isVisible());
160
     }
161
     }
161
 
162
 
162
     /**
163
     /**
352
     _onNextOnStage(id) {
353
     _onNextOnStage(id) {
353
         var clickId = null;
354
         var clickId = null;
354
         var pin;
355
         var pin;
356
+        // if there is an id which is not pinned we schedule it for pin only the
357
+        // first time
355
         if(typeof id !== 'undefined' && !VideoLayout.isPinned(id)) {
358
         if(typeof id !== 'undefined' && !VideoLayout.isPinned(id)) {
356
             clickId = id;
359
             clickId = id;
357
             pin = true;
360
             pin = true;
358
         }
361
         }
362
+        // if there is no id, but we have a pinned one, let's unpin
359
         else if (typeof id == 'undefined' && VideoLayout.getPinnedId()) {
363
         else if (typeof id == 'undefined' && VideoLayout.getPinnedId()) {
360
             clickId = VideoLayout.getPinnedId();
364
             clickId = VideoLayout.getPinnedId();
361
             pin = false;
365
             pin = false;

Notiek ielāde…
Atcelt
Saglabāt