]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - client/src/sass/video-js-custom.scss
Reduce title/button size for embed
[github/Chocobozzz/PeerTube.git] / client / src / sass / video-js-custom.scss
CommitLineData
3ec8dc09
C
1@import '_variables';
2@import '_mixins';
3
be6a4802
C
4$primary-foreground-color: #fff;
5$primary-background-color: #000;
6$font-size: 13px;
7$control-bar-height: 34px;
aa8b6df4 8
be6a4802
C
9.video-js.vjs-peertube-skin {
10 font-size: $font-size;
11 color: $primary-foreground-color;
aa8b6df4 12
22b59e80
C
13 .vjs-dock-text {
14 padding-right: 10px;
15 }
16
17 .vjs-dock-description {
18 font-size: 11px;
19
20 &:before, &:after {
21 display: inline-block;
22 content: '\1F308';
23 }
24
25 &:before {
26 margin-right: 4px;
27 }
28
29 &:after {
30 margin-left: 4px;
31 transform: scale(-1, 1);
32 }
33 }
34
be6a4802
C
35 .vjs-button > .vjs-icon-placeholder::before {
36 line-height: $control-bar-height;
aa8b6df4 37 }
e14852b4 38
be6a4802
C
39 .vjs-mouse-display:before,
40 .vjs-play-progress:before,
41 .vjs-volume-level:before {
42 content: ''; /* Remove Circle From Progress Bar */
43 }
e14852b4 44
be6a4802
C
45 .vjs-audio-button {
46 display: none;
47 }
e14852b4 48
be6a4802 49 .vjs-big-play-button {
9e6b41cc 50 outline: 0;
07fa4c97 51 font-size: 6em;
e14852b4 52
8cac1b64
C
53 $big-play-width: 1.5em;
54 $big-play-height: 1em;
e14852b4 55
be6a4802
C
56 border: 0;
57 border-radius: 0.3em;
e14852b4 58
e14852b4
C
59 left: 50%;
60 top: 50%;
8cac1b64
C
61 width: $big-play-width;
62 height: $big-play-height;
63 line-height: $big-play-height;
e14852b4
C
64 margin-left: -($big-play-width / 2);
65 margin-top: -($big-play-height / 2);
8cac1b64 66 transition: opacity 0.5s;
adcaf1a8
C
67
68 &::-moz-focus-inner {
69 border: 0;
70 padding: 0
71 }
80d1057b
C
72
73 .vjs-icon-placeholder::before {
74 transition: text-shadow 0.3s;
75 }
76
8cac1b64
C
77 &:hover {
78 opacity: 0.9;
79
80 .vjs-icon-placeholder::before {
81 text-shadow: 0 0 1px rgba(255, 255, 255, 0.8);
82 }
80d1057b 83 }
be6a4802 84 }
e14852b4 85
8fa5653a
C
86 &.vjs-has-started .vjs-big-play-button {
87 display: block;
88 visibility: hidden;
89 opacity: 0;
9581cabc 90 transition: visibility 0.3s, opacity 0.3s;
8fa5653a
C
91 }
92
be6a4802
C
93 .vjs-control-bar,
94 .vjs-big-play-button,
95 .vjs-menu-button .vjs-menu-content {
96 background-color: rgba($primary-background-color, 0.5);
97 }
e14852b4 98
be6a4802 99 $slider-bg-color: lighten($primary-background-color, 33%);
e14852b4 100
be6a4802
C
101 .vjs-slider {
102 background-color: rgba(255, 255, 255, .3);
e14852b4 103 border-radius: 2px;
be6a4802
C
104 height: 5px;
105 }
e14852b4 106
be6a4802
C
107 /* The slider bar color is used for the progress bar and the volume bar
108 (the first two can be removed after a fix that's coming) */
109 .vjs-volume-level,
110 .vjs-play-progress,
111 .vjs-slider-bar {
112 background: $primary-foreground-color;
113 }
e14852b4 114
be6a4802
C
115 .vjs-load-progress {
116 background: rgba($slider-bg-color, 0.5);
117 }
e14852b4 118
be6a4802
C
119 .vjs-load-progress div {
120 background: rgba($slider-bg-color, 0.75);
121 }
e14852b4 122
be6a4802
C
123 .vjs-poster {
124 outline: none; /* Remove Blue Outline on Click*/
125 outline: 0;
126 }
e14852b4 127
be6a4802
C
128 .vjs-control-bar {
129 height: $control-bar-height;
e14852b4 130
be6a4802
C
131 .vjs-progress-control {
132 bottom: 34px;
133 width: 100%;
134 position: absolute;
135 height: 5px;
e14852b4 136
be6a4802
C
137 .vjs-progress-holder {
138 margin: 0;
139 border-radius: 0;
140 }
141 }
e14852b4 142
be6a4802 143 .vjs-play-control {
3ec8dc09
C
144 @include disable-outline;
145
be6a4802
C
146 font-size: $font-size;
147 padding: 0 17px;
148 margin-right: 5px;
149 }
e14852b4 150
be6a4802
C
151 .vjs-time-control {
152 &.vjs-current-time {
153 font-size: $font-size;
154 display: inline-block;
155 padding: 0;
156
157 .vjs-current-time-display {
86f278cb 158 line-height: calc(#{$control-bar-height} + 1px);
be6a4802
C
159
160 &::after {
161 content: "/";
162 margin: 0 1px 0 2px;
163 }
164 }
165 }
166
167 &.vjs-duration {
168 font-size: $font-size;
169 display: inline-block;
170 padding: 0;
171
172 .vjs-duration-display {
86f278cb 173 line-height: calc(#{$control-bar-height} + 1px);
be6a4802
C
174 }
175 }
176
177 &.vjs-remaining-time {
178 display: none;
179 }
180 }
e14852b4 181
bf5685f0 182 .vjs-peertube {
be6a4802
C
183 width: 100%;
184 line-height: $control-bar-height;
185 text-align: right;
be6a4802 186
bf5685f0 187 .vjs-peertube-displayed {
a86309b4
C
188 display: block;
189 }
190
bf5685f0 191 .vjs-peertube-hidden {
a86309b4
C
192 display: none;
193 }
194
be6a4802
C
195 .download-speed-number, .upload-speed-number, .peers-number {
196 font-weight: $font-semibold;
197 }
198
199 .download-speed-text, .upload-speed-text, .peers-text {
200 margin-right: 15px;
201 }
202
203 .icon {
204 display: inline-block;
205 width: 15px;
206 height: 15px;
207 background-size: contain;
208 vertical-align: middle;
209 background-repeat: no-repeat;
210 margin-right: 6px;
211 position: relative;
212 top: -1px;
213
214 &.icon-download {
215 background-image: url('../assets/player/images/arrow-down.svg');
216 }
217
218 &.icon-upload {
219 background-image: url('../assets/player/images/arrow-up.svg');
220 }
221 }
222 }
e14852b4 223
57886d66 224 .vjs-playback-rate {
225 font-size: 10px;
3ec8dc09 226 width: 37px !important;
a73c582e
C
227
228 .vjs-playback-rate-value {
229 font-size: 13px;
230 line-height: $control-bar-height;
231 }
3ec8dc09
C
232
233 .vjs-menu .vjs-menu-content {
234 width: 37px !important;
235 }
57886d66 236 }
237
be6a4802 238 .vjs-mute-control {
3ec8dc09
C
239 @include disable-outline;
240
241 line-height: $control-bar-height;
242 padding: 0;
243 width: 30px;
d7701449 244
be6a4802
C
245 .vjs-icon-placeholder {
246 display: inline-block;
247 width: 22px;
248 height: 22px;
249 vertical-align: middle;
250 background: url('../assets/player/images/volume.svg') no-repeat;
251 background-size: contain;
252
253 &::before {
254 content: '';
255 }
256 }
257
258 &.vjs-vol-0 .vjs-icon-placeholder {
259 background: url('../assets/player/images/volume-mute.svg') no-repeat;
260 background-size: contain;
261 }
262 }
e14852b4 263
3ec8dc09
C
264 .vjs-volume-control {
265 width: 30px;
266 margin: 0;
be6a4802 267 }
e14852b4 268
be6a4802
C
269 .vjs-volume-bar {
270 background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACwAAAAcCAQAAACw95UnAAAAMElEQVRIx2NgoBL4n4YKGUYNHkEG4zJg1OCRYDCpBowaPJwMppbLRg0eNXjUYBLEAXWNUA6QNm1lAAAAAElFTkSuQmCC) no-repeat;
271 background-size: 22px 14px;
272 height: 100%;
273 width: 100%;
274 max-width: 22px;
275 max-height: 14px;
276 margin: 7px 4px;
277 border-radius: 0;
278 top: 3px;
279
280 .vjs-volume-level {
281 background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACwAAAAcAQAAAAAyhWABAAAAAnRSTlMAAHaTzTgAAAAZSURBVHgBYwAB/g9EUv+JokCqiaT+U4MCAPKPS7WUUOc1AAAAAElFTkSuQmCC) no-repeat;
282 background-size: 22px 14px;
283 max-width: 22px;
284 max-height: 14px;
285 height: 100%;
286 }
287 }
e14852b4 288
be6a4802
C
289 .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-slider-active,
290 .vjs-volume-panel.vjs-volume-panel-horizontal:active,
291 .vjs-volume-panel.vjs-volume-panel-horizontal:focus,
292 .vjs-volume-panel.vjs-volume-panel-horizontal:hover {
293 width: 6em;
294 transition-property: none;
295 }
e14852b4 296
be6a4802
C
297 .vjs-volume-panel .vjs-mute-control:hover ~ .vjs-volume-control.vjs-volume-horizontal {
298 width: 3em;
299 height: auto;
300 }
e14852b4 301
be6a4802
C
302 .vjs-volume-panel .vjs-mute-control:hover ~ .vjs-volume-control {
303 transition-property: none;
304 }
e14852b4 305
be6a4802
C
306 .vjs-volume-panel {
307 .vjs-mute-control {
308 width: 2em;
309 z-index: 1;
310 padding: 0;
311 }
312
313 .vjs-volume-control {
314 display: inline-block;
315 position: relative;
316 left: 5px;
317 opacity: 1;
318 width: 3em;
319 height: auto;
320 }
321 }
e14852b4 322
be6a4802 323 .vjs-fullscreen-control {
3ec8dc09
C
324 @include disable-outline;
325
be6a4802
C
326 width: 37px;
327
328 .vjs-icon-placeholder {
329 display: inline-block;
330 width: 22px;
331 height: 22px;
332 vertical-align: middle;
333 background: url('../assets/player/images/fullscreen.svg') no-repeat;
334 background-size: contain;
335
336 &::before {
337 content: '';
338 }
339 }
340 }
e14852b4 341
be6a4802 342 .vjs-menu-button-popup {
be6a4802 343 font-weight: $font-semibold;
86f278cb 344 width: 50px;
be6a4802
C
345
346 // Thanks: https://github.com/kmoskwiak/videojs-resolution-switcher/pull/92/files
347 .vjs-resolution-button-label {
348 line-height: $control-bar-height;
349 position: absolute;
350 top: 0;
3ec8dc09 351 left: 0;
be6a4802
C
352 width: 100%;
353 height: 100%;
354 text-align: center;
355 box-sizing: inherit;
86f278cb 356 text-align: center;
be6a4802
C
357 }
358
359 .vjs-resolution-button {
3ec8dc09 360 @include disable-outline;
be6a4802
C
361 }
362
363 .vjs-menu {
364 top: 20px;
3ec8dc09 365 left: 0;
be6a4802
C
366
367 .vjs-menu-content {
86f278cb 368 width: 50px;
3ec8dc09 369 bottom: 20px;
be6a4802
C
370 }
371
372 li {
373 text-transform: none;
374 font-size: 13px;
375 }
376 }
377 }
378 }
a86309b4 379
e700d33b 380 @media screen and (max-width: 570px) {
869968d7
C
381 .vjs-dock-text {
382 font-size: 14px;
383 }
384
385 .vjs-dock-description {
386 font-size: 9px;
387 }
388
8fa5653a 389 .vjs-big-play-button {
869968d7 390 font-size: 4.5em;
8fa5653a
C
391 }
392
a73c582e
C
393 .vjs-playback-rate {
394 display: none;
395 }
396
7ccfb37f 397 .vjs-peertube {
86f278cb
C
398 padding: 0 !important;
399
7ccfb37f 400 .vjs-peertube-displayed {
86f278cb
C
401 display: none !important;
402 }
403 }
404 }
405
406 @media screen and (max-width: 300px) {
8fa5653a 407 .vjs-dock-text {
22b59e80
C
408 font-size: 13px;
409 }
410
8fa5653a 411 .vjs-big-play-button {
586f7c1b 412 font-size: 3em;
8fa5653a
C
413 }
414
86f278cb 415 .vjs-volume-control {
a86309b4
C
416 display: none !important;
417 }
86f278cb
C
418
419 .vjs-volume-panel {
420 width: 26px !important;
421 margin-right: 83px !important;
422 }
a86309b4 423 }
e14852b4 424}
b7a48512
C
425
426// Thanks: https://projects.lukehaas.me/css-loaders/
427.vjs-loading-spinner {
fd45e8f4 428 left: 50%;
b7a48512 429 font-size: 10px;
fd45e8f4
C
430 text-indent: -9999em;
431 border: 0.7em solid rgba(255, 255, 255, 0.2);
432 border-left-color: #ffffff;
b7a48512 433 transform: translateZ(0);
9581cabc 434 animation: 0.3s ease-out 1.1s forwards vjs-spinner-show, spinner 1.4s infinite linear !important;
b2731bff 435 overflow: hidden;
dfbd250d 436 visibility: hidden;
b7a48512
C
437
438 &:before {
b7a48512 439 animation: none !important;
b7a48512
C
440 }
441
442 &:after {
b7a48512 443 border-radius: 50%;
fd45e8f4
C
444 width: 6em;
445 height: 6em;
b7a48512
C
446 animation: none !important;
447 }
448
fd45e8f4 449 @keyframes spinner {
b7a48512 450 0% {
b7a48512
C
451 transform: rotate(0deg);
452 }
453 100% {
b7a48512
C
454 transform: rotate(360deg);
455 }
456 }
dfbd250d
C
457
458 @keyframes vjs-spinner-show {
459 0% {
460 display: none;
461 opacity: 0;
462 }
463
464 1% {
465 display: block;
466 visibility: visible;
467 opacity: 0;
468 }
469
470 100% {
471 display: block;
472 visibility: visible;
473 opacity: 1;
474 }
475 }
b7a48512 476}
a86309b4 477
bf5685f0
C
478// Error display disabled
479.vjs-error:not(.vjs-error-display-enabled) {
480 .vjs-error-display {
481 display: none;
482 }
483
484 .vjs-loading-spinner {
485 display: block;
486 }
487}
488
489// Error display enabled
490.vjs-error.vjs-error-display-enabled {
491 .vjs-error-display {
492 display: block;
493 }
494}