瀏覽代碼

Removes join / leave notifications if the participant start audio muted.

j8
hristoterezov 10 年之前
父節點
當前提交
1d660e1883
共有 4 個文件被更改,包括 25 次插入5 次删除
  1. 1
    1
      index.html
  2. 12
    2
      libs/app.bundle.js
  3. 6
    2
      modules/UI/videolayout/VideoLayout.js
  4. 6
    0
      modules/members/MemberList.js

+ 1
- 1
index.html 查看文件

19
     <script src="libs/popover.js?v=1"></script><!-- bootstrap tooltip lib -->
19
     <script src="libs/popover.js?v=1"></script><!-- bootstrap tooltip lib -->
20
     <script src="libs/toastr.js?v=1"></script><!-- notifications lib -->
20
     <script src="libs/toastr.js?v=1"></script><!-- notifications lib -->
21
     <script src="interface_config.js?v=5"></script>
21
     <script src="interface_config.js?v=5"></script>
22
-    <script src="libs/app.bundle.js?v=73"></script>
22
+    <script src="libs/app.bundle.js?v=74"></script>
23
     <script src="analytics.js?v=1"></script><!-- google analytics plugin -->
23
     <script src="analytics.js?v=1"></script><!-- google analytics plugin -->
24
     <link rel="stylesheet" href="css/font.css?v=7"/>
24
     <link rel="stylesheet" href="css/font.css?v=7"/>
25
     <link rel="stylesheet" href="css/toastr.css?v=1">
25
     <link rel="stylesheet" href="css/toastr.css?v=1">

+ 12
- 2
libs/app.bundle.js 查看文件

7706
             container.id = 'mixedstream';
7706
             container.id = 'mixedstream';
7707
             container.className = 'videocontainer';
7707
             container.className = 'videocontainer';
7708
             remotes.appendChild(container);
7708
             remotes.appendChild(container);
7709
-            UIUtil.playSoundNotification('userJoined');
7709
+            if(!config.startAudioMuted ||
7710
+                config.startAudioMuted > APP.members.size())
7711
+                UIUtil.playSoundNotification('userJoined');
7710
         }
7712
         }
7711
 
7713
 
7712
         if (container) {
7714
         if (container) {
8227
             // Remove whole container
8229
             // Remove whole container
8228
             container.remove();
8230
             container.remove();
8229
 
8231
 
8230
-            UIUtil.playSoundNotification('userLeft');
8232
+            if(!config.startAudioMuted ||
8233
+                config.startAudioMuted > APP.members.size())
8234
+                UIUtil.playSoundNotification('userLeft');
8231
             VideoLayout.resizeThumbnails();
8235
             VideoLayout.resizeThumbnails();
8232
         }
8236
         }
8233
 
8237
 
10283
     },
10287
     },
10284
     removeListener: function (type, listener) {
10288
     removeListener: function (type, listener) {
10285
         eventEmitter.removeListener(type, listener);
10289
         eventEmitter.removeListener(type, listener);
10290
+    },
10291
+    size: function () {
10292
+        return Object.keys(members).length;
10293
+    },
10294
+    getMembers: function () {
10295
+        return members;
10286
     }
10296
     }
10287
 };
10297
 };
10288
 
10298
 

+ 6
- 2
modules/UI/videolayout/VideoLayout.js 查看文件

779
             container.id = 'mixedstream';
779
             container.id = 'mixedstream';
780
             container.className = 'videocontainer';
780
             container.className = 'videocontainer';
781
             remotes.appendChild(container);
781
             remotes.appendChild(container);
782
-            UIUtil.playSoundNotification('userJoined');
782
+            if(!config.startAudioMuted ||
783
+                config.startAudioMuted > APP.members.size())
784
+                UIUtil.playSoundNotification('userJoined');
783
         }
785
         }
784
 
786
 
785
         if (container) {
787
         if (container) {
1300
             // Remove whole container
1302
             // Remove whole container
1301
             container.remove();
1303
             container.remove();
1302
 
1304
 
1303
-            UIUtil.playSoundNotification('userLeft');
1305
+            if(!config.startAudioMuted ||
1306
+                config.startAudioMuted > APP.members.size())
1307
+                UIUtil.playSoundNotification('userLeft');
1304
             VideoLayout.resizeThumbnails();
1308
             VideoLayout.resizeThumbnails();
1305
         }
1309
         }
1306
 
1310
 

+ 6
- 0
modules/members/MemberList.js 查看文件

117
     },
117
     },
118
     removeListener: function (type, listener) {
118
     removeListener: function (type, listener) {
119
         eventEmitter.removeListener(type, listener);
119
         eventEmitter.removeListener(type, listener);
120
+    },
121
+    size: function () {
122
+        return Object.keys(members).length;
123
+    },
124
+    getMembers: function () {
125
+        return members;
120
     }
126
     }
121
 };
127
 };
122
 
128
 

Loading…
取消
儲存