Sfoglia il codice sorgente

Adds an overlay to dim videos when showing displayname.

j8
damencho 9 anni fa
parent
commit
7acda03024

+ 10
- 1
css/_videolayout_default.scss Vedi File

62
 .videocontainer__toptoolbar {
62
 .videocontainer__toptoolbar {
63
     position: absolute;
63
     position: absolute;
64
     left: 0;
64
     left: 0;
65
-    z-index: 1;
65
+    z-index: 3;
66
     width: 100%;
66
     width: 100%;
67
     box-sizing: border-box; // Includes the padding in the 100% width.
67
     box-sizing: border-box; // Includes the padding in the 100% width.
68
 }
68
 }
81
     height: $thumbnailIndicatorSize + $toolbarPadding;
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
 #remoteVideos .videocontainer.videoContainerFocused,
93
 #remoteVideos .videocontainer.videoContainerFocused,
85
 #remoteVideos .videocontainer:hover {
94
 #remoteVideos .videocontainer:hover {
86
     cursor: hand;
95
     cursor: hand;

+ 1
- 0
index.html Vedi File

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

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

576
     toolbar.className = "videocontainer__toolbar";
576
     toolbar.className = "videocontainer__toolbar";
577
     container.appendChild(toolbar);
577
     container.appendChild(toolbar);
578
 
578
 
579
+    let overlay = document.createElement('div');
580
+    overlay.className = "videocontainer__overlay";
581
+    container.appendChild(overlay);
582
+
579
     var remotes = document.getElementById('remoteVideos');
583
     var remotes = document.getElementById('remoteVideos');
580
     return remotes.appendChild(container);
584
     return remotes.appendChild(container);
581
 };
585
 };

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

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

Loading…
Annulla
Salva