瀏覽代碼

Merge pull request #679 from damencho/follow-me

Fixes follow-me to work without etherpad
j8
yanas 9 年之前
父節點
當前提交
346ff889ea
共有 2 個檔案被更改,包括 9 行新增4 行删除
  1. 2
    1
      conference.js
  2. 7
    3
      modules/FollowMe.js

+ 2
- 1
conference.js 查看文件

@@ -1178,7 +1178,8 @@ export default {
1178 1178
             if(config.debug)
1179 1179
             {
1180 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 1185
             APP.UI.setAudioLevel(id, lvl);

+ 7
- 3
modules/FollowMe.js 查看文件

@@ -154,9 +154,10 @@ class FollowMe {
154 154
 
155 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,10 +353,13 @@ class FollowMe {
352 353
     _onNextOnStage(id) {
353 354
         var clickId = null;
354 355
         var pin;
356
+        // if there is an id which is not pinned we schedule it for pin only the
357
+        // first time
355 358
         if(typeof id !== 'undefined' && !VideoLayout.isPinned(id)) {
356 359
             clickId = id;
357 360
             pin = true;
358 361
         }
362
+        // if there is no id, but we have a pinned one, let's unpin
359 363
         else if (typeof id == 'undefined' && VideoLayout.getPinnedId()) {
360 364
             clickId = VideoLayout.getPinnedId();
361 365
             pin = false;

Loading…
取消
儲存