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