]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - client/src/sass/video-js-custom.scss
Increase access_token lifetime
[github/Chocobozzz/PeerTube.git] / client / src / sass / video-js-custom.scss
CommitLineData
3ec8dc09
C
1@import '_variables';
2@import '_mixins';
3
864e782b
C
4@mixin big-play-button-triangle-size($triangle-size) {
5 width: $triangle-size;
6 height: $triangle-size;
7 top: calc(50% - #{$triangle-size / 2});
8 left: calc(53% - #{($triangle-size / 2)});
9}
10
c6352f2c 11$primary-foreground-color: #fff;
e993ecb3
C
12$primary-foreground-opacity: 0.9;
13$primary-foreground-opacity-hover: 1;
be6a4802 14$primary-background-color: #000;
e993ecb3 15
be6a4802
C
16$font-size: 13px;
17$control-bar-height: 34px;
aa8b6df4 18
e993ecb3
C
19$slider-bg-color: lighten($primary-background-color, 33%);
20
c6352f2c
C
21$setting-transition-duration: 0.15s;
22$setting-transition-easing: ease-out;
23
960a11e8
C
24$context-menu-width: 350px;
25
be6a4802
C
26.video-js.vjs-peertube-skin {
27 font-size: $font-size;
c6352f2c 28 color: $primary-foreground-color;
aa8b6df4 29
22b59e80
C
30 .vjs-dock-text {
31 padding-right: 10px;
32 }
33
34 .vjs-dock-description {
35 font-size: 11px;
36
c6352f2c 37 &::before, &::after {
22b59e80
C
38 display: inline-block;
39 content: '\1F308';
40 }
41
c6352f2c 42 &::before {
22b59e80
C
43 margin-right: 4px;
44 }
45
c6352f2c 46 &::after {
22b59e80
C
47 margin-left: 4px;
48 transform: scale(-1, 1);
49 }
50 }
51
be6a4802
C
52 .vjs-button > .vjs-icon-placeholder::before {
53 line-height: $control-bar-height;
aa8b6df4 54 }
e14852b4 55
c6352f2c 56 .vjs-volume-level::before {
be6a4802
C
57 content: ''; /* Remove Circle From Progress Bar */
58 }
e14852b4 59
be6a4802
C
60 .vjs-audio-button {
61 display: none;
62 }
e14852b4 63
be6a4802 64 .vjs-big-play-button {
9e6b41cc 65 outline: 0;
07fa4c97 66 font-size: 6em;
e14852b4 67
33d78552
C
68 $big-play-width: 1.2em;
69 $big-play-height: 1.2em;
e14852b4 70
864e782b 71 border: 6px solid #fff;
33d78552 72 border-radius: 100%;
e14852b4 73
e14852b4
C
74 left: 50%;
75 top: 50%;
8cac1b64
C
76 width: $big-play-width;
77 height: $big-play-height;
78 line-height: $big-play-height;
e14852b4
C
79 margin-left: -($big-play-width / 2);
80 margin-top: -($big-play-height / 2);
864e782b 81 transition: 0.4s opacity;
adcaf1a8
C
82
83 &::-moz-focus-inner {
84 border: 0;
85 padding: 0
86 }
80d1057b
C
87
88 .vjs-icon-placeholder::before {
864e782b
C
89 @include big-play-button-triangle-size(45px);
90
91 content: '';
92 background-image: url('../assets/player/images/big-play-button.svg');
80d1057b
C
93 }
94
8cac1b64 95 &:hover {
33d78552 96 opacity: 0.8;
80d1057b 97 }
be6a4802 98 }
e14852b4 99
864e782b
C
100 // Small effect when we click on the play button
101 &.vjs-has-big-play-button-clicked {
33d78552 102
864e782b
C
103 .vjs-big-play-button, .vjs-poster {
104 display: block;
105 visibility: hidden;
33d78552 106
864e782b 107 &.vjs-big-play-button, &.vjs-big-play-button::before {
33d78552 108 opacity: 0;
864e782b 109 transition: visibility 0.2s, opacity 0.2s;
33d78552 110 }
864e782b
C
111
112 &.vjs-poster, &.vjs-poster::before {
113 opacity: 0;
114 transition: visibility 0.3s, opacity 0.3s;
115 transition-delay: 0.05s;
33d78552
C
116 }
117 }
8fa5653a
C
118 }
119
e6f62797
C
120 // Hide the big play button on autoplay
121 &.vjs-has-autoplay {
122 .vjs-big-play-button {
123 display: none !important;
124 }
125 }
126
be6a4802
C
127 .vjs-control-bar,
128 .vjs-big-play-button,
c6352f2c 129 .vjs-settings-dialog {
be6a4802
C
130 background-color: rgba($primary-background-color, 0.5);
131 }
e14852b4 132
be6a4802
C
133 .vjs-poster {
134 outline: none; /* Remove Blue Outline on Click*/
135 outline: 0;
136 }
e14852b4 137
be6a4802
C
138 .vjs-control-bar {
139 height: $control-bar-height;
e14852b4 140
6b9af129
C
141 .vjs-progress-control,
142 .vjs-play-control,
143 .vjs-playback-rate,
144 .vjs-mute-control,
145 .vjs-volume-control,
146 .vjs-resolution-control,
c6352f2c
C
147 .vjs-fullscreen-control,
148 .vjs-peertube-link,
149 .vjs-settings
6b9af129 150 {
c6352f2c 151 color: $primary-foreground-color !important;
6b9af129
C
152 opacity: $primary-foreground-opacity;
153 transition: opacity .1s;
154
155 &:hover {
156 opacity: $primary-foreground-opacity-hover;
157 }
158 }
159
160 .vjs-current-time,
161 .vjs-duration,
162 .vjs-peertube {
163 color: $primary-foreground-color;
c6352f2c 164 opacity: $primary-foreground-opacity;
6b9af129
C
165 }
166
77728efa
C
167 .vjs-slider {
168 background-color: rgba(255, 255, 255, .2);
169 border-radius: 2px;
170 height: 5px;
171
172 .vjs-slider-bar {
173 background: $primary-foreground-color;
174 }
175 }
176
177 .vjs-play-progress {
8e53163f 178 padding-right: 4px;
77728efa
C
179
180 &::before {
181 top: -0.3em;
182
183 &:hover {
184 top: -0.372em;
185 }
186 }
187
188 .vjs-time-tooltip {
189 display: none;
190 }
191 }
192
193 .vjs-load-progress {
194 &, & div {
195 background: rgba(255, 255, 255, .2);
196 }
197 }
198
be6a4802
C
199 .vjs-progress-control {
200 bottom: 34px;
201 width: 100%;
202 position: absolute;
203 height: 5px;
e14852b4 204
be6a4802
C
205 .vjs-progress-holder {
206 margin: 0;
207 border-radius: 0;
208 }
209 }
e14852b4 210
be6a4802 211 .vjs-play-control {
3ec8dc09
C
212 @include disable-outline;
213
c6352f2c 214 cursor: pointer;
be6a4802
C
215 font-size: $font-size;
216 padding: 0 17px;
217 margin-right: 5px;
218 }
e14852b4 219
be6a4802 220 .vjs-time-control {
8e53163f
C
221 line-height: inherit;
222
be6a4802
C
223 &.vjs-current-time {
224 font-size: $font-size;
225 display: inline-block;
226 padding: 0;
227
228 .vjs-current-time-display {
86f278cb 229 line-height: calc(#{$control-bar-height} + 1px);
be6a4802
C
230
231 &::after {
232 content: "/";
233 margin: 0 1px 0 2px;
234 }
235 }
236 }
237
238 &.vjs-duration {
239 font-size: $font-size;
240 display: inline-block;
241 padding: 0;
be6a4802 242 .vjs-duration-display {
86f278cb 243 line-height: calc(#{$control-bar-height} + 1px);
be6a4802
C
244 }
245 }
246
247 &.vjs-remaining-time {
248 display: none;
249 }
250 }
e14852b4 251
bf5685f0 252 .vjs-peertube {
be6a4802
C
253 width: 100%;
254 line-height: $control-bar-height;
255 text-align: right;
be6a4802 256
bf5685f0 257 .vjs-peertube-displayed {
a86309b4
C
258 display: block;
259 }
260
bf5685f0 261 .vjs-peertube-hidden {
a86309b4
C
262 display: none;
263 }
264
be6a4802
C
265 .download-speed-number, .upload-speed-number, .peers-number {
266 font-weight: $font-semibold;
267 }
268
269 .download-speed-text, .upload-speed-text, .peers-text {
270 margin-right: 15px;
271 }
272
273 .icon {
274 display: inline-block;
275 width: 15px;
276 height: 15px;
277 background-size: contain;
278 vertical-align: middle;
279 background-repeat: no-repeat;
280 margin-right: 6px;
281 position: relative;
282 top: -1px;
283
284 &.icon-download {
285 background-image: url('../assets/player/images/arrow-down.svg');
286 }
287
288 &.icon-upload {
289 background-image: url('../assets/player/images/arrow-up.svg');
290 }
291 }
292 }
e14852b4 293
57886d66 294 .vjs-playback-rate {
295 font-size: 10px;
3ec8dc09 296 width: 37px !important;
a73c582e
C
297
298 .vjs-playback-rate-value {
299 font-size: 13px;
300 line-height: $control-bar-height;
301 }
3ec8dc09
C
302
303 .vjs-menu .vjs-menu-content {
304 width: 37px !important;
305 }
57886d66 306 }
307
be6a4802 308 .vjs-mute-control {
3ec8dc09
C
309 @include disable-outline;
310
311 line-height: $control-bar-height;
312 padding: 0;
313 width: 30px;
d7701449 314
be6a4802
C
315 .vjs-icon-placeholder {
316 display: inline-block;
317 width: 22px;
318 height: 22px;
319 vertical-align: middle;
320 background: url('../assets/player/images/volume.svg') no-repeat;
321 background-size: contain;
322
323 &::before {
324 content: '';
325 }
326 }
327
328 &.vjs-vol-0 .vjs-icon-placeholder {
329 background: url('../assets/player/images/volume-mute.svg') no-repeat;
330 background-size: contain;
331 }
332 }
e14852b4 333
3ec8dc09
C
334 .vjs-volume-control {
335 width: 30px;
c6352f2c 336 margin: 0 5px 0 0;
be6a4802 337 }
e14852b4 338
be6a4802
C
339 .vjs-volume-bar {
340 background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACwAAAAcCAQAAACw95UnAAAAMElEQVRIx2NgoBL4n4YKGUYNHkEG4zJg1OCRYDCpBowaPJwMppbLRg0eNXjUYBLEAXWNUA6QNm1lAAAAAElFTkSuQmCC) no-repeat;
341 background-size: 22px 14px;
342 height: 100%;
343 width: 100%;
344 max-width: 22px;
345 max-height: 14px;
346 margin: 7px 4px;
347 border-radius: 0;
348 top: 3px;
349
350 .vjs-volume-level {
351 background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACwAAAAcAQAAAAAyhWABAAAAAnRSTlMAAHaTzTgAAAAZSURBVHgBYwAB/g9EUv+JokCqiaT+U4MCAPKPS7WUUOc1AAAAAElFTkSuQmCC) no-repeat;
352 background-size: 22px 14px;
353 max-width: 22px;
354 max-height: 14px;
355 height: 100%;
356 }
357 }
e14852b4 358
be6a4802
C
359 .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-slider-active,
360 .vjs-volume-panel.vjs-volume-panel-horizontal:active,
361 .vjs-volume-panel.vjs-volume-panel-horizontal:focus,
362 .vjs-volume-panel.vjs-volume-panel-horizontal:hover {
363 width: 6em;
364 transition-property: none;
365 }
e14852b4 366
be6a4802
C
367 .vjs-volume-panel .vjs-mute-control:hover ~ .vjs-volume-control.vjs-volume-horizontal {
368 width: 3em;
369 height: auto;
370 }
e14852b4 371
be6a4802
C
372 .vjs-volume-panel .vjs-mute-control:hover ~ .vjs-volume-control {
373 transition-property: none;
374 }
e14852b4 375
be6a4802
C
376 .vjs-volume-panel {
377 .vjs-mute-control {
378 width: 2em;
379 z-index: 1;
380 padding: 0;
381 }
382
383 .vjs-volume-control {
384 display: inline-block;
385 position: relative;
386 left: 5px;
387 opacity: 1;
388 width: 3em;
389 height: auto;
390 }
391 }
e14852b4 392
c6352f2c
C
393 .vjs-peertube-link {
394 @include disable-outline;
395 @include disable-default-a-behaviour;
396
397 text-decoration: none;
398 line-height: $control-bar-height;
399 font-weight: $font-semibold;
400 padding: 0 5px;
401 }
402
be6a4802 403 .vjs-fullscreen-control {
3ec8dc09
C
404 @include disable-outline;
405
be6a4802
C
406 width: 37px;
407
408 .vjs-icon-placeholder {
409 display: inline-block;
410 width: 22px;
411 height: 22px;
412 vertical-align: middle;
413 background: url('../assets/player/images/fullscreen.svg') no-repeat;
414 background-size: contain;
415
416 &::before {
417 content: '';
418 }
419 }
420 }
e14852b4 421
be6a4802 422 .vjs-menu-button-popup {
be6a4802 423 font-weight: $font-semibold;
86f278cb 424 width: 50px;
be6a4802 425
be6a4802 426 .vjs-resolution-button {
3ec8dc09 427 @include disable-outline;
be6a4802
C
428 }
429
430 .vjs-menu {
431 top: 20px;
3ec8dc09 432 left: 0;
be6a4802
C
433
434 .vjs-menu-content {
86f278cb 435 width: 50px;
3ec8dc09 436 bottom: 20px;
be6a4802
C
437 }
438
439 li {
440 text-transform: none;
441 font-size: 13px;
442 }
443 }
444 }
445 }
a86309b4 446
6cf57b44
C
447 @media screen and (max-width: 750px) {
448 .vjs-dock-text {
449 font-size: 16px;
450 }
451
452 .vjs-dock-description {
3c40590d 453 font-size: 9px;
6cf57b44
C
454 }
455
456 .vjs-big-play-button {
457 font-size: 5em;
458 border-width: 5px;
459
460 .vjs-icon-placeholder::before {
461 @include big-play-button-triangle-size(32px);
462 }
463 }
464 }
465
e700d33b 466 @media screen and (max-width: 570px) {
869968d7
C
467 .vjs-dock-text {
468 font-size: 14px;
469 }
470
8fa5653a 471 .vjs-big-play-button {
869968d7 472 font-size: 4.5em;
864e782b
C
473 border-width: 4.5px;
474
475 .vjs-icon-placeholder::before {
476 @include big-play-button-triangle-size(27px);
477 }
8fa5653a
C
478 }
479
a73c582e
C
480 .vjs-playback-rate {
481 display: none;
482 }
483
7ccfb37f 484 .vjs-peertube {
86f278cb
C
485 padding: 0 !important;
486
7ccfb37f 487 .vjs-peertube-displayed {
86f278cb
C
488 display: none !important;
489 }
490 }
491 }
492
493 @media screen and (max-width: 300px) {
8fa5653a 494 .vjs-dock-text {
22b59e80
C
495 font-size: 13px;
496 }
497
8fa5653a 498 .vjs-big-play-button {
586f7c1b 499 font-size: 3em;
864e782b
C
500 border-width: 3px;
501
502 .vjs-icon-placeholder::before {
503 @include big-play-button-triangle-size(20px);
504 }
8fa5653a
C
505 }
506
86f278cb 507 .vjs-volume-control {
a86309b4
C
508 display: none !important;
509 }
86f278cb 510
ea20306f
C
511 .vjs-peertube-link {
512 padding: 0 !important;
513 }
514
515 .vjs-settings {
516 width: 33px;
86f278cb 517 }
a86309b4 518 }
e14852b4 519}
b7a48512 520
c6352f2c
C
521// Play/pause animations
522.vjs-has-started .vjs-play-control {
523 &.vjs-playing {
524 animation: remove-pause-button 0.25s ease;
525 }
526
527 &.vjs-paused {
528 animation: add-play-button 0.25s ease;
529 }
530
531 @keyframes remove-pause-button {
532 0% {
533 transform: rotate(90deg);
534 }
535 100% {
536 transform: rotate(0deg);
537 }
538 }
539
540 @keyframes add-play-button {
541 0% {
542 transform: rotate(-90deg);
543 }
544 100% {
545 transform: rotate(0deg);
546 }
547 }
548}
549
b7a48512
C
550// Thanks: https://projects.lukehaas.me/css-loaders/
551.vjs-loading-spinner {
fd45e8f4 552 left: 50%;
b7a48512 553 font-size: 10px;
fd45e8f4
C
554 text-indent: -9999em;
555 border: 0.7em solid rgba(255, 255, 255, 0.2);
556 border-left-color: #ffffff;
b7a48512 557 transform: translateZ(0);
9581cabc 558 animation: 0.3s ease-out 1.1s forwards vjs-spinner-show, spinner 1.4s infinite linear !important;
b2731bff 559 overflow: hidden;
dfbd250d 560 visibility: hidden;
b7a48512 561
c6352f2c 562 &::before {
b7a48512 563 animation: none !important;
b7a48512
C
564 }
565
c6352f2c 566 &::after {
b7a48512 567 border-radius: 50%;
fd45e8f4
C
568 width: 6em;
569 height: 6em;
b7a48512
C
570 animation: none !important;
571 }
572
fd45e8f4 573 @keyframes spinner {
b7a48512 574 0% {
b7a48512
C
575 transform: rotate(0deg);
576 }
577 100% {
b7a48512
C
578 transform: rotate(360deg);
579 }
580 }
dfbd250d
C
581
582 @keyframes vjs-spinner-show {
583 0% {
584 display: none;
585 opacity: 0;
586 }
587
588 1% {
589 display: block;
590 visibility: visible;
591 opacity: 0;
592 }
593
594 100% {
595 display: block;
596 visibility: visible;
597 opacity: 1;
598 }
599 }
b7a48512 600}
a86309b4 601
bf5685f0
C
602// Error display disabled
603.vjs-error:not(.vjs-error-display-enabled) {
604 .vjs-error-display {
605 display: none;
606 }
607
608 .vjs-loading-spinner {
609 display: block;
610 }
611}
612
613// Error display enabled
614.vjs-error.vjs-error-display-enabled {
615 .vjs-error-display {
616 display: block;
617 }
618}
c6352f2c
C
619
620
621/* Sass for videojs-settings-menu */
622
623.video-js {
624
625 .vjs-settings {
626 @include disable-outline;
627
628 cursor: pointer;
629 width: 37px;
630
631 .vjs-icon-placeholder {
632 display: inline-block;
633 width: 17px;
634 height: 17px;
635 vertical-align: middle;
636 background: url('../assets/player/images/settings.svg') no-repeat;
637 background-size: contain;
638
639 &::before {
640 content: '';
641 }
642 }
643 }
644
645 .vjs-settings-sub-menu-title {
646 width: 4em;
647 text-transform: initial;
648 }
649
650 .vjs-settings-dialog {
651 position: absolute;
652 right: .5em;
653 bottom: 3.5em;
654 color: $primary-foreground-color;
655 opacity: $primary-foreground-opacity;
656 margin: 0 auto;
657 font-size: $font-size !important;
658
659 width: auto;
660 overflow: hidden;
661
662 transition: width $setting-transition-duration $setting-transition-easing, height $setting-transition-duration $setting-transition-easing;
663
664 .vjs-settings-sub-menu-value,
665 .vjs-settings-sub-menu-title {
666 display: table-cell;
667 padding: 0 5px;
668 }
669
670 .vjs-settings-sub-menu-title {
671 text-align: left;
672 font-weight: $font-semibold;
673 }
674
675 .vjs-settings-sub-menu-value {
676 width: 100%;
677 text-align: right;
a8462c8e
C
678
679 small {
680 font-size: 0.85em;
681 opacity: 0.8;
682 }
c6352f2c
C
683 }
684
685 .vjs-settings-panel {
686 position: absolute;
687 bottom: 0;
688 right: 0;
689 overflow-y: auto;
690 overflow-x: hidden;
691 border-radius: 1px;
692 }
693
694 .vjs-settings-panel-child {
695 display: flex;
696
697 align-items: flex-end;
698 white-space: nowrap;
699
700 &:focus,
701 &:active {
702 outline: none;
703 }
704
705 > .vjs-menu {
706 flex: 1;
707 min-width: 200px;
708 }
709
710 > .vjs-menu,
711 > .vjs-settings-sub-menu {
712 transition: all $setting-transition-duration $setting-transition-easing;
713
714 .vjs-menu-item {
715
33d78552
C
716 &:hover {
717 background-color: rgba(255, 255, 255, 0.2);
718 }
719
c6352f2c
C
720 &:first-child {
721 margin-top: 5px;
722 }
723
724 &:last-child {
725 margin-bottom: 5px;
726 }
727 }
728
729 li {
730 font-size: 1em;
731 text-transform: initial;
732
733 &:hover {
734 cursor: pointer;
735 }
736 }
737 }
738
739 > .vjs-menu {
740 .vjs-menu-item {
741 padding: 8px 16px;
742 }
743
744 .vjs-settings-sub-menu-value::after {
745 @include chevron-right(9px, 2px);
746
747 margin-left: 5px;
748 }
749 }
750
751 > .vjs-settings-sub-menu {
752 width: 80px;
753
754 .vjs-menu-item {
755 outline: 0;
756 font-weight: $font-semibold;
757
758 padding: 5px 8px;
759 text-align: right;
760
761 &.vjs-back-button {
762 background-color: inherit;
763 padding: 8px 8px 13px 8px;
764 margin-bottom: 5px;
765 border-bottom: 1px solid grey;
766
767 &::before {
768 @include chevron-left(9px, 2px);
769
770 margin-right: 5px;
771 }
772 }
773
774 &.vjs-selected {
775 background-color: inherit;
776 color: inherit;
777 position: relative;
778
779 &::before {
780 @include icon(15px);
781
782 position: absolute;
783 left: 8px;
784 content: ' ';
785 margin-top: 1px;
786 background-image: url('../assets/player/images/tick.svg');
787 }
788 }
789 }
790 }
791 }
792 }
960a11e8
C
793}
794
795/* Sass for videojs-contextmenu-ui */
796
797.video-js .vjs-contextmenu-ui-menu {
798 position: absolute;
799 background-color: rgba(0, 0, 0, 0.5);
800 padding: 5px 0;
801 width: $context-menu-width;
802
803 .vjs-menu-content {
804 opacity: $primary-foreground-opacity;
805 color: $primary-foreground-color;
806 font-size: $font-size !important;
807 font-weight: $font-semibold;
808 }
809
810 .vjs-menu-item {
811 cursor: pointer;
812 font-size: 1em;
813 padding: 8px 16px;
814 text-align: left;
815 text-transform: none;
816
817 &:hover {
818 background-color: rgba(255, 255, 255, 0.2);
819 }
820 }
c6352f2c 821}