Browse Source

Adds an overlay to dim videos when showing displayname.

j8
damencho 9 years ago
parent
commit
7acda03024

+ 10
- 1
css/_videolayout_default.scss View File

@@ -62,7 +62,7 @@
62 62
 .videocontainer__toptoolbar {
63 63
     position: absolute;
64 64
     left: 0;
65
-    z-index: 1;
65
+    z-index: 3;
66 66
     width: 100%;
67 67
     box-sizing: border-box; // Includes the padding in the 100% width.
68 68
 }
@@ -81,6 +81,15 @@
81 81
     height: $thumbnailIndicatorSize + $toolbarPadding;
82 82
 }
83 83
 
84
+.videocontainer__overlay {
85
+    position: relative;
86
+    width: 100%;
87
+    height: 100%;
88
+    display: none;
89
+    background: rgba(0,0,0,.6);
90
+    z-index: 2;
91
+}
92
+
84 93
 #remoteVideos .videocontainer.videoContainerFocused,
85 94
 #remoteVideos .videocontainer:hover {
86 95
     cursor: hand;

+ 1
- 0
index.html View File

@@ -255,6 +255,7 @@
255 255
                     <audio id="localAudio" autoplay muted></audio>
256 256
                     <div class="videocontainer__toolbar"></div>
257 257
                     <div class="videocontainer__toptoolbar"></div>
258
+                    <div class="videocontainer__overlay"></div>
258 259
                 </span>
259 260
                 <audio id="userJoined" src="sounds/joined.wav" preload="auto"></audio>
260 261
                 <audio id="userLeft" src="sounds/left.wav" preload="auto"></audio>

+ 4
- 0
modules/UI/videolayout/RemoteVideo.js View File

@@ -576,6 +576,10 @@ RemoteVideo.createContainer = function (spanId) {
576 576
     toolbar.className = "videocontainer__toolbar";
577 577
     container.appendChild(toolbar);
578 578
 
579
+    let overlay = document.createElement('div');
580
+    overlay.className = "videocontainer__overlay";
581
+    container.appendChild(overlay);
582
+
579 583
     var remotes = document.getElementById('remoteVideos');
580 584
     return remotes.appendChild(container);
581 585
 };

+ 8
- 0
modules/UI/videolayout/SmallVideo.js View File

@@ -163,9 +163,17 @@ SmallVideo.prototype.bindHoverHandler = function () {
163 163
     var self = this;
164 164
     $(this.container).hover(
165 165
         function () {
166
+            if (!self.VideoLayout.isCurrentlyOnLarge(self.id)) {
167
+                $('#' + self.videoSpanId + ' .videocontainer__overlay')
168
+                    .removeClass("hide")
169
+                    .addClass("show-inline");
170
+            }
166 171
             self.showDisplayName(true);
167 172
         },
168 173
         function () {
174
+            $('#' + self.videoSpanId + ' .videocontainer__overlay')
175
+                .removeClass("show-inline")
176
+                .addClass("hide");
169 177
             // If the video has been "pinned" by the user we want to
170 178
             // keep the display name on place.
171 179
             if (!self.VideoLayout.isLargeVideoVisible() ||

Loading…
Cancel
Save