]>
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 | ||
31b6ddf8 | 24 | .text::before, .text::after { |
22b59e80 C |
25 | display: inline-block; |
26 | content: '\1F308'; | |
27 | } | |
28 | ||
31b6ddf8 | 29 | .text::before { |
22b59e80 C |
30 | margin-right: 4px; |
31 | } | |
32 | ||
31b6ddf8 | 33 | .text::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 | |
e0812403 | 58 | border: 4px 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; | |
b335ccec | 409 | cursor: pointer; |
054a103b C |
410 | |
411 | .vjs-icon-placeholder { | |
4555697f | 412 | transition: transform 0.2s ease; |
054a103b C |
413 | display: inline-block; |
414 | width: 22px; | |
415 | height: 22px; | |
416 | vertical-align: middle; | |
417 | background: url('#{$assets-path}/player/images/theater.svg') no-repeat; | |
418 | background-size: contain; | |
419 | ||
420 | &::before { | |
421 | content: ''; | |
422 | } | |
423 | } | |
424 | } | |
425 | ||
be6a4802 | 426 | .vjs-fullscreen-control { |
3ec8dc09 C |
427 | @include disable-outline; |
428 | ||
be6a4802 | 429 | width: 37px; |
2ce2fd7f | 430 | margin-right: 11px; |
be6a4802 C |
431 | |
432 | .vjs-icon-placeholder { | |
433 | display: inline-block; | |
434 | width: 22px; | |
435 | height: 22px; | |
436 | vertical-align: middle; | |
2a19a1e4 | 437 | background: url('#{$assets-path}/player/images/fullscreen.svg') no-repeat; |
be6a4802 C |
438 | background-size: contain; |
439 | ||
440 | &::before { | |
441 | content: ''; | |
442 | } | |
443 | } | |
444 | } | |
e14852b4 | 445 | |
be6a4802 | 446 | .vjs-menu-button-popup { |
be6a4802 | 447 | font-weight: $font-semibold; |
86f278cb | 448 | width: 50px; |
be6a4802 | 449 | |
be6a4802 | 450 | .vjs-resolution-button { |
3ec8dc09 | 451 | @include disable-outline; |
be6a4802 C |
452 | } |
453 | ||
454 | .vjs-menu { | |
455 | top: 20px; | |
3ec8dc09 | 456 | left: 0; |
be6a4802 C |
457 | |
458 | .vjs-menu-content { | |
86f278cb | 459 | width: 50px; |
3ec8dc09 | 460 | bottom: 20px; |
be6a4802 C |
461 | } |
462 | ||
463 | li { | |
464 | text-transform: none; | |
465 | font-size: 13px; | |
466 | } | |
467 | } | |
468 | } | |
469 | } | |
a86309b4 | 470 | |
6cf57b44 | 471 | @media screen and (max-width: 750px) { |
054a103b C |
472 | .vjs-theater-control { |
473 | display: none; | |
474 | } | |
475 | ||
6cf57b44 C |
476 | .vjs-dock-text { |
477 | font-size: 16px; | |
478 | } | |
479 | ||
480 | .vjs-dock-description { | |
3c40590d | 481 | font-size: 9px; |
6cf57b44 C |
482 | } |
483 | ||
484 | .vjs-big-play-button { | |
485 | font-size: 5em; | |
e0812403 | 486 | border-width: 3px; |
6cf57b44 C |
487 | |
488 | .vjs-icon-placeholder::before { | |
489 | @include big-play-button-triangle-size(32px); | |
490 | } | |
491 | } | |
492 | } | |
493 | ||
e700d33b | 494 | @media screen and (max-width: 570px) { |
869968d7 C |
495 | .vjs-dock-text { |
496 | font-size: 14px; | |
497 | } | |
498 | ||
8fa5653a | 499 | .vjs-big-play-button { |
869968d7 | 500 | font-size: 4.5em; |
e0812403 | 501 | border-width: 2.5px; |
864e782b C |
502 | |
503 | .vjs-icon-placeholder::before { | |
504 | @include big-play-button-triangle-size(27px); | |
505 | } | |
8fa5653a C |
506 | } |
507 | ||
7ccfb37f | 508 | .vjs-peertube { |
86f278cb C |
509 | padding: 0 !important; |
510 | ||
7ccfb37f | 511 | .vjs-peertube-displayed { |
86f278cb C |
512 | display: none !important; |
513 | } | |
514 | } | |
515 | } | |
516 | ||
517 | @media screen and (max-width: 300px) { | |
8fa5653a | 518 | .vjs-dock-text { |
22b59e80 C |
519 | font-size: 13px; |
520 | } | |
521 | ||
8fa5653a | 522 | .vjs-big-play-button { |
586f7c1b | 523 | font-size: 3em; |
e0812403 | 524 | border-width: 2px; |
864e782b C |
525 | |
526 | .vjs-icon-placeholder::before { | |
527 | @include big-play-button-triangle-size(20px); | |
528 | } | |
8fa5653a C |
529 | } |
530 | ||
86f278cb | 531 | .vjs-volume-control { |
a86309b4 C |
532 | display: none !important; |
533 | } | |
86f278cb | 534 | |
ea20306f C |
535 | .vjs-peertube-link { |
536 | padding: 0 !important; | |
537 | } | |
538 | ||
539 | .vjs-settings { | |
540 | width: 33px; | |
86f278cb | 541 | } |
a86309b4 | 542 | } |
4555697f C |
543 | |
544 | // Theater mode is enabled | |
545 | &.vjs-theater-enabled { | |
546 | .vjs-theater-control { | |
547 | width: 30px; | |
548 | ||
549 | .vjs-icon-placeholder { | |
550 | transform: scale(0.8); | |
551 | } | |
552 | } | |
553 | } | |
554 | ||
555 | // On fullscreen, hide theater control | |
556 | &.vjs-fullscreen { | |
557 | .vjs-theater-control { | |
558 | display: none; | |
559 | } | |
560 | } | |
e14852b4 | 561 | } |
b7a48512 | 562 | |
c6352f2c C |
563 | // Play/pause animations |
564 | .vjs-has-started .vjs-play-control { | |
565 | &.vjs-playing { | |
566 | animation: remove-pause-button 0.25s ease; | |
567 | } | |
568 | ||
569 | &.vjs-paused { | |
570 | animation: add-play-button 0.25s ease; | |
571 | } | |
572 | ||
573 | @keyframes remove-pause-button { | |
574 | 0% { | |
575 | transform: rotate(90deg); | |
576 | } | |
577 | 100% { | |
578 | transform: rotate(0deg); | |
579 | } | |
580 | } | |
581 | ||
582 | @keyframes add-play-button { | |
583 | 0% { | |
584 | transform: rotate(-90deg); | |
585 | } | |
586 | 100% { | |
587 | transform: rotate(0deg); | |
588 | } | |
589 | } | |
590 | } | |
591 | ||
bf5685f0 C |
592 | // Error display disabled |
593 | .vjs-error:not(.vjs-error-display-enabled) { | |
594 | .vjs-error-display { | |
595 | display: none; | |
596 | } | |
597 | ||
598 | .vjs-loading-spinner { | |
599 | display: block; | |
600 | } | |
601 | } | |
602 | ||
603 | // Error display enabled | |
604 | .vjs-error.vjs-error-display-enabled { | |
605 | .vjs-error-display { | |
606 | display: block; | |
607 | } | |
e0812403 | 608 | } |