]>
Commit | Line | Data |
---|---|---|
1 | @import '_variables'; | |
2 | @import '_mixins'; | |
3 | @import './_player-variables'; | |
4 | ||
5 | body { | |
6 | --embedForegroundColor: #{$primary-foreground-color}; | |
7 | ||
8 | --embedBigPlayBackgroundColor: #{$primary-background-color}; | |
9 | } | |
10 | ||
11 | @mixin big-play-button-triangle-size($triangle-size) { | |
12 | width: $triangle-size; | |
13 | height: $triangle-size; | |
14 | top: calc(50% - #{$triangle-size / 2}); | |
15 | left: calc(53% - #{($triangle-size / 2)}); | |
16 | } | |
17 | ||
18 | .video-js.vjs-peertube-skin { | |
19 | font-size: $font-size; | |
20 | color: pvar(--embedForegroundColor); | |
21 | ||
22 | .vjs-dock-text { | |
23 | @include padding-right(60px); | |
24 | ||
25 | padding: $dock-padding; | |
26 | background: linear-gradient(to bottom, rgba(0, 0, 0, .6) 0, rgba(0, 0, 0, 0.2) 70%, rgba(0, 0, 0, 0) 100%); | |
27 | } | |
28 | ||
29 | .vjs-dock-title, | |
30 | .vjs-dock-description { | |
31 | text-shadow: 0 0 2px rgba(0, 0, 0, .5); | |
32 | } | |
33 | ||
34 | .vjs-dock-description { | |
35 | font-size: 11px; | |
36 | ||
37 | .text::before { | |
38 | @include margin-right(4px); | |
39 | } | |
40 | ||
41 | .text::after { | |
42 | @include margin-left(4px); | |
43 | transform: scale(-1, 1); | |
44 | } | |
45 | } | |
46 | ||
47 | .vjs-volume-level::before { | |
48 | content: ''; /* Remove Circle From Progress Bar */ | |
49 | } | |
50 | ||
51 | .vjs-audio-button { | |
52 | display: none; | |
53 | } | |
54 | ||
55 | .vjs-big-play-button { | |
56 | $big-play-width: 1.2em; | |
57 | $big-play-height: 1.2em; | |
58 | ||
59 | @include margin-left(-($big-play-width / 2)); | |
60 | ||
61 | outline: 0; | |
62 | font-size: 6em; | |
63 | ||
64 | border: 2px solid #fff; | |
65 | border-radius: 100%; | |
66 | ||
67 | left: 50%; | |
68 | top: 50%; | |
69 | width: $big-play-width; | |
70 | height: $big-play-height; | |
71 | line-height: $big-play-height; | |
72 | margin-top: -($big-play-height / 2); | |
73 | transition: 0.4s opacity; | |
74 | ||
75 | &::-moz-focus-inner { | |
76 | border: 0; | |
77 | padding: 0; | |
78 | } | |
79 | ||
80 | .vjs-icon-placeholder::before { | |
81 | @include big-play-button-triangle-size(45px); | |
82 | ||
83 | content: ''; | |
84 | background-image: url('#{$assets-path}/player/images/big-play-button.svg'); | |
85 | } | |
86 | ||
87 | &.focus-visible, | |
88 | &:hover { | |
89 | background-color: var(--mainColor, #696969); | |
90 | } | |
91 | ||
92 | } | |
93 | ||
94 | // Small effect when we click on the play button | |
95 | &.vjs-has-big-play-button-clicked { | |
96 | ||
97 | .vjs-big-play-button, | |
98 | .vjs-poster { | |
99 | display: block; | |
100 | visibility: hidden; | |
101 | ||
102 | &.vjs-big-play-button, | |
103 | &.vjs-big-play-button::before { | |
104 | opacity: 0; | |
105 | transition: visibility 0.2s, opacity 0.2s; | |
106 | } | |
107 | ||
108 | &.vjs-poster, | |
109 | &.vjs-poster::before { | |
110 | opacity: 0; | |
111 | transition: visibility 0.3s, opacity 0.3s; | |
112 | transition-delay: 0.05s; | |
113 | } | |
114 | } | |
115 | } | |
116 | ||
117 | // Show poster and controls when playing audio-only content | |
118 | &.vjs-playing-audio-only-content { | |
119 | .vjs-poster { | |
120 | display: block; | |
121 | visibility: visible; | |
122 | } | |
123 | ||
124 | .vjs-control-bar { | |
125 | opacity: $primary-foreground-opacity-hover; | |
126 | } | |
127 | } | |
128 | ||
129 | // Do not display poster when video is starting | |
130 | &.vjs-has-autoplay:not(.vjs-has-started) { | |
131 | .vjs-poster { | |
132 | opacity: 0; | |
133 | visibility: hidden; | |
134 | } | |
135 | } | |
136 | ||
137 | // Hide the big play button on autoplay | |
138 | &.vjs-has-autoplay { | |
139 | .vjs-big-play-button { | |
140 | display: none !important; | |
141 | } | |
142 | } | |
143 | ||
144 | .vjs-control-bar, | |
145 | .vjs-big-play-button, | |
146 | .vjs-settings-dialog { | |
147 | background-color: pvar(--embedBigPlayBackgroundColor); | |
148 | } | |
149 | ||
150 | .vjs-poster { | |
151 | outline: none; /* Remove Blue Outline on Click*/ | |
152 | outline: 0; | |
153 | } | |
154 | ||
155 | .vjs-control-bar { | |
156 | height: $control-bar-height; | |
157 | background: linear-gradient(rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.6)); | |
158 | box-shadow: 0 -15px 40px 10px rgba(0, 0, 0, 0.2); | |
159 | text-shadow: 0 0 2px rgba(0, 0, 0, 0.5); | |
160 | ||
161 | > button:first-child { | |
162 | @include margin-left($first-control-bar-element-margin-left); | |
163 | } | |
164 | ||
165 | .vjs-progress-control, | |
166 | .vjs-play-control, | |
167 | .vjs-playback-rate, | |
168 | .vjs-mute-control, | |
169 | .vjs-volume-control, | |
170 | .vjs-resolution-control, | |
171 | .vjs-fullscreen-control, | |
172 | .vjs-peertube-link, | |
173 | .vjs-theater-control, | |
174 | .vjs-settings { | |
175 | color: pvar(--embedForegroundColor) !important; | |
176 | ||
177 | opacity: $primary-foreground-opacity; | |
178 | transition: opacity .1s; | |
179 | ||
180 | &:hover { | |
181 | opacity: $primary-foreground-opacity-hover; | |
182 | } | |
183 | } | |
184 | ||
185 | .vjs-current-time, | |
186 | .vjs-duration, | |
187 | .vjs-peertube { | |
188 | color: pvar(--embedForegroundColor); | |
189 | opacity: $primary-foreground-opacity; | |
190 | } | |
191 | ||
192 | .vjs-progress-control { | |
193 | @include margin-left($progress-margin); | |
194 | ||
195 | position: absolute; | |
196 | z-index: 100; // On top of the progress bar | |
197 | bottom: 29px; | |
198 | width: calc(100% - (2 * #{$progress-margin})); | |
199 | height: 14px; | |
200 | ||
201 | .vjs-slider { | |
202 | margin: 0; | |
203 | border-radius: 0; | |
204 | background-color: rgba(255, 255, 255, .2); | |
205 | height: 3px; | |
206 | transition: none; | |
207 | ||
208 | .vjs-play-progress { | |
209 | background: pvar(--embedForegroundColor); | |
210 | ||
211 | // Not display the circle if the progress is not hovered | |
212 | &::before { | |
213 | opacity: 0; | |
214 | transition: opacity 0.1s ease; | |
215 | font-size: 14px; | |
216 | ||
217 | top: -0.3em; | |
218 | } | |
219 | ||
220 | .vjs-time-tooltip { | |
221 | display: none; | |
222 | } | |
223 | } | |
224 | ||
225 | .vjs-load-progress { | |
226 | &, | |
227 | div { | |
228 | background: rgba(255, 255, 255, .2); | |
229 | } | |
230 | } | |
231 | } | |
232 | } | |
233 | ||
234 | .vjs-progress-control:hover .vjs-slider, | |
235 | .vjs-progress-control .vjs-slider.vjs-sliding { | |
236 | height: 5px; | |
237 | ||
238 | .vjs-play-progress::before { | |
239 | opacity: 1; | |
240 | } | |
241 | } | |
242 | ||
243 | ||
244 | .vjs-play-control { | |
245 | @include disable-outline; | |
246 | ||
247 | cursor: pointer; | |
248 | width: 2em; | |
249 | ||
250 | .vjs-icon-placeholder { | |
251 | line-height: $control-bar-height; | |
252 | position: relative; | |
253 | top: -1px; | |
254 | ||
255 | &::before { | |
256 | font-size: 28px; | |
257 | line-height: unset; | |
258 | position: relative; | |
259 | } | |
260 | } | |
261 | } | |
262 | ||
263 | .vjs-time-control { | |
264 | line-height: inherit; | |
265 | ||
266 | &.vjs-current-time { | |
267 | @include margin-left(.5em); | |
268 | ||
269 | font-size: $font-size; | |
270 | display: inline-block; | |
271 | padding: 0; | |
272 | ||
273 | .vjs-current-time-display { | |
274 | line-height: calc(#{$control-bar-height} - 1px); | |
275 | ||
276 | &::after { | |
277 | @include margin(0, 1px, 0, 2px); | |
278 | ||
279 | content: '/'; | |
280 | } | |
281 | } | |
282 | } | |
283 | ||
284 | &.vjs-duration { | |
285 | font-size: $font-size; | |
286 | display: inline-block; | |
287 | padding: 0; | |
288 | ||
289 | .vjs-duration-display { | |
290 | line-height: calc(#{$control-bar-height} - 1px); | |
291 | } | |
292 | } | |
293 | ||
294 | &.vjs-remaining-time { | |
295 | display: none; | |
296 | } | |
297 | } | |
298 | ||
299 | .vjs-live-control { | |
300 | line-height: $control-bar-height; | |
301 | min-width: 4em; | |
302 | width: inherit; | |
303 | } | |
304 | ||
305 | .vjs-peertube { | |
306 | @include margin-right(6px); | |
307 | ||
308 | width: 100%; | |
309 | line-height: $control-bar-height; | |
310 | text-align: end; | |
311 | overflow: hidden; | |
312 | ||
313 | .vjs-peertube-displayed { | |
314 | display: block; | |
315 | } | |
316 | ||
317 | .vjs-peertube-hidden { | |
318 | display: none; | |
319 | } | |
320 | ||
321 | .download-speed-number, | |
322 | .upload-speed-number, | |
323 | .peers-number, | |
324 | .http-fallback { | |
325 | font-weight: $font-semibold; | |
326 | } | |
327 | ||
328 | .download-speed-text, | |
329 | .upload-speed-text, | |
330 | .peers-text, | |
331 | .http-fallback { | |
332 | @include margin-right(15px); | |
333 | } | |
334 | ||
335 | .icon { | |
336 | &.icon-download { | |
337 | background-image: url('#{$assets-path}/player/images/arrow-down.svg'); | |
338 | } | |
339 | ||
340 | &.icon-upload { | |
341 | background-image: url('#{$assets-path}/player/images/arrow-up.svg'); | |
342 | } | |
343 | } | |
344 | } | |
345 | ||
346 | .vjs-next-video, | |
347 | .vjs-previous-video { | |
348 | line-height: $control-bar-height; | |
349 | text-align: end; | |
350 | ||
351 | .icon { | |
352 | &.icon-next, | |
353 | &.icon-previous { | |
354 | mask-image: url('#{$assets-path}/player/images/next.svg'); | |
355 | -webkit-mask-image: url('#{$assets-path}/player/images/next.svg'); | |
356 | ||
357 | background-color: #fff; | |
358 | mask-size: cover; | |
359 | width: 11px; | |
360 | height: 11px; | |
361 | margin-top: -2px; | |
362 | display: inline-block; | |
363 | } | |
364 | ||
365 | &.icon-previous { | |
366 | transform: rotate(180deg); | |
367 | } | |
368 | } | |
369 | } | |
370 | ||
371 | .vjs-peertube { | |
372 | .icon { | |
373 | display: inline-block; | |
374 | width: 15px; | |
375 | height: 15px; | |
376 | background-size: contain; | |
377 | vertical-align: middle; | |
378 | background-repeat: no-repeat; | |
379 | position: relative; | |
380 | top: -1px; | |
381 | } | |
382 | } | |
383 | ||
384 | .vjs-playback-rate { | |
385 | font-size: 10px; | |
386 | width: 37px !important; | |
387 | ||
388 | .vjs-playback-rate-value { | |
389 | font-size: 13px; | |
390 | line-height: $control-bar-height; | |
391 | } | |
392 | ||
393 | .vjs-menu .vjs-menu-content { | |
394 | width: 37px !important; | |
395 | } | |
396 | } | |
397 | ||
398 | .vjs-mute-control { | |
399 | @include disable-outline; | |
400 | ||
401 | padding: 0; | |
402 | width: 30px; | |
403 | ||
404 | .vjs-icon-placeholder { | |
405 | display: inline-block; | |
406 | width: 22px; | |
407 | height: 22px; | |
408 | vertical-align: middle; | |
409 | background: url('#{$assets-path}/player/images/volume.svg') no-repeat; | |
410 | background-size: contain; | |
411 | ||
412 | &::before { | |
413 | content: ''; | |
414 | } | |
415 | } | |
416 | ||
417 | &.vjs-vol-0 .vjs-icon-placeholder { | |
418 | background: url('#{$assets-path}/player/images/volume-mute.svg') no-repeat; | |
419 | background-size: contain; | |
420 | } | |
421 | } | |
422 | ||
423 | .vjs-volume-control { | |
424 | @include margin(0, 5px, 0, 0); | |
425 | ||
426 | width: 30px; | |
427 | } | |
428 | ||
429 | .vjs-volume-bar { | |
430 | background: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACwAAAAcCAQAAACw95UnAAAAMElEQVRIx2NgoBL4n4YKGUYNHkEG4zJg1OCRYDCpBowaPJwMppbLRg0eNXjUYBLEAXWNUA6QNm1lAAAAAElFTkSuQmCC') no-repeat; | |
431 | background-size: 22px 14px; | |
432 | height: 100%; | |
433 | width: 100%; | |
434 | max-width: 22px; | |
435 | max-height: 14px; | |
436 | margin: 7px 4px; | |
437 | border-radius: 0; | |
438 | top: 3px; | |
439 | ||
440 | .vjs-volume-level { | |
441 | background: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACwAAAAcAQAAAAAyhWABAAAAAnRSTlMAAHaTzTgAAAAZSURBVHgBYwAB/g9EUv+JokCqiaT+U4MCAPKPS7WUUOc1AAAAAElFTkSuQmCC') no-repeat; | |
442 | background-size: 22px 14px; | |
443 | max-width: 22px; | |
444 | max-height: 14px; | |
445 | height: 100%; | |
446 | } | |
447 | ||
448 | &:focus { | |
449 | text-shadow: none; | |
450 | box-shadow: none; | |
451 | } | |
452 | } | |
453 | ||
454 | .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-slider-active, | |
455 | .vjs-volume-panel.vjs-volume-panel-horizontal:active, | |
456 | .vjs-volume-panel.vjs-volume-panel-horizontal:focus, | |
457 | .vjs-volume-panel.vjs-volume-panel-horizontal:hover { | |
458 | width: 6em; | |
459 | transition-property: none; | |
460 | } | |
461 | ||
462 | .vjs-volume-panel .vjs-mute-control:hover ~ .vjs-volume-control.vjs-volume-horizontal { | |
463 | width: 3em; | |
464 | height: auto; | |
465 | } | |
466 | ||
467 | .vjs-volume-panel .vjs-mute-control:hover ~ .vjs-volume-control { | |
468 | transition-property: none; | |
469 | } | |
470 | ||
471 | .vjs-volume-panel { | |
472 | .vjs-mute-control { | |
473 | width: 2em; | |
474 | z-index: 1; | |
475 | padding: 0; | |
476 | } | |
477 | ||
478 | .vjs-volume-control { | |
479 | display: inline-block; | |
480 | position: relative; | |
481 | left: 5px; | |
482 | opacity: 1; | |
483 | width: 3em; | |
484 | height: auto; | |
485 | } | |
486 | } | |
487 | ||
488 | .vjs-peertube-link { | |
489 | @include disable-outline; | |
490 | @include disable-default-a-behaviour; | |
491 | ||
492 | text-decoration: none; | |
493 | line-height: $control-bar-height; | |
494 | font-weight: $font-semibold; | |
495 | padding: 0 5px; | |
496 | } | |
497 | ||
498 | .vjs-theater-control { | |
499 | @include disable-outline; | |
500 | @include margin-right(1px); | |
501 | ||
502 | width: 37px; | |
503 | cursor: pointer; | |
504 | ||
505 | .vjs-icon-placeholder { | |
506 | transition: transform 0.2s ease; | |
507 | display: inline-block; | |
508 | width: 22px; | |
509 | height: 22px; | |
510 | vertical-align: middle; | |
511 | background: url('#{$assets-path}/player/images/theater.svg') no-repeat; | |
512 | background-size: contain; | |
513 | ||
514 | &::before { | |
515 | content: ''; | |
516 | } | |
517 | } | |
518 | } | |
519 | ||
520 | .vjs-fullscreen-control { | |
521 | @include disable-outline; | |
522 | @include margin-left($first-control-bar-element-margin-left); | |
523 | ||
524 | width: 37px; | |
525 | ||
526 | .vjs-icon-placeholder { | |
527 | display: inline-block; | |
528 | width: 22px; | |
529 | height: 22px; | |
530 | vertical-align: middle; | |
531 | background: url('#{$assets-path}/player/images/fullscreen.svg') no-repeat; | |
532 | background-size: contain; | |
533 | ||
534 | &::before { | |
535 | content: ''; | |
536 | } | |
537 | } | |
538 | } | |
539 | ||
540 | .vjs-menu-button-popup { | |
541 | font-weight: $font-semibold; | |
542 | width: 50px; | |
543 | ||
544 | .vjs-resolution-button { | |
545 | @include disable-outline; | |
546 | } | |
547 | ||
548 | .vjs-menu { | |
549 | top: 20px; | |
550 | left: 0; | |
551 | ||
552 | .vjs-menu-content { | |
553 | width: 50px; | |
554 | bottom: 20px; | |
555 | } | |
556 | ||
557 | li { | |
558 | text-transform: none; | |
559 | font-size: 13px; | |
560 | } | |
561 | } | |
562 | } | |
563 | } | |
564 | ||
565 | @media screen and (max-width: 750px) { | |
566 | .vjs-theater-control { | |
567 | display: none; | |
568 | } | |
569 | ||
570 | .vjs-dock-text { | |
571 | font-size: 16px; | |
572 | } | |
573 | ||
574 | .vjs-dock-description { | |
575 | font-size: 9px; | |
576 | } | |
577 | ||
578 | .vjs-big-play-button { | |
579 | font-size: 5em; | |
580 | border-width: 3px; | |
581 | ||
582 | .vjs-icon-placeholder::before { | |
583 | @include big-play-button-triangle-size(32px); | |
584 | } | |
585 | } | |
586 | } | |
587 | ||
588 | @media screen and (max-width: 570px) { | |
589 | .vjs-dock-text { | |
590 | font-size: 14px; | |
591 | } | |
592 | ||
593 | .vjs-big-play-button { | |
594 | font-size: 4.5em; | |
595 | border-width: 2.5px; | |
596 | ||
597 | .vjs-icon-placeholder::before { | |
598 | @include big-play-button-triangle-size(27px); | |
599 | } | |
600 | } | |
601 | ||
602 | .vjs-peertube { | |
603 | padding: 0 !important; | |
604 | ||
605 | .vjs-peertube-displayed { | |
606 | display: none !important; | |
607 | } | |
608 | } | |
609 | ||
610 | &.vjs-live { | |
611 | .vjs-duration { | |
612 | display: none !important; | |
613 | } | |
614 | ||
615 | .vjs-peertube { | |
616 | display: none !important; | |
617 | } | |
618 | } | |
619 | } | |
620 | ||
621 | @media screen and (max-width: 350px) { | |
622 | .vjs-dock-text { | |
623 | font-size: 13px; | |
624 | } | |
625 | ||
626 | .vjs-big-play-button { | |
627 | font-size: 3em; | |
628 | border-width: 2px; | |
629 | ||
630 | .vjs-icon-placeholder::before { | |
631 | @include big-play-button-triangle-size(20px); | |
632 | } | |
633 | } | |
634 | ||
635 | .vjs-volume-control, | |
636 | .vjs-next-video, | |
637 | .vjs-previous-video { | |
638 | display: none !important; | |
639 | } | |
640 | ||
641 | .vjs-peertube-link { | |
642 | padding: 0 !important; | |
643 | } | |
644 | ||
645 | .vjs-settings { | |
646 | width: 33px; | |
647 | } | |
648 | ||
649 | .vjs-control-bar { | |
650 | > button:first-child { | |
651 | @include margin-left($first-control-bar-element-margin-left-small-width); | |
652 | } | |
653 | } | |
654 | ||
655 | .vjs-fullscreen-control { | |
656 | @include margin-right($first-control-bar-element-margin-left-small-width); | |
657 | } | |
658 | ||
659 | &.vjs-live { | |
660 | .vjs-current-time { | |
661 | display: none !important; | |
662 | } | |
663 | } | |
664 | } | |
665 | ||
666 | // Theater mode is enabled | |
667 | &.vjs-theater-enabled { | |
668 | .vjs-theater-control { | |
669 | width: 30px; | |
670 | ||
671 | .vjs-icon-placeholder { | |
672 | transform: scale(0.8); | |
673 | } | |
674 | } | |
675 | } | |
676 | ||
677 | // On fullscreen, hide theater control | |
678 | &.vjs-fullscreen { | |
679 | .vjs-theater-control { | |
680 | display: none; | |
681 | } | |
682 | } | |
683 | } | |
684 | ||
685 | // Play/pause animations | |
686 | .vjs-has-started .vjs-play-control { | |
687 | &.vjs-playing { | |
688 | animation: remove-pause-button 0.25s ease; | |
689 | } | |
690 | ||
691 | &.vjs-paused { | |
692 | animation: add-play-button 0.25s ease; | |
693 | } | |
694 | ||
695 | @keyframes remove-pause-button { | |
696 | 0% { | |
697 | transform: rotate(90deg); | |
698 | } | |
699 | 100% { | |
700 | transform: rotate(0deg); | |
701 | } | |
702 | } | |
703 | ||
704 | @keyframes add-play-button { | |
705 | 0% { | |
706 | transform: rotate(-90deg); | |
707 | } | |
708 | 100% { | |
709 | transform: rotate(0deg); | |
710 | } | |
711 | } | |
712 | } | |
713 | ||
714 | // Error display disabled | |
715 | .vjs-error:not(.vjs-error-display-enabled) { | |
716 | .vjs-error-display { | |
717 | display: none; | |
718 | } | |
719 | ||
720 | .vjs-loading-spinner { | |
721 | display: block; | |
722 | } | |
723 | } | |
724 | ||
725 | // Error display enabled | |
726 | .vjs-error.vjs-error-display-enabled { | |
727 | .vjs-error-display { | |
728 | display: block; | |
729 | } | |
730 | } | |
731 | ||
732 | .vjs-no-next-in-playlist { | |
733 | .vjs-next-video { | |
734 | cursor: default; | |
735 | ||
736 | .icon { | |
737 | background-color: rgba(255, 255, 255, 0.5); | |
738 | } | |
739 | } | |
740 | } |