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