Bladeren bron

Moves the sound notification code to be played when the participant joins / leaves the room instead of receiving add / remove stream event.

j8
hristoterezov 10 jaren geleden
bovenliggende
commit
01deadf078
4 gewijzigde bestanden met toevoegingen van 1387 en 1432 verwijderingen
  1. 1
    1
      index.html
  2. 1380
    1419
      libs/app.bundle.js
  3. 6
    0
      modules/UI/UI.js
  4. 0
    12
      modules/UI/videolayout/VideoLayout.js

+ 1
- 1
index.html Bestand weergeven

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

+ 1380
- 1419
libs/app.bundle.js
Diff onderdrukt omdat het te groot bestand
Bestand weergeven


+ 6
- 0
modules/UI/UI.js Bestand weergeven

@@ -458,6 +458,9 @@ function onMucMemberLeft(jid) {
458 458
     messageHandler.notify(displayName,'notify.somebody',
459 459
         'disconnected',
460 460
         'notify.disconnected');
461
+    if(!config.startAudioMuted ||
462
+        config.startAudioMuted > APP.members.size())
463
+        UIUtil.playSoundNotification('userLeft');
461 464
     // Need to call this with a slight delay, otherwise the element couldn't be
462 465
     // found for some reason.
463 466
     // XXX(gp) it works fine without the timeout for me (with Chrome 38).
@@ -552,6 +555,9 @@ function onMucMemberJoined(jid, id, displayName) {
552 555
         'connected',
553 556
         'notify.connected');
554 557
 
558
+    if(!config.startAudioMuted ||
559
+        config.startAudioMuted > APP.members.size())
560
+        UIUtil.playSoundNotification('userJoined');
555 561
     // Add Peer's container
556 562
     VideoLayout.ensurePeerContainerExists(jid,id);
557 563
 }

+ 0
- 12
modules/UI/videolayout/VideoLayout.js Bestand weergeven

@@ -27,12 +27,6 @@ var eventEmitter = null;
27 27
  */
28 28
 var focusedVideoInfo = null;
29 29
 
30
-/**
31
- * Indicates if we have muted our audio before the conference has started.
32
- * @type {boolean}
33
- */
34
-var preMuted = false;
35
-
36 30
 var mutedAudios = {};
37 31
 
38 32
 var flipXLocalVideo = true;
@@ -779,9 +773,6 @@ var VideoLayout = (function (my) {
779 773
             container.id = 'mixedstream';
780 774
             container.className = 'videocontainer';
781 775
             remotes.appendChild(container);
782
-            if(!config.startAudioMuted ||
783
-                config.startAudioMuted > APP.members.size())
784
-                UIUtil.playSoundNotification('userJoined');
785 776
         }
786 777
 
787 778
         if (container) {
@@ -1302,9 +1293,6 @@ var VideoLayout = (function (my) {
1302 1293
             // Remove whole container
1303 1294
             container.remove();
1304 1295
 
1305
-            if(!config.startAudioMuted ||
1306
-                config.startAudioMuted > APP.members.size())
1307
-                UIUtil.playSoundNotification('userLeft');
1308 1296
             VideoLayout.resizeThumbnails();
1309 1297
         }
1310 1298
 

Laden…
Annuleren
Opslaan