Browse Source

Fixes issue with audio being muted for the participant who shares his screen(detected on Chrome 40 and probably above).

master
paweldomas 10 years ago
parent
commit
5433f80148
2 changed files with 6 additions and 4 deletions
  1. 1
    1
      index.html
  2. 5
    3
      videolayout.js

+ 1
- 1
index.html View File

@@ -47,7 +47,7 @@
47 47
     <script src="analytics.js?v=1"></script><!-- google analytics plugin -->
48 48
     <script src="rtp_sts.js?v=1"></script><!-- RTP stats processing -->
49 49
     <script src="local_sts.js?v=1"></script><!-- Local stats processing -->
50
-    <script src="videolayout.js?v=12"></script><!-- video ui -->
50
+    <script src="videolayout.js?v=13"></script><!-- video ui -->
51 51
     <script src="toolbar.js?v=6"></script><!-- toolbar ui -->
52 52
     <script src="toolbar_toggler.js?v=2"></script>
53 53
     <script src="canvas_util.js?v=1"></script><!-- canvas drawing utils -->

+ 5
- 3
videolayout.js View File

@@ -431,7 +431,8 @@ var VideoLayout = (function (my) {
431 431
             stream.onended = function () {
432 432
                 console.log('stream ended', this);
433 433
 
434
-                VideoLayout.removeRemoteStreamElement(stream, container);
434
+                VideoLayout.removeRemoteStreamElement(
435
+                    stream, isVideo, container);
435 436
 
436 437
                 if (peerJid)
437 438
                     ContactList.removeContact(peerJid);
@@ -481,15 +482,16 @@ var VideoLayout = (function (my) {
481 482
      * parent container.
482 483
      * 
483 484
      * @param stream the stream
485
+     * @param isVideo <tt>true</tt> if given <tt>stream</tt> is a video one.
484 486
      * @param container
485 487
      */
486
-    my.removeRemoteStreamElement = function (stream, container) {
488
+    my.removeRemoteStreamElement = function (stream, isVideo, container) {
487 489
         if (!container)
488 490
             return;
489 491
 
490 492
         var select = null;
491 493
         var removedVideoSrc = null;
492
-        if (stream.getVideoTracks().length > 0) {
494
+        if (isVideo) {
493 495
             select = $('#' + container.id + '>video');
494 496
             removedVideoSrc = select.get(0).src;
495 497
         }

Loading…
Cancel
Save