Sfoglia il codice sorgente

Updated layout

master
Ilya Daynatovich 8 anni fa
parent
commit
3bd4f1d5d8
3 ha cambiato i file con 126 aggiunte e 105 eliminazioni
  1. 2
    2
      css/_variables.scss
  2. 105
    87
      css/_videolayout_default.scss
  3. 19
    16
      modules/UI/videolayout/FilmStrip.js

+ 2
- 2
css/_variables.scss Vedi File

@@ -13,9 +13,9 @@ $hangupFontSize: 2em;
13 13
 $defaultToolbarSize: 50px;
14 14
 
15 15
 // Video layout.
16
-$thumbnailToolbarHeight: 3em;
16
+$thumbnailToolbarHeight: 22px;
17 17
 $thumbnailIndicatorBorder: 0;
18
-$thumbnailIndicatorSize: $thumbnailToolbarHeight;
18
+$thumbnailIndicatorSize: 3em;
19 19
 $thumbnailVideoMargin: 2px;
20 20
 
21 21
 /**

+ 105
- 87
css/_videolayout_default.scss Vedi File

@@ -22,110 +22,128 @@
22 22
         height: 100%;
23 23
         background-color: black;
24 24
     }
25
-}
26
-
27
-/**
28
- * The toolbar of the video thumbnail.
29
- */
30
-.videocontainer__toolbar,
31
-.videocontainer__toptoolbar {
32
-    position: absolute;
33
-    left: 0;
34
-    z-index: 3;
35
-    width: 100%;
36
-    box-sizing: border-box; // Includes the padding in the 100% width.
37
-}
38
-
39
-.videocontainer__toolbar {
40
-    bottom: 0;
41
-    padding: 0 5px 0 5px;
42
-    height: $thumbnailToolbarHeight;
43
-}
44
-
45
-.videocontainer__toptoolbar {
46
-    $toolbarPadding: 5px;
47
-    top: 0;
48
-    padding: $toolbarPadding;
49
-    padding-bottom: 0;
50 25
 
51
-    span.indicator {
52
-        position: relative;
53
-        font-size: 8px;
54
-        text-align: center;
55
-        line-height: $thumbnailToolbarHeight;
56
-        display: none;
57
-        padding: 0;
58
-        margin-right: em(5, 8);
59
-        float: left;
60
-        @include circle($thumbnailIndicatorSize);
61
-        box-sizing: border-box;
26
+    /**
27
+     * The toolbar of the video thumbnail.
28
+     */
29
+    &__toolbar,
30
+    &__toptoolbar {
31
+        position: absolute;
32
+        left: 0;
62 33
         z-index: 3;
63
-        background: $dominantSpeakerBg;
64
-        color: $thumbnailPictogramColor;
65
-        border: $thumbnailIndicatorBorder solid $thumbnailPictogramColor;
34
+        width: 100%;
35
+        box-sizing: border-box; // Includes the padding in the 100% width.
36
+    }
66 37
 
67
-        &:last-child {
68
-            margin-right: 0;
69
-        }
38
+    &__toolbar {
39
+        bottom: 0;
40
+        padding: 0 5px 0 5px;
41
+        height: $thumbnailToolbarHeight;
42
+    }
70 43
 
71
-        .indicatoricon {
72
-            position: absolute;
73
-            top: 50%;
74
-            left: 0;
75
-            @include transform(translateY(-50%));
76
-            width: $thumbnailIndicatorSize - 2 * $thumbnailIndicatorBorder;
77
-            height: $thumbnailIndicatorSize - 2 * $thumbnailIndicatorBorder;
78
-            line-height: $thumbnailIndicatorSize - 2 * $thumbnailIndicatorBorder;
79
-        }
44
+    &__toptoolbar {
45
+        $toolbarPadding: 5px;
46
+        top: 0;
47
+        padding: $toolbarPadding;
48
+        padding-bottom: 0;
80 49
 
81
-        .connection {
50
+        span.indicator {
82 51
             position: relative;
83
-            margin: 0 auto;
84
-            width: 12px;
85
-            height: 8px;
86
-
87
-            &_empty
88
-            {
89
-                @include topLeft();
90
-                max-width: 12px;
91
-                width: 12px;
92
-                color: #8B8B8B;/*#FFFFFF*/
93
-                overflow: hidden;
52
+            font-size: 8px;
53
+            text-align: center;
54
+            line-height: $thumbnailIndicatorSize;
55
+            display: none;
56
+            padding: 0;
57
+            margin-right: em(5, 8);
58
+            float: left;
59
+            @include circle($thumbnailIndicatorSize);
60
+            box-sizing: border-box;
61
+            z-index: 3;
62
+            background: $dominantSpeakerBg;
63
+            color: $thumbnailPictogramColor;
64
+            border: $thumbnailIndicatorBorder solid $thumbnailPictogramColor;
65
+
66
+            &:last-child {
67
+                margin-right: 0;
94 68
             }
95 69
 
96
-            &_lost
97
-            {
98
-                @include topLeft();
99
-                max-width: 12px;
100
-                width: 12px;
101
-                color: #8B8B8B;
102
-                overflow: visible;
70
+            .indicatoricon {
71
+                position: absolute;
72
+                top: 50%;
73
+                left: 0;
74
+                @include transform(translateY(-50%));
75
+                width: 100%;
103 76
             }
104 77
 
105
-            &_full
106
-            {
107
-                @include topLeft();
108
-                max-width: 12px;
78
+            .connection {
79
+                position: relative;
80
+                margin: 0 auto;
109 81
                 width: 12px;
110
-                color: #FFFFFF;/*#15A1ED*/
111
-                overflow: hidden;
82
+                height: 8px;
83
+
84
+                &_empty
85
+                {
86
+                    @include topLeft();
87
+                    max-width: 12px;
88
+                    width: 12px;
89
+                    color: #8B8B8B;/*#FFFFFF*/
90
+                    overflow: hidden;
91
+                }
92
+
93
+                &_lost
94
+                {
95
+                    @include topLeft();
96
+                    max-width: 12px;
97
+                    width: 12px;
98
+                    color: #8B8B8B;
99
+                    overflow: visible;
100
+                }
101
+
102
+                &_full
103
+                {
104
+                    @include topLeft();
105
+                    max-width: 12px;
106
+                    width: 12px;
107
+                    color: #FFFFFF;/*#15A1ED*/
108
+                    overflow: hidden;
109
+                }
110
+            }
111
+
112
+            .icon-connection,
113
+            .icon-connection-lost {
114
+                font-size: 1em;
112 115
             }
113 116
         }
117
+    }
118
+
119
+    &_small {
120
+        span.indicator {
121
+            font-size: 5px;
114 122
 
115
-        .icon-connection,
116
-        .icon-connection-lost {
117
-            font-size: 1em;
123
+            .connection {
124
+                height: 5px;
125
+            }
118 126
         }
119 127
     }
120
-}
121 128
 
122
-.videocontainer__hoverOverlay {
123
-    position: relative;
124
-    width: 100%;
125
-    height: 100%;
126
-    visibility: hidden;
127
-    background: rgba(0,0,0,.6);
128
-    z-index: 2;
129
+    &_medium {
130
+        span.indicator {
131
+            font-size: 6px;
132
+
133
+            .connection {
134
+                height: 6px;
135
+            }
136
+        }
137
+    }
138
+
139
+    &__hoverOverlay {
140
+        position: relative;
141
+        width: 100%;
142
+        height: 100%;
143
+        visibility: hidden;
144
+        background: rgba(0,0,0,.6);
145
+        z-index: 2;
146
+    }
129 147
 }
130 148
 
131 149
 #localVideoWrapper {

+ 19
- 16
modules/UI/videolayout/FilmStrip.js Vedi File

@@ -401,12 +401,8 @@ const FilmStrip = {
401 401
                     height: remote.thumbHeight + 2
402 402
                 }, this._getAnimateOptions(animate, resolve));
403 403
             }));
404
-            promises.push(new Promise((resolve) => {
405
-                let fontSize = this._getIndicatorFontSize(remote.thumbHeight);
406
-                this.filmStrip.find('.indicator').animate({
407
-                    fontSize
408
-                }, this._getAnimateOptions(animate, resolve));
409
-            }));
404
+
405
+            this._setThumbnailsClasses(remote.thumbHeight);
410 406
 
411 407
             if (!animate) {
412 408
                 resolve();
@@ -432,25 +428,32 @@ const FilmStrip = {
432 428
     },
433 429
 
434 430
     /**
435
-     * Returns font size for indicators according to current
436
-     * height of thumbnail
431
+     * Set thumbnail classes according to the current size of thumbnail
437 432
      * @param height
438
-     * @returns {Number} - font size for current height
439 433
      * @private
440 434
      */
441
-    _getIndicatorFontSize(height) {
435
+    _setThumbnailsClasses(height) {
442 436
         const { SMALL, MEDIUM } = ThumbnailSizes;
443
-        let fontSize;
437
+        const { localThumb, remoteThumbs } = this.getThumbs();
438
+        let smallClass = 'videocontainer_small';
439
+        let mediumClass = 'videocontainer_medium';
440
+        let className = '';
444 441
 
445 442
         if (height <= SMALL) {
446
-            fontSize = 5;
443
+            className = smallClass;
447 444
         } else if (height > SMALL && height <= MEDIUM) {
448
-            fontSize = 6;
449
-        } else {
450
-            fontSize = 8;
445
+            className = mediumClass;
451 446
         }
452 447
 
453
-        return fontSize;
448
+        localThumb
449
+            .removeClass(`${smallClass} ${mediumClass}`)
450
+            .addClass(className);
451
+
452
+        if (remoteThumbs) {
453
+            remoteThumbs
454
+                .removeClass(`${smallClass} ${mediumClass}`)
455
+                .addClass(className);
456
+        }
454 457
     },
455 458
 
456 459
     /**

Loading…
Annulla
Salva