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