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