Browse Source

HD label added when the large video is in HD.

master
yanas 9 years ago
parent
commit
72454ff279

+ 1
- 0
config.js View File

@@ -70,4 +70,5 @@ var config = {
70 70
     'During that time service will not be available. ' +
71 71
     'Apologise for inconvenience.',*/
72 72
     disableThirdPartyRequests: false,
73
+    minHDResolution: 540
73 74
 };

+ 16
- 8
css/videolayout_default.css View File

@@ -44,7 +44,7 @@
44 44
     /*margin-right: 1px;*/
45 45
 }
46 46
 
47
-#remoteVideos .videocontainer:hover,
47
+/*#remoteVideos .videocontainer:hover,*/
48 48
 #remoteVideos .videocontainer.videoContainerFocused {
49 49
     cursor: hand;
50 50
     /* transform:scale(1.08, 1.08);
@@ -58,8 +58,7 @@
58 58
 }
59 59
 
60 60
 #remoteVideos .videocontainer:hover {
61
-    box-shadow:  inset 0 0 10px #FFFFFF, 0 0 10px #FFFFFF;
62
-    border: 1px solid #FFFFFF;
61
+    border: 1px solid #c1c1c1;
63 62
 }
64 63
 
65 64
 #remoteVideos .videocontainer.videoContainerFocused {
@@ -68,15 +67,12 @@
68 67
 }
69 68
 
70 69
 #remoteVideos .videocontainer.videoContainerFocused:hover {
71
-    box-shadow: inset 0 0 5px #FFFFFF, 0 0 10px #FFFFFF, inset 0 0 60px #006d91;
72
-    border: 1px solid #FFFFFF;
70
+    box-shadow: inset 0 0 5px #c1c1c1, 0 0 10px #c1c1c1, inset 0 0 60px #006d91;
71
+    border: 1px solid #c1c1c1;
73 72
 }
74 73
 
75 74
 #localVideoWrapper {
76 75
     display:inline-block;
77
-    /*-webkit-mask-box-image: url(../images/videomask.svg);*/
78
-    /*border-radius:1px !important;*/
79
-    /*border: 0px !important;*/
80 76
 }
81 77
 
82 78
 /* With TemasysWebRTC plugin <object/> element is used
@@ -431,6 +427,7 @@
431 427
     border-radius: 100px;
432 428
     z-index: 3;
433 429
     visibility: inherit;
430
+    background-color: #000000;
434 431
 }
435 432
 
436 433
 .userAvatar {
@@ -493,4 +490,15 @@
493 490
                     0px 1px 1px rgba(0,0,0,0.3),
494 491
                     1px 0px 1px rgba(0,0,0,0.3),
495 492
                     0px 0px 1px rgba(0,0,0,0.3);
493
+}
494
+
495
+#videoResolutionLabel {
496
+    display: none;
497
+    position: absolute;
498
+    top: 5px;
499
+    right: 5px;
500
+    background: rgba(0,0,0,.5);
501
+    padding: 10px;
502
+    color: rgba(255,255,255,.5);
503
+    z-index: 10000;
496 504
 }

+ 1
- 0
index.html View File

@@ -153,6 +153,7 @@
153 153
                     <video id="largeVideo" muted="true" autoplay></video>
154 154
                 </div>
155 155
                 <span id="videoConnectionMessage"></span>
156
+                <span id="videoResolutionLabel">HD</span>
156 157
             </div>
157 158
 
158 159
             <div id="remoteVideos">

+ 33
- 2
modules/UI/videolayout/ConnectionIndicator.js View File

@@ -1,6 +1,7 @@
1
-/* global APP, $ */
1
+/* global APP, $, config */
2 2
 /* jshint -W101 */
3 3
 import JitsiPopover from "../util/JitsiPopover";
4
+import VideoLayout from "./VideoLayout";
4 5
 
5 6
 /**
6 7
  * Constructs new connection indicator.
@@ -14,6 +15,7 @@ function ConnectionIndicator(videoContainer, id) {
14 15
     this.bitrate = null;
15 16
     this.showMoreValue = false;
16 17
     this.resolution = null;
18
+    this.isResolutionHD = null;
17 19
     this.transport = [];
18 20
     this.popover = null;
19 21
     this.id = id;
@@ -292,7 +294,6 @@ ConnectionIndicator.prototype.remove = function() {
292 294
  */
293 295
 ConnectionIndicator.prototype.updateConnectionQuality =
294 296
     function (percent, object) {
295
-
296 297
     if (percent === null) {
297 298
         this.connectionIndicatorContainer.style.display = "none";
298 299
         this.popover.forceHide();
@@ -316,6 +317,10 @@ ConnectionIndicator.prototype.updateConnectionQuality =
316 317
                 ConnectionIndicator.connectionQualityValues[quality];
317 318
         }
318 319
     }
320
+    if (object.isResolutionHD) {
321
+        this.isResolutionHD = object.isResolutionHD;
322
+    }
323
+    this.updateResolutionIndicator();
319 324
     this.updatePopoverData();
320 325
 };
321 326
 
@@ -325,6 +330,7 @@ ConnectionIndicator.prototype.updateConnectionQuality =
325 330
  */
326 331
 ConnectionIndicator.prototype.updateResolution = function (resolution) {
327 332
     this.resolution = resolution;
333
+    this.updateResolutionIndicator();
328 334
     this.updatePopoverData();
329 335
 };
330 336
 
@@ -354,4 +360,29 @@ ConnectionIndicator.prototype.hideIndicator = function () {
354 360
         this.popover.forceHide();
355 361
 };
356 362
 
363
+/**
364
+ * Updates the resolution indicator.
365
+ */
366
+ConnectionIndicator.prototype.updateResolutionIndicator = function () {
367
+
368
+    if (this.id !== null
369
+        && VideoLayout.isCurrentlyOnLarge(this.id)) {
370
+
371
+        let showResolutionLabel = false;
372
+
373
+        if (this.isResolutionHD !== null)
374
+            showResolutionLabel = this.isResolutionHD;
375
+        else if (this.resolution !== null) {
376
+            let resolutions = this.resolution || {};
377
+            Object.keys(resolutions).map(function (ssrc) {
378
+                    let {width, height} = resolutions[ssrc];
379
+                    if (height >= config.minHDResolution)
380
+                        showResolutionLabel = true;
381
+                });
382
+        }
383
+
384
+        VideoLayout.updateResolutionLabel(showResolutionLabel);
385
+    }
386
+};
387
+
357 388
 export default ConnectionIndicator;

+ 1
- 1
modules/UI/videolayout/FilmStrip.js View File

@@ -76,7 +76,7 @@ const FilmStrip = {
76 76
         let maxHeight
77 77
             // If the MAX_HEIGHT property hasn't been specified
78 78
             // we have the static value.
79
-            = Math.min( interfaceConfig.FILM_STRIP_MAX_HEIGHT || 160,
79
+            = Math.min( interfaceConfig.FILM_STRIP_MAX_HEIGHT || 120,
80 80
                         availableHeight);
81 81
 
82 82
         availableHeight

+ 13
- 0
modules/UI/videolayout/VideoLayout.js View File

@@ -998,6 +998,19 @@ var VideoLayout = {
998 998
      */
999 999
     getLargeVideo () {
1000 1000
         return largeVideo;
1001
+    },
1002
+
1003
+    /**
1004
+     * Updates the resolution label, indicating to the user that the large
1005
+     * video stream is currently HD.
1006
+     */
1007
+    updateResolutionLabel(isResolutionHD) {
1008
+        let videoResolutionLabel = $("#videoResolutionLabel");
1009
+
1010
+        if (isResolutionHD && !videoResolutionLabel.is(":visible"))
1011
+            videoResolutionLabel.css({display: "block"});
1012
+        else if (!isResolutionHD && videoResolutionLabel.is(":visible"))
1013
+            videoResolutionLabel.css({display: "none"});
1001 1014
     }
1002 1015
 };
1003 1016
 

Loading…
Cancel
Save