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