Browse Source

Fixes positioning issues with connection popover. Fixes some issues with removal of the connection popover.

j8
hristoterezov 11 years ago
parent
commit
ee7752dfe2
4 changed files with 51 additions and 24 deletions
  1. 0
    1
      css/videolayout_default.css
  2. 3
    3
      index.html
  3. 9
    3
      jitsipopover.js
  4. 39
    17
      videolayout.js

+ 0
- 1
css/videolayout_default.css View File

286
     position: absolute;
286
     position: absolute;
287
     color: #FFFFFF;
287
     color: #FFFFFF;
288
     top: 0;
288
     top: 0;
289
-    right: 23px;
290
     padding: 8px 5px;
289
     padding: 8px 5px;
291
     width: 25px;
290
     width: 25px;
292
     font-size: 8pt;
291
     font-size: 8pt;

+ 3
- 3
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=2"></script><!-- RTP stats processing -->
48
     <script src="rtp_sts.js?v=2"></script><!-- RTP stats processing -->
49
     <script src="local_sts.js?v=2"></script><!-- Local stats processing -->
49
     <script src="local_sts.js?v=2"></script><!-- Local stats processing -->
50
-    <script src="videolayout.js?v=16"></script><!-- video ui -->
50
+    <script src="videolayout.js?v=17"></script><!-- video ui -->
51
     <script src="connectionquality.js?v=1"></script>
51
     <script src="connectionquality.js?v=1"></script>
52
     <script src="toolbar.js?v=6"></script><!-- toolbar ui -->
52
     <script src="toolbar.js?v=6"></script><!-- toolbar ui -->
53
     <script src="toolbar_toggler.js?v=2"></script>
53
     <script src="toolbar_toggler.js?v=2"></script>
58
     <script src="roomname_generator.js?v=1"></script><!-- generator for random room names -->
58
     <script src="roomname_generator.js?v=1"></script><!-- generator for random room names -->
59
     <script src="keyboard_shortcut.js?v=2"></script>
59
     <script src="keyboard_shortcut.js?v=2"></script>
60
     <script src="tracking.js?v=1"></script><!-- tracking -->
60
     <script src="tracking.js?v=1"></script><!-- tracking -->
61
-    <script src="jitsipopover.js?v=2"></script>
61
+    <script src="jitsipopover.js?v=3"></script>
62
     <script src="message_handler.js?v=1"></script>
62
     <script src="message_handler.js?v=1"></script>
63
     <link href="//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css" rel="stylesheet">
63
     <link href="//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css" rel="stylesheet">
64
     <link rel="stylesheet" href="css/font.css?v=4"/>
64
     <link rel="stylesheet" href="css/font.css?v=4"/>
65
     <link rel="stylesheet" type="text/css" media="screen" href="css/main.css?v=26"/>
65
     <link rel="stylesheet" type="text/css" media="screen" href="css/main.css?v=26"/>
66
-    <link rel="stylesheet" type="text/css" media="screen" href="css/videolayout_default.css?v=12" id="videolayout_default"/>
66
+    <link rel="stylesheet" type="text/css" media="screen" href="css/videolayout_default.css?v=13" id="videolayout_default"/>
67
     <link rel="stylesheet" href="css/jquery-impromptu.css?v=4">
67
     <link rel="stylesheet" href="css/jquery-impromptu.css?v=4">
68
     <link rel="stylesheet" href="css/modaldialog.css?v=3">
68
     <link rel="stylesheet" href="css/modaldialog.css?v=3">
69
     <link rel="stylesheet" href="css/popup_menu.css?v=4">
69
     <link rel="stylesheet" href="css/popup_menu.css?v=4">

+ 9
- 3
jitsipopover.js View File

56
     JitsiPopover.prototype.hide = function () {
56
     JitsiPopover.prototype.hide = function () {
57
         if(!this.elementIsHovered && !this.popoverIsHovered && this.popoverShown)
57
         if(!this.elementIsHovered && !this.popoverIsHovered && this.popoverShown)
58
         {
58
         {
59
-            $(".jitsipopover").remove();
60
-            this.popoverShown = false;
61
-
59
+            this.forceHide();
62
         }
60
         }
63
     };
61
     };
64
 
62
 
63
+    /**
64
+     * Hides the popover
65
+     */
66
+    JitsiPopover.prototype.forceHide = function () {
67
+        $(".jitsipopover").remove();
68
+        this.popoverShown = false;
69
+    };
70
+
65
     /**
71
     /**
66
      * Creates the popover html
72
      * Creates the popover html
67
      */
73
      */

+ 39
- 17
videolayout.js View File

797
                     "top");
797
                     "top");
798
                 videoMutedSpan.appendChild(mutedIndicator);
798
                 videoMutedSpan.appendChild(mutedIndicator);
799
             }
799
             }
800
-            var audioMutedSpan = $('#' + videoSpanId + '>span.audioMuted');
801
-            videoMutedSpan = $('#' + videoSpanId + '>span.videoMuted');
802
-            videoMutedSpan.css({right: ((audioMutedSpan.length > 0)?'50px':'30px')});
800
+
801
+            VideoLayout.updateMutePosition(videoSpanId);
802
+
803
         }
803
         }
804
     };
804
     };
805
 
805
 
806
+    my.updateMutePosition = function (videoSpanId) {
807
+        var audioMutedSpan = $('#' + videoSpanId + '>span.audioMuted');
808
+        var connectionIndicator = $('#' + videoSpanId + '>div.connectionindicator');
809
+        var videoMutedSpan = $('#' + videoSpanId + '>span.videoMuted');
810
+        if(connectionIndicator.length > 0
811
+            && connectionIndicator[0].style.display != "none") {
812
+            audioMutedSpan.css({right: "23px"});
813
+            videoMutedSpan.css({right: ((audioMutedSpan.length > 0? 23 : 0) + 30) + "px"});
814
+        }
815
+        else
816
+        {
817
+            audioMutedSpan.css({right: "0px"});
818
+            videoMutedSpan.css({right: (audioMutedSpan.length > 0? 30 : 0) + "px"});
819
+        }
820
+    }
806
     /**
821
     /**
807
      * Shows audio muted indicator over small videos.
822
      * Shows audio muted indicator over small videos.
808
      * @param {string} isMuted
823
      * @param {string} isMuted
817
             }
832
             }
818
         }
833
         }
819
         else {
834
         else {
820
-            if(audioMutedSpan.length > 0 )
821
-                return;
822
-            audioMutedSpan = document.createElement('span');
823
-            audioMutedSpan.className = 'audioMuted';
824
-            Util.setTooltip(audioMutedSpan,
825
-                "Participant is muted",
826
-                "top");
835
+            if(audioMutedSpan.length == 0 ) {
836
+                audioMutedSpan = document.createElement('span');
837
+                audioMutedSpan.className = 'audioMuted';
838
+                Util.setTooltip(audioMutedSpan,
839
+                    "Participant is muted",
840
+                    "top");
827
 
841
 
828
-            $('#' + videoSpanId)[0].appendChild(audioMutedSpan);
842
+                $('#' + videoSpanId)[0].appendChild(audioMutedSpan);
843
+                var mutedIndicator = document.createElement('i');
844
+                mutedIndicator.className = 'icon-mic-disabled';
845
+                audioMutedSpan.appendChild(mutedIndicator);
829
 
846
 
830
-            var mutedIndicator = document.createElement('i');
831
-            mutedIndicator.className = 'icon-mic-disabled';
832
-            audioMutedSpan.appendChild(mutedIndicator);
847
+            }
848
+            VideoLayout.updateMutePosition(videoSpanId);
833
         }
849
         }
834
     };
850
     };
835
 
851
 
1683
      */
1699
      */
1684
     ConnectionIndicator.prototype.remove = function()
1700
     ConnectionIndicator.prototype.remove = function()
1685
     {
1701
     {
1686
-        this.popover.hide();
1687
         this.connectionIndicatorContainer.remove();
1702
         this.connectionIndicatorContainer.remove();
1703
+        this.popover.forceHide();
1688
 
1704
 
1689
     };
1705
     };
1690
 
1706
 
1698
         if(percent === null)
1714
         if(percent === null)
1699
         {
1715
         {
1700
             this.connectionIndicatorContainer.style.display = "none";
1716
             this.connectionIndicatorContainer.style.display = "none";
1717
+            this.popover.forceHide();
1701
             return;
1718
             return;
1702
         }
1719
         }
1703
         else
1720
         else
1704
         {
1721
         {
1705
-            this.connectionIndicatorContainer.style.display = "block";
1722
+            if(this.connectionIndicatorContainer.style.display == "none") {
1723
+                this.connectionIndicatorContainer.style.display = "block";
1724
+                VideoLayout.updateMutePosition(this.videoContainer.id);
1725
+            }
1706
         }
1726
         }
1707
         this.bandwidth = object.bandwidth;
1727
         this.bandwidth = object.bandwidth;
1708
         this.bitrate = object.bitrate;
1728
         this.bitrate = object.bitrate;
1742
      * Hides the popover
1762
      * Hides the popover
1743
      */
1763
      */
1744
     ConnectionIndicator.prototype.hide = function () {
1764
     ConnectionIndicator.prototype.hide = function () {
1745
-        this.popover.hide();
1765
+        this.popover.forceHide();
1746
     };
1766
     };
1747
 
1767
 
1748
     /**
1768
     /**
1750
      */
1770
      */
1751
     ConnectionIndicator.prototype.hideIndicator = function () {
1771
     ConnectionIndicator.prototype.hideIndicator = function () {
1752
         this.connectionIndicatorContainer.style.display = "none";
1772
         this.connectionIndicatorContainer.style.display = "none";
1773
+        if(this.popover)
1774
+            this.popover.forceHide();
1753
     };
1775
     };
1754
 
1776
 
1755
     /**
1777
     /**

Loading…
Cancel
Save