Quellcode durchsuchen

Merge pull request #550 from jitsi/polish-ui

Polish ui
j8
bgrozev vor 9 Jahren
Ursprung
Commit
3f62b479da

+ 1
- 0
config.js Datei anzeigen

@@ -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
+    minHDHeight: 540
73 74
 };

+ 0
- 2
css/chat.css Datei anzeigen

@@ -95,8 +95,6 @@
95 95
 #unreadMessages {
96 96
     font-size: 8px;
97 97
     position: absolute;
98
-    left: 46%;
99
-    top: 27%
100 98
 }
101 99
 
102 100
 #bottomUnreadMessages {

+ 28
- 27
css/main.css Datei anzeigen

@@ -9,7 +9,7 @@ html, body{
9 9
     color: #424242;
10 10
     font-family:'Helvetica Neue', Helvetica, sans-serif;
11 11
     font-weight: 400;
12
-    background: #000000;
12
+    background: #4E4E4E;
13 13
     overflow: hidden;
14 14
 }
15 15
 
@@ -38,16 +38,6 @@ html, body{
38 38
     position: relative;
39 39
 }
40 40
 
41
-#toolbar a.button::after {
42
-    content: '';
43
-    display: inline-block;
44
-    position: absolute;
45
-    left: 40px;
46
-    width: 1px;
47
-    height: 20px;
48
-    background: #373737;
49
-}
50
-
51 41
 #toolbar a.button:last-child::after {
52 42
     content: none;
53 43
 }
@@ -56,14 +46,16 @@ html, body{
56 46
     display: inline-block;
57 47
     position: relative;
58 48
     color: #FFFFFF;
59
-    top: 0;
60
-    padding: 10px 0;
49
+    top:0px;
50
+    padding-top: 10px;
61 51
     width: 38px;
52
+    height: 28px;
62 53
     cursor: pointer;
63 54
     text-align: center;
64 55
     text-shadow: 0 1px 0 rgba(255,255,255,.3), 0 -1px 0 rgba(0,0,0,.6);
65 56
     z-index: 1;
66 57
     font-size: 1.22em !important;
58
+    vertical-align: middle;
67 59
 }
68 60
 
69 61
 .toolbar_span>span {
@@ -104,13 +96,13 @@ html, body{
104 96
 #numberOfParticipants {
105 97
     position: absolute;
106 98
     top: 0px;
107
-    right: -1;
99
+    right: -1px;
108 100
     color: white;
109 101
     width: 13px;
110 102
     height: 13px;
111 103
     line-height: 13px;
112 104
     font-weight: bold;
113
-    border-radius: 2px;
105
+    border-radius: 1px;
114 106
     font-size: 11px;
115 107
     text-shadow: -1px 0 black, 0 1px black, 1px 0 black, 0 -1px black;
116 108
 }
@@ -119,6 +111,19 @@ html, body{
119 111
     color: #00ccff;
120 112
 }
121 113
 
114
+#toolbar {
115
+    display:inline-block;
116
+    position:relative;
117
+    top:5px;
118
+    margin-left:auto;
119
+    margin-right:auto;
120
+    height:38px;
121
+    width:auto;
122
+    background-color: rgba(0,0,0,0.5);
123
+    border-radius: 1px;
124
+    pointer-events: auto;
125
+}
126
+
122 127
 #toolbar_button_record {
123 128
     -webkit-transition: all .5s ease-in-out;
124 129
     -moz-transition: all .5s ease-in-out;
@@ -142,13 +147,10 @@ html, body{
142 147
 
143 148
 a.button:hover,
144 149
 a.bottomToolbarButton:hover {
145
-    top: 0px;
146 150
     cursor: pointer;
147 151
     background: rgba(255, 255, 255, 0.1);
148
-    border-radius: 6px;
149
-    background-clip: padding-box;
150
-    -webkit-border-radius: 6px;
151
-    -webkit-background-clip: padding-box;
152
+    border-radius: 1px;
153
+    -webkit-border-radius: 1px;
152 154
 }
153 155
 
154 156
 .no-fa-video-camera, .fa-microphone-slash {
@@ -158,7 +160,7 @@ a.bottomToolbarButton:hover {
158 160
 .header_button_separator {
159 161
     display: inline-block;
160 162
     position:relative;
161
-    top: 5;
163
+    top: 5px;
162 164
     width: 1px;
163 165
     height: 20px;
164 166
     background: #373737;
@@ -167,7 +169,7 @@ a.bottomToolbarButton:hover {
167 169
 .bottom_button_separator {
168 170
     display: inline-block;
169 171
     position: relative;
170
-    left: 5;
172
+    left: 5px;
171 173
     width: 20px;
172 174
     height: 1px;
173 175
     background: #373737;
@@ -211,7 +213,7 @@ button {
211 213
     height: 35px;
212 214
     padding: 0 1em 0 2em;
213 215
     position: relative;
214
-    border-radius: 3px;
216
+    border-radius: 1px;
215 217
     font-weight: bold;
216 218
     color: #fff;
217 219
     line-height: 35px;
@@ -273,10 +275,9 @@ div.feedbackButton:hover {
273 275
     margin-right: 5px;
274 276
     bottom: 40px;
275 277
     width: 29px;
276
-    border-radius: 6px;
278
+    border-radius: 1px;
277 279
     color: #FFF;
278
-    border: 1px solid rgba(256, 256, 256, 0.2);
279
-    background: rgba(0,0,0,0.8);
280
+    background: rgba(0,0,0,0.5);
280 281
     z-index: 6; /*+1 from #remoteVideos*/
281 282
 }
282 283
 
@@ -350,7 +351,7 @@ div.feedbackButton:hover {
350 351
 }
351 352
 
352 353
 #toast-container.notification-bottom-right {
353
-    bottom: 120px;
354
+    bottom: 140px;
354 355
     right: 5px;
355 356
 }
356 357
 

+ 2
- 2
css/popup_menu.css Datei anzeigen

@@ -13,7 +13,7 @@ ul.popupmenu {
13 13
     width: 100px;
14 14
     background-color: rgba(0,0,0,0.9);
15 15
     border: 1px solid rgba(256, 256, 256, 0.2);
16
-    border-radius:8px;
16
+    border-radius:3px;
17 17
 }
18 18
 
19 19
 ul.popupmenu:after {
@@ -31,7 +31,7 @@ ul.popupmenu li {
31 31
 
32 32
 ul.popupmenu li:hover {
33 33
     background-color: rgba(256, 256, 256, .2);
34
-    border-radius:6px;
34
+    border-radius:3px;
35 35
 }
36 36
 
37 37
 /*Link Appearance*/

+ 36
- 41
css/videolayout_default.css Datei anzeigen

@@ -21,6 +21,7 @@
21 21
     z-index: 5;
22 22
     transition: bottom 2s;
23 23
     overflow: visible !important;
24
+    font-size: 0pt; /*!!!Removes the gap between the local video container and the remote videos.*/
24 25
 }
25 26
 
26 27
 #remotevideos.hidden {
@@ -38,12 +39,12 @@
38 39
     display: none;
39 40
     background-color: black;
40 41
     background-size: contain;
41
-    border-radius:8px;
42
-    border: 2px solid #212425;
43
-    margin-right: 3px;
42
+    border-radius:1px;
43
+    border: 1px solid #212425;
44
+    /*margin-right: 1px;*/
44 45
 }
45 46
 
46
-#remoteVideos .videocontainer:hover,
47
+/*#remoteVideos .videocontainer:hover,*/
47 48
 #remoteVideos .videocontainer.videoContainerFocused {
48 49
     cursor: hand;
49 50
     /* transform:scale(1.08, 1.08);
@@ -57,25 +58,21 @@
57 58
 }
58 59
 
59 60
 #remoteVideos .videocontainer:hover {
60
-    box-shadow:  inset 0 0 10px #FFFFFF, 0 0 10px #FFFFFF;
61
-    border: 2px solid #FFFFFF;
61
+    border: 1px solid #c1c1c1;
62 62
 }
63 63
 
64 64
 #remoteVideos .videocontainer.videoContainerFocused {
65 65
     box-shadow: inset 0 0 28px #006d91;
66
-    border: 2px solid #006d91;
66
+    border: 1px solid #006d91;
67 67
 }
68 68
 
69 69
 #remoteVideos .videocontainer.videoContainerFocused:hover {
70
-    box-shadow: inset 0 0 5px #FFFFFF, 0 0 10px #FFFFFF, inset 0 0 60px #006d91;
71
-    border: 2px solid #FFFFFF;
70
+    box-shadow: inset 0 0 5px #c1c1c1, 0 0 10px #c1c1c1, inset 0 0 60px #006d91;
71
+    border: 1px solid #c1c1c1;
72 72
 }
73 73
 
74 74
 #localVideoWrapper {
75 75
     display:inline-block;
76
-    -webkit-mask-box-image: url(../images/videomask.svg);
77
-    border-radius:4px !important;
78
-    border: 0px !important;
79 76
 }
80 77
 
81 78
 /* With TemasysWebRTC plugin <object/> element is used
@@ -83,7 +80,8 @@
83 80
 #remoteVideos .videocontainer>video,
84 81
 #remoteVideos .videocontainer>object {
85 82
     cursor: hand;
86
-    border-radius:4px;
83
+    border-radius:1px;
84
+    object-fit: cover;
87 85
 }
88 86
 
89 87
 .flipVideoX {
@@ -96,7 +94,8 @@
96 94
 #localVideoWrapper>video,
97 95
 #localVideoWrapper>object {
98 96
     cursor: hand;
99
-    border-radius:4px !important;
97
+    border-radius:1px !important;
98
+    object-fit: cover;
100 99
 }
101 100
 
102 101
 #largeVideo,
@@ -177,7 +176,7 @@
177 176
     overflow: hidden;
178 177
     white-space: nowrap;
179 178
     z-index: 2;
180
-    border-radius:20px;
179
+    border-radius:3px;
181 180
 }
182 181
 
183 182
 .videocontainer>span.status {
@@ -196,7 +195,7 @@
196 195
     overflow: hidden;
197 196
     white-space: nowrap;
198 197
     z-index: 2;
199
-    border-radius:20px;
198
+    border-radius:3px;
200 199
 }
201 200
 
202 201
 .connectionindicator
@@ -360,22 +359,6 @@
360 359
     pointer-events: none;
361 360
 }
362 361
 
363
-#toolbar {
364
-    display:inline-block;
365
-    position:relative;
366
-    margin-top:5px;
367
-    margin-left:auto;
368
-    margin-right:auto;
369
-    padding-left:2px;
370
-    padding-right:2px;
371
-    height:38px;
372
-    width:auto;
373
-    background-color: rgba(0,0,0,0.8);
374
-    border: 1px solid rgba(256, 256, 256, 0.2);
375
-    border-radius: 6px;
376
-    pointer-events: auto;
377
-}
378
-
379 362
 #subject {
380 363
     position: relative;
381 364
     z-index: 3;
@@ -395,14 +378,14 @@
395 378
     display: inline-block;
396 379
     position: absolute;
397 380
     z-index: 0;
398
-    border-radius:10px;
381
+    border-radius:1px;
399 382
     pointer-events: none;
400 383
 }
401 384
 
402 385
 #dominantSpeaker {
403 386
     visibility: hidden;
404
-    width: 150px;
405
-    height: 150px;
387
+    width: 300px;
388
+    height: 300px;
406 389
     margin: auto;
407 390
     overflow: hidden;
408 391
     position: relative;
@@ -421,21 +404,22 @@
421 404
 }
422 405
 
423 406
 #dominantSpeakerAvatar {
424
-    width: 100px;
425
-    height: 100px;
426
-    top: 25px;
407
+    width: 200px;
408
+    height: 200px;
409
+    top: 50px;
427 410
     margin: auto;
428 411
     position: relative;
429
-    border-radius: 50px;
412
+    border-radius: 100px;
430 413
     z-index: 3;
431 414
     visibility: inherit;
415
+    background-color: #000000;
432 416
 }
433 417
 
434 418
 .userAvatar {
435 419
     height: 100%;
436 420
     position: absolute;
437
-    left: 35px;
438
-    border-radius: 200px;
421
+    left: 0;
422
+    border-radius: 2px;
439 423
 }
440 424
 
441 425
 .sharedVideoAvatar {
@@ -491,4 +475,15 @@
491 475
                     0px 1px 1px rgba(0,0,0,0.3),
492 476
                     1px 0px 1px rgba(0,0,0,0.3),
493 477
                     0px 0px 1px rgba(0,0,0,0.3);
478
+}
479
+
480
+#videoResolutionLabel {
481
+    display: none;
482
+    position: absolute;
483
+    top: 5px;
484
+    right: 5px;
485
+    background: rgba(0,0,0,.5);
486
+    padding: 10px;
487
+    color: rgba(255,255,255,.5);
488
+    z-index: 10000;
494 489
 }

+ 5
- 5
css/welcome_page.css Datei anzeigen

@@ -42,11 +42,11 @@
42 42
 }
43 43
 
44 44
 #enter_room_form {
45
-    border-radius: 10px;
45
+    border-radius: 1px;
46 46
     background-color: #FFFFFF;
47 47
     border: none;
48
-    -moz-border-radius: 10px;
49
-    -webkit-border-radius: 10px;
48
+    -moz-border-radius: 1px;
49
+    -webkit-border-radius: 1px;
50 50
     -webkit-appearance: none;
51 51
     height: 55px;
52 52
     box-shadow: none;
@@ -82,8 +82,8 @@
82 82
     width: 73px;
83 83
     height: 45px;
84 84
     background-color: #16a8fe;
85
-    moz-border-radius: 10px;
86
-    -webkit-border-radius: 10px;
85
+    moz-border-radius: 1px;
86
+    -webkit-border-radius: 1px;
87 87
     color: #ffffff;
88 88
     font-weight: 600;
89 89
     border: none;

+ 1
- 0
index.html Datei anzeigen

@@ -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">

+ 2
- 3
interface_config.js Datei anzeigen

@@ -1,6 +1,6 @@
1 1
 var interfaceConfig = {
2 2
     CANVAS_EXTRA: 104,
3
-    CANVAS_RADIUS: 7,
3
+    CANVAS_RADIUS: 0,
4 4
     SHADOW_COLOR: '#ffffff',
5 5
     INITIAL_TOOLBAR_TIMEOUT: 20000,
6 6
     TOOLBAR_TIMEOUT: 4000,
@@ -14,7 +14,6 @@ var interfaceConfig = {
14 14
     GENERATE_ROOMNAMES_ON_WELCOME_PAGE: true,
15 15
     APP_NAME: "Jitsi Meet",
16 16
     INVITATION_POWERED_BY: true,
17
-    DOMINANT_SPEAKER_AVATAR_SIZE: 100,
18 17
     TOOLBAR_BUTTONS: ['authentication', 'microphone', 'camera', 'desktop',
19 18
         'recording', 'security', 'invite', 'chat', 'etherpad', 'sharedvideo',
20 19
         'fullscreen', 'sip', 'dialpad', 'settings', 'hangup', 'filmstrip',
@@ -30,5 +29,5 @@ var interfaceConfig = {
30 29
     filmStripOnly: false,
31 30
     RANDOM_AVATAR_URL_PREFIX: false,
32 31
     RANDOM_AVATAR_URL_SUFFIX: false,
33
-    FILM_STRIP_MAX_HEIGHT: 160
32
+    FILM_STRIP_MAX_HEIGHT: 120
34 33
 };

+ 32
- 14
modules/UI/audio_levels/AudioLevels.js Datei anzeigen

@@ -8,13 +8,16 @@ const LOCAL_LEVEL = 'local';
8 8
 
9 9
 let ASDrawContext = null;
10 10
 let audioLevelCanvasCache = {};
11
+let dominantSpeakerAudioElement = null;
11 12
 
12
-function initDominantSpeakerAudioLevels() {
13
-    let ASRadius = interfaceConfig.DOMINANT_SPEAKER_AVATAR_SIZE / 2;
14
-    let ASCenter = (interfaceConfig.DOMINANT_SPEAKER_AVATAR_SIZE + ASRadius) / 2;
13
+function initDominantSpeakerAudioLevels(dominantSpeakerAvatarSize) {
14
+    let ASRadius = dominantSpeakerAvatarSize / 2;
15
+    let ASCenter = (dominantSpeakerAvatarSize + ASRadius) / 2;
15 16
 
16 17
     // Draw a circle.
18
+    ASDrawContext.beginPath();
17 19
     ASDrawContext.arc(ASCenter, ASCenter, ASRadius, 0, 2 * Math.PI);
20
+    ASDrawContext.closePath();
18 21
 
19 22
     // Add a shadow around the circle
20 23
     ASDrawContext.shadowColor = interfaceConfig.SHADOW_COLOR;
@@ -90,14 +93,14 @@ function getShadowLevel (audioLevel) {
90 93
     let shadowLevel = 0;
91 94
 
92 95
     if (audioLevel <= 0.3) {
93
-        shadowLevel
94
-            = Math.round(interfaceConfig.CANVAS_EXTRA/2*(audioLevel/0.3));
96
+        shadowLevel = Math.round(
97
+            interfaceConfig.CANVAS_EXTRA/2*(audioLevel/0.3));
95 98
     } else if (audioLevel <= 0.6) {
96
-        shadowLevel
97
-            = Math.round(interfaceConfig.CANVAS_EXTRA/2*((audioLevel - 0.3) / 0.3));
99
+        shadowLevel = Math.round(
100
+            interfaceConfig.CANVAS_EXTRA/2*((audioLevel - 0.3) / 0.3));
98 101
     } else {
99
-        shadowLevel
100
-            = Math.round(interfaceConfig.CANVAS_EXTRA/2*((audioLevel - 0.6) / 0.4));
102
+        shadowLevel = Math.round(
103
+            interfaceConfig.CANVAS_EXTRA/2*((audioLevel - 0.6) / 0.4));
101 104
     }
102 105
 
103 106
     return shadowLevel;
@@ -124,8 +127,18 @@ function getVideoSpanId(id) {
124 127
 const AudioLevels = {
125 128
 
126 129
     init () {
127
-        ASDrawContext = $('#dominantSpeakerAudioLevel')[0].getContext('2d');
128
-        initDominantSpeakerAudioLevels();
130
+        dominantSpeakerAudioElement =  $('#dominantSpeakerAudioLevel')[0];
131
+        ASDrawContext = dominantSpeakerAudioElement.getContext('2d');
132
+
133
+        let parentContainer = $("#dominantSpeaker");
134
+        let dominantSpeakerWidth = parentContainer.width();
135
+        let dominantSpeakerHeight = parentContainer.height();
136
+
137
+        dominantSpeakerAudioElement.width = dominantSpeakerWidth;
138
+        dominantSpeakerAudioElement.height = dominantSpeakerHeight;
139
+
140
+        let dominantSpeakerAvatar = $("#dominantSpeakerAvatar");
141
+        initDominantSpeakerAudioLevels(dominantSpeakerAvatar.width());
129 142
     },
130 143
 
131 144
     /**
@@ -155,8 +168,10 @@ const AudioLevels = {
155 168
 
156 169
             audioLevelCanvas = document.createElement('canvas');
157 170
             audioLevelCanvas.className = "audiolevel";
158
-            audioLevelCanvas.style.bottom = `-${interfaceConfig.CANVAS_EXTRA/2}px`;
159
-            audioLevelCanvas.style.left = `-${interfaceConfig.CANVAS_EXTRA/2}px`;
171
+            audioLevelCanvas.style.bottom
172
+                = `-${interfaceConfig.CANVAS_EXTRA/2}px`;
173
+            audioLevelCanvas.style.left
174
+                = `-${interfaceConfig.CANVAS_EXTRA/2}px`;
160 175
             resizeAudioLevelCanvas(audioLevelCanvas, thumbWidth, thumbHeight);
161 176
 
162 177
             videoSpan.appendChild(audioLevelCanvas);
@@ -213,7 +228,10 @@ const AudioLevels = {
213 228
             return;
214 229
         }
215 230
 
216
-        ASDrawContext.clearRect(0, 0, 300, 300);
231
+        ASDrawContext.clearRect(0, 0,
232
+            dominantSpeakerAudioElement.width,
233
+            dominantSpeakerAudioElement.height);
234
+
217 235
         if (!audioLevel) {
218 236
             return;
219 237
         }

+ 11
- 4
modules/UI/avatar/Avatar.js Datei anzeigen

@@ -48,14 +48,21 @@ export default {
48 48
         }
49 49
         avatarId = MD5.hexdigest(avatarId.trim().toLowerCase());
50 50
 
51
-        // Default to using gravatar.
52
-        let urlPref = 'https://www.gravatar.com/avatar/';
53
-        let urlSuf = "?d=wavatar&size=100";
54 51
 
55
-        if (random && interfaceConfig.RANDOM_AVATAR_URL_PREFIX) {
52
+        let urlPref = null;
53
+        let urlSuf = null;
54
+        if (!random) {
55
+            urlPref = 'https://www.gravatar.com/avatar/';
56
+            urlSuf = "?d=wavatar&size=200";
57
+        }
58
+        else if (random && interfaceConfig.RANDOM_AVATAR_URL_PREFIX) {
56 59
             urlPref = interfaceConfig.RANDOM_AVATAR_URL_PREFIX;
57 60
             urlSuf = interfaceConfig.RANDOM_AVATAR_URL_SUFFIX;
58 61
         }
62
+        else {
63
+            urlPref = 'https://robohash.org/';
64
+            urlSuf = ".png?size=200x200";
65
+        }
59 66
 
60 67
         return urlPref + avatarId + urlSuf;
61 68
     }

+ 1
- 1
modules/UI/side_pannels/chat/Chat.js Datei anzeigen

@@ -35,7 +35,7 @@ function setVisualNotification(show) {
35 35
         var leftIndent = (UIUtil.getTextWidth(chatButtonElement) -
36 36
             UIUtil.getTextWidth(unreadMsgElement)) / 2;
37 37
         var topIndent = (UIUtil.getTextHeight(chatButtonElement) -
38
-            UIUtil.getTextHeight(unreadMsgElement)) / 2 - 3;
38
+            UIUtil.getTextHeight(unreadMsgElement)) / 2 - 5;
39 39
 
40 40
         unreadMsgElement.setAttribute(
41 41
             'style',

+ 33
- 2
modules/UI/videolayout/ConnectionIndicator.js Datei anzeigen

@@ -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.minHDHeight)
380
+                        showResolutionLabel = true;
381
+                });
382
+        }
383
+
384
+        VideoLayout.updateResolutionLabel(showResolutionLabel);
385
+    }
386
+};
387
+
357 388
 export default ConnectionIndicator;

+ 8
- 12
modules/UI/videolayout/FilmStrip.js Datei anzeigen

@@ -2,7 +2,7 @@
2 2
 
3 3
 import UIUtil from "../util/UIUtil";
4 4
 
5
-const thumbAspectRatio = 16.0 / 9.0;
5
+const thumbAspectRatio = 1 / 1;
6 6
 
7 7
 const FilmStrip = {
8 8
     init () {
@@ -44,11 +44,7 @@ const FilmStrip = {
44 44
      * that we want to take into account when calculating the film strip width.
45 45
      */
46 46
      calculateThumbnailSize (isSideBarVisible) {
47
-        // Calculate the available height, which is the inner window height
48
-        // minus 39px for the header minus 2px for the delimiter lines on the
49
-        // top and bottom of the large video, minus the 36px space inside the
50
-        // remoteVideos container used for highlighting shadow.
51
-        let availableHeight = 100;
47
+        let availableHeight = interfaceConfig.FILM_STRIP_MAX_HEIGHT;
52 48
 
53 49
         let numvids = this.getThumbs(true).length;
54 50
 
@@ -80,17 +76,17 @@ const FilmStrip = {
80 76
         let maxHeight
81 77
             // If the MAX_HEIGHT property hasn't been specified
82 78
             // we have the static value.
83
-            = Math.min( interfaceConfig.FILM_STRIP_MAX_HEIGHT || 160,
79
+            = Math.min( interfaceConfig.FILM_STRIP_MAX_HEIGHT || 120,
84 80
                         availableHeight);
85 81
 
86 82
         availableHeight
87
-            = Math.min( maxHeight,
88
-            availableWidth / thumbAspectRatio,
89
-            window.innerHeight - 18);
83
+            = Math.min( maxHeight, window.innerHeight - 18);
90 84
 
91
-        if (availableHeight < availableWidth / thumbAspectRatio) {
92
-            availableWidth = Math.floor(availableHeight * thumbAspectRatio);
85
+        if (availableHeight < availableWidth) {
86
+            availableWidth = availableHeight;
93 87
         }
88
+        else
89
+            availableHeight = availableWidth;
94 90
 
95 91
         return {
96 92
             thumbWidth: availableWidth,

+ 14
- 7
modules/UI/videolayout/LargeVideo.js Datei anzeigen

@@ -8,7 +8,6 @@ import FilmStrip from './FilmStrip';
8 8
 import Avatar from "../avatar/Avatar";
9 9
 import {createDeferred} from '../../util/helpers';
10 10
 
11
-const avatarSize = interfaceConfig.DOMINANT_SPEAKER_AVATAR_SIZE;
12 11
 const FADE_DURATION_MS = 300;
13 12
 
14 13
 export const VIDEO_CONTAINER_TYPE = "camera";
@@ -175,6 +174,8 @@ class VideoContainer extends LargeContainer {
175 174
         this.$avatar = $('#dominantSpeaker');
176 175
         this.$wrapper = $('#largeVideoWrapper');
177 176
 
177
+        this.avatarHeight = $("#dominantSpeakerAvatar").height();
178
+
178 179
         // This does not work with Temasys plugin - has to be a property to be
179 180
         // copied between new <object> elements
180 181
         //this.$video.on('play', onPlay);
@@ -245,7 +246,7 @@ class VideoContainer extends LargeContainer {
245 246
                                     containerWidth, containerHeight);
246 247
 
247 248
         // update avatar position
248
-        let top = containerHeight / 2 - avatarSize / 4 * 3;
249
+        let top = containerHeight / 2 - this.avatarHeight / 4 * 3;
249 250
 
250 251
         this.$avatar.css('top', top);
251 252
 
@@ -369,6 +370,7 @@ export default class LargeVideoManager {
369 370
         this.videoContainer = new VideoContainer(
370 371
             () => this.resizeContainer(VIDEO_CONTAINER_TYPE));
371 372
         this.addContainer(VIDEO_CONTAINER_TYPE, this.videoContainer);
373
+
372 374
         // use the same video container to handle and desktop tracks
373 375
         this.addContainer("desktop", this.videoContainer);
374 376
 
@@ -382,22 +384,26 @@ export default class LargeVideoManager {
382 384
         });
383 385
 
384 386
         if (interfaceConfig.SHOW_JITSI_WATERMARK) {
385
-            let leftWatermarkDiv = this.$container.find("div.watermark.leftwatermark");
387
+            let leftWatermarkDiv
388
+                = this.$container.find("div.watermark.leftwatermark");
386 389
 
387 390
             leftWatermarkDiv.css({display: 'block'});
388 391
 
389
-            leftWatermarkDiv.parent().attr('href', interfaceConfig.JITSI_WATERMARK_LINK);
392
+            leftWatermarkDiv.parent().attr(
393
+                'href', interfaceConfig.JITSI_WATERMARK_LINK);
390 394
         }
391 395
 
392 396
         if (interfaceConfig.SHOW_BRAND_WATERMARK) {
393
-            let rightWatermarkDiv = this.$container.find("div.watermark.rightwatermark");
397
+            let rightWatermarkDiv
398
+                = this.$container.find("div.watermark.rightwatermark");
394 399
 
395 400
             rightWatermarkDiv.css({
396 401
                 display: 'block',
397 402
                 backgroundImage: 'url(images/rightwatermark.png)'
398 403
             });
399 404
 
400
-            rightWatermarkDiv.parent().attr('href', interfaceConfig.BRAND_WATERMARK_LINK);
405
+            rightWatermarkDiv.parent().attr(
406
+                'href', interfaceConfig.BRAND_WATERMARK_LINK);
401 407
         }
402 408
 
403 409
         if (interfaceConfig.SHOW_POWERED_BY) {
@@ -478,7 +484,8 @@ export default class LargeVideoManager {
478 484
 
479 485
             return promise;
480 486
         }).then(() => {
481
-            // after everything is done check again if there are any pending new streams.
487
+            // after everything is done check again if there are any pending
488
+            // new streams.
482 489
             this.updateInProcess = false;
483 490
             this.scheduleLargeVideoUpdate();
484 491
         });

+ 13
- 0
modules/UI/videolayout/VideoLayout.js Datei anzeigen

@@ -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
 

Laden…
Abbrechen
Speichern