Browse Source

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

master
paweldomas 11 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
     <script src="analytics.js?v=1"></script><!-- google analytics plugin -->
47
     <script src="analytics.js?v=1"></script><!-- google analytics plugin -->
48
     <script src="rtp_sts.js?v=1"></script><!-- RTP stats processing -->
48
     <script src="rtp_sts.js?v=1"></script><!-- RTP stats processing -->
49
     <script src="local_sts.js?v=1"></script><!-- Local stats processing -->
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
     <script src="toolbar.js?v=6"></script><!-- toolbar ui -->
51
     <script src="toolbar.js?v=6"></script><!-- toolbar ui -->
52
     <script src="toolbar_toggler.js?v=2"></script>
52
     <script src="toolbar_toggler.js?v=2"></script>
53
     <script src="canvas_util.js?v=1"></script><!-- canvas drawing utils -->
53
     <script src="canvas_util.js?v=1"></script><!-- canvas drawing utils -->

+ 5
- 3
videolayout.js View File

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

Loading…
Cancel
Save