Browse Source

Fixes issue with video mute.

j8
hristoterezov 10 years ago
parent
commit
0696fb2c5a
5 changed files with 12 additions and 12 deletions
  1. 2
    2
      index.html
  2. 2
    3
      libs/modules/RTC.bundle.js
  3. 3
    2
      libs/modules/UI.bundle.js
  4. 2
    3
      modules/RTC/RTC.js
  5. 3
    2
      modules/UI/videolayout/VideoLayout.js

+ 2
- 2
index.html View File

@@ -31,9 +31,9 @@
31 31
     <script src="service/RTC/MediaStreamTypes.js?v=1"></script>
32 32
     <script src="libs/modules/simulcast.bundle.js?v=2"></script>
33 33
     <script src="libs/modules/connectionquality.bundle.js?v=1"></script>
34
-    <script src="libs/modules/UI.bundle.js?v=3"></script>
34
+    <script src="libs/modules/UI.bundle.js?v=4"></script>
35 35
     <script src="libs/modules/statistics.bundle.js?v=1"></script>
36
-    <script src="libs/modules/RTC.bundle.js?v=2"></script>
36
+    <script src="libs/modules/RTC.bundle.js?v=3"></script>
37 37
     <script src="muc.js?v=17"></script><!-- simple MUC library -->
38 38
     <script src="estos_log.js?v=2"></script><!-- simple stanza logger -->
39 39
     <script src="desktopsharing.js?v=3"></script><!-- desktop sharing -->

+ 2
- 3
libs/modules/RTC.bundle.js View File

@@ -500,9 +500,8 @@ var RTC = {
500 500
         if(!stream)
501 501
             return false;
502 502
 
503
-        var isMuted = (value === "true");
504
-        if (isMuted != stream.muted) {
505
-            stream.setMute(isMuted);
503
+        if (value != stream.muted) {
504
+            stream.setMute(value);
506 505
             return true;
507 506
         }
508 507
         return false;

+ 3
- 2
libs/modules/UI.bundle.js View File

@@ -5814,7 +5814,8 @@ var VideoLayout = (function (my) {
5814 5814
     /**
5815 5815
      * On video muted event.
5816 5816
      */
5817
-    $(document).bind('videomuted.muc', function (event, jid, isMuted) {
5817
+    $(document).bind('videomuted.muc', function (event, jid, value) {
5818
+        var isMuted = (value === "true");
5818 5819
         if(!RTC.muteRemoteVideoStream(jid, isMuted))
5819 5820
             return;
5820 5821
 
@@ -5828,7 +5829,7 @@ var VideoLayout = (function (my) {
5828 5829
         }
5829 5830
 
5830 5831
         if (videoSpanId)
5831
-            VideoLayout.showVideoIndicator(videoSpanId, isMuted);
5832
+            VideoLayout.showVideoIndicator(videoSpanId, value);
5832 5833
     });
5833 5834
 
5834 5835
     /**

+ 2
- 3
modules/RTC/RTC.js View File

@@ -114,9 +114,8 @@ var RTC = {
114 114
         if(!stream)
115 115
             return false;
116 116
 
117
-        var isMuted = (value === "true");
118
-        if (isMuted != stream.muted) {
119
-            stream.setMute(isMuted);
117
+        if (value != stream.muted) {
118
+            stream.setMute(value);
120 119
             return true;
121 120
         }
122 121
         return false;

+ 3
- 2
modules/UI/videolayout/VideoLayout.js View File

@@ -1637,7 +1637,8 @@ var VideoLayout = (function (my) {
1637 1637
     /**
1638 1638
      * On video muted event.
1639 1639
      */
1640
-    $(document).bind('videomuted.muc', function (event, jid, isMuted) {
1640
+    $(document).bind('videomuted.muc', function (event, jid, value) {
1641
+        var isMuted = (value === "true");
1641 1642
         if(!RTC.muteRemoteVideoStream(jid, isMuted))
1642 1643
             return;
1643 1644
 
@@ -1651,7 +1652,7 @@ var VideoLayout = (function (my) {
1651 1652
         }
1652 1653
 
1653 1654
         if (videoSpanId)
1654
-            VideoLayout.showVideoIndicator(videoSpanId, isMuted);
1655
+            VideoLayout.showVideoIndicator(videoSpanId, value);
1655 1656
     });
1656 1657
 
1657 1658
     /**

Loading…
Cancel
Save