Selaa lähdekoodia

Improves the pin and hover borders

j8
yanas 8 vuotta sitten
vanhempi
commit
1c8535a2d5

+ 0
- 5
css/_base.scss Näytä tiedosto

@@ -85,11 +85,6 @@ form {
85 85
     background-color: #00ccff;
86 86
 }
87 87
 
88
-.glow
89
-{
90
-    text-shadow: 0px 0px 30px #06a5df, 0px 0px 10px #06a5df, 0px 0px 5px #06a5df,0px 0px 3px #06a5df;
91
-}
92
-
93 88
 .watermark {
94 89
     display: block;
95 90
     position: absolute;

+ 5
- 0
css/_toolbars.scss Näytä tiedosto

@@ -110,6 +110,11 @@
110 110
     cursor: default;
111 111
 }
112 112
 
113
+.button.glow
114
+{
115
+    text-shadow: 0px 0px 5px $toolbarToggleBackground;
116
+}
117
+
113 118
 a.button.unclickable:hover,
114 119
 a.button.unclickable:active,
115 120
 a.button.unclickable.selected{

+ 2
- 1
css/_variables.scss Näytä tiedosto

@@ -30,6 +30,7 @@ $toolbarSelectBackground: rgba(0, 0, 0, .6);
30 30
 
31 31
 $toolbarBadgeBackground: #165ECC;
32 32
 $toolbarBadgeColor: #FFFFFF;
33
+$toolbarToggleBackground: #165ECC;
33 34
 
34 35
 // Main controls
35 36
 $inputBackground: rgba(132, 132, 132, .5);
@@ -39,7 +40,7 @@ $inputBorderColor: #EBEBEB;
39 40
 $buttonBackground: #44A5FF;
40 41
 
41 42
 // Video layout.
42
-$videoThumbnailHovered: #44A5FF;
43
+$videoThumbnailHovered: #BFEBFF;
43 44
 $videoThumbnailSelected: #165ECC;
44 45
 $participantNameColor: #fff;
45 46
 $thumbnailPictogramColor: #fff;

+ 19
- 7
css/_videolayout_default.scss Näytä tiedosto

@@ -25,7 +25,7 @@
25 25
     left: 0;
26 26
     right: 0;
27 27
     width:auto;
28
-    border:1px solid transparent;
28
+    border: 2px solid transparent;
29 29
     z-index: 5;
30 30
     transition: bottom 2s;
31 31
     overflow: visible !important;
@@ -48,7 +48,6 @@
48 48
     background-size: contain;
49 49
     border-radius:1px;
50 50
     margin: 0 $thumbnailVideoMargin;
51
-    border: 1px solid $defaultDarkColor;
52 51
 }
53 52
 
54 53
 /**
@@ -67,22 +66,35 @@
67 66
     padding: 0 5px 0 5px;
68 67
 }
69 68
 
69
+#remoteVideos .videocontainer.videoContainerFocused,
70
+#remoteVideos .videocontainer:hover {
71
+    cursor: hand;
72
+    margin-right: $thumbnailVideoMargin - 2;
73
+    margin-left: $thumbnailVideoMargin - 2;
74
+    margin-top: -2px;
75
+}
70 76
 /**
71 77
  * Focused video thumbnail.
72 78
  */
73 79
 #remoteVideos .videocontainer.videoContainerFocused {
74
-    cursor: hand;
75 80
     transition-duration: 0.5s;
76 81
     -webkit-transition-duration: 0.5s;
77 82
     -webkit-animation-name: greyPulse;
78 83
     -webkit-animation-duration: 2s;
79 84
     -webkit-animation-iteration-count: 1;
80
-    border: 1px solid $videoThumbnailSelected;
85
+    border: 2px solid $videoThumbnailSelected !important;
86
+    box-shadow: inset 0 0 3px $videoThumbnailSelected,
87
+                0 0 3px $videoThumbnailSelected !important;
81 88
 }
82 89
 
83
-#remoteVideos .videocontainer:hover,
84
-#remoteVideos .videocontainer.videoContainerFocused:hover {
85
-    border: 1px solid $videoThumbnailHovered;
90
+/**
91
+ * Hovered video thumbnail.
92
+ */
93
+#remoteVideos .videocontainer:hover {
94
+    cursor: hand;
95
+    border: 2px solid $videoThumbnailHovered;
96
+    box-shadow: inset 0 0 3px $videoThumbnailHovered,
97
+              0 0 3px $videoThumbnailHovered;
86 98
 }
87 99
 
88 100
 #localVideoWrapper {

+ 11
- 24
modules/UI/audio_levels/AudioLevels.js Näytä tiedosto

@@ -147,17 +147,13 @@ const AudioLevels = {
147 147
      * Updates the audio level canvas for the given id. If the canvas
148 148
      * didn't exist we create it.
149 149
      */
150
-    createAudioLevelCanvas (id, thumbWidth, thumbHeight) {
151
-
152
-        let videoSpanId = (id === "local")
153
-                        ? "localVideoContainer"
154
-                        : `participant_${id}`;
150
+    createAudioLevelCanvas (videoSpanId, thumbWidth, thumbHeight) {
155 151
 
156 152
         let videoSpan = document.getElementById(videoSpanId);
157 153
 
158 154
         if (!videoSpan) {
159
-            if (id) {
160
-                console.error("No video element for id", id);
155
+            if (videoSpanId) {
156
+                console.error("No video element for id", videoSpanId);
161 157
             } else {
162 158
                 console.error("No video element for local video.");
163 159
             }
@@ -245,27 +241,18 @@ const AudioLevels = {
245 241
     },
246 242
 
247 243
     updateCanvasSize (localVideo, remoteVideo) {
248
-        let localCanvasWidth
249
-            = localVideo.thumbWidth + interfaceConfig.CANVAS_EXTRA;
250
-        let localCanvasHeight
251
-            = localVideo.thumbHeight + interfaceConfig.CANVAS_EXTRA;
252
-        let remoteCanvasWidth
253
-            = remoteVideo.thumbWidth + interfaceConfig.CANVAS_EXTRA;
254
-        let remoteCanvasHeight
255
-            = remoteVideo.thumbHeight + interfaceConfig.CANVAS_EXTRA;
256
-
257 244
         let { remoteThumbs, localThumb } = FilmStrip.getThumbs();
258 245
 
259
-        remoteThumbs.children('canvas').each(function () {
260
-            $(this).attr('width', remoteCanvasWidth);
261
-            $(this).attr('height', remoteCanvasHeight);
246
+        remoteThumbs.each(( index, element ) => {
247
+            this.createAudioLevelCanvas(element.id,
248
+                                        remoteVideo.thumbWidth,
249
+                                        remoteVideo.thumbHeight);
262 250
         });
263 251
 
264
-        if(localThumb) {
265
-            localThumb.children('canvas').each(function () {
266
-                $(this).attr('width', localCanvasWidth);
267
-                $(this).attr('height', localCanvasHeight);
268
-            });
252
+        if (localThumb) {
253
+            this.createAudioLevelCanvas(localThumb.get(0).id,
254
+                                        localVideo.thumbWidth,
255
+                                        localVideo.thumbHeight);
269 256
         }
270 257
     }
271 258
 };

+ 3
- 2
modules/UI/videolayout/RemoteVideo.js Näytä tiedosto

@@ -33,9 +33,10 @@ RemoteVideo.prototype.addRemoteVideoContainer = function() {
33 33
         this.addRemoteVideoMenu();
34 34
     }
35 35
 
36
-    let { remoteVideo } = this.VideoLayout.resizeThumbnails();
36
+    let { remoteVideo } = this.VideoLayout.resizeThumbnails(false, true);
37 37
     let { thumbHeight, thumbWidth } = remoteVideo;
38
-    AudioLevels.createAudioLevelCanvas(this.id, thumbWidth, thumbHeight);
38
+    AudioLevels.createAudioLevelCanvas(
39
+        this.videoSpanId, thumbWidth, thumbHeight);
39 40
 
40 41
     return this.container;
41 42
 };

+ 3
- 1
modules/UI/videolayout/VideoLayout.js Näytä tiedosto

@@ -109,7 +109,9 @@ var VideoLayout = {
109 109
         // the local video thumb maybe one pixel
110 110
         let { localVideo } = this.resizeThumbnails(false, true);
111 111
         AudioLevels.createAudioLevelCanvas(
112
-            "local", localVideo.thumbWidth, localVideo.thumbHeight);
112
+            "localVideoContainer",
113
+            localVideo.thumbWidth,
114
+            localVideo.thumbHeight);
113 115
 
114 116
         emitter.addListener(UIEvents.CONTACT_CLICKED, onContactClicked);
115 117
         this.lastNCount = config.channelLastN;

Loading…
Peruuta
Tallenna