]>
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 | ||
597ca6de | 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 | ||
e6f62797 C |
119 | // Hide the big play button on autoplay |
120 | &.vjs-has-autoplay { | |
121 | .vjs-big-play-button { | |
122 | display: none !important; | |
123 | } | |
124 | } | |
125 | ||
be6a4802 C |
126 | .vjs-control-bar, |
127 | .vjs-big-play-button, | |
c6352f2c | 128 | .vjs-settings-dialog { |
5efab546 | 129 | background-color: var(--embedBigPlayBackgroundColor); |
be6a4802 | 130 | } |
e14852b4 | 131 | |
be6a4802 C |
132 | .vjs-poster { |
133 | outline: none; /* Remove Blue Outline on Click*/ | |
134 | outline: 0; | |
135 | } | |
e14852b4 | 136 | |
be6a4802 C |
137 | .vjs-control-bar { |
138 | height: $control-bar-height; | |
fc16f981 C |
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); | |
0aabe3f6 | 141 | text-shadow: 0 0 2px rgba(0, 0, 0, 0.5); |
e14852b4 | 142 | |
6b9af129 C |
143 | .vjs-progress-control, |
144 | .vjs-play-control, | |
145 | .vjs-playback-rate, | |
146 | .vjs-mute-control, | |
147 | .vjs-volume-control, | |
148 | .vjs-resolution-control, | |
c6352f2c C |
149 | .vjs-fullscreen-control, |
150 | .vjs-peertube-link, | |
054a103b | 151 | .vjs-theater-control, |
c6352f2c | 152 | .vjs-settings |
6b9af129 | 153 | { |
5efab546 C |
154 | color: var(--embedForegroundColor) !important; |
155 | ||
6b9af129 C |
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 { | |
5efab546 | 167 | color: var(--embedForegroundColor); |
c6352f2c | 168 | opacity: $primary-foreground-opacity; |
6b9af129 C |
169 | } |
170 | ||
2ce2fd7f C |
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; | |
77728efa | 178 | |
2ce2fd7f C |
179 | .vjs-slider { |
180 | margin: 0; | |
181 | border-radius: 0; | |
182 | background-color: rgba(255, 255, 255, .2); | |
183 | height: 3px; | |
184 | transition: none; | |
77728efa | 185 | |
2ce2fd7f | 186 | .vjs-play-progress { |
5efab546 | 187 | background: var(--embedForegroundColor); |
77728efa | 188 | |
2ce2fd7f C |
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; | |
77728efa | 194 | |
2ce2fd7f C |
195 | top: -0.3em; |
196 | } | |
77728efa | 197 | |
2ce2fd7f C |
198 | .vjs-time-tooltip { |
199 | display: none; | |
200 | } | |
201 | } | |
77728efa | 202 | |
2ce2fd7f C |
203 | .vjs-load-progress { |
204 | &, & div { | |
205 | background: rgba(255, 255, 255, .2); | |
206 | } | |
207 | } | |
77728efa C |
208 | } |
209 | } | |
210 | ||
2ce2fd7f | 211 | .vjs-progress-control:hover .vjs-slider, |
3d5de919 | 212 | .vjs-progress-control .vjs-slider.vjs-sliding { |
be6a4802 | 213 | height: 5px; |
e14852b4 | 214 | |
2ce2fd7f C |
215 | .vjs-play-progress::before { |
216 | opacity: 1; | |
be6a4802 C |
217 | } |
218 | } | |
e14852b4 | 219 | |
2ce2fd7f | 220 | |
be6a4802 | 221 | .vjs-play-control { |
3ec8dc09 C |
222 | @include disable-outline; |
223 | ||
c6352f2c | 224 | cursor: pointer; |
be6a4802 | 225 | font-size: $font-size; |
be6a4802 C |
226 | margin-right: 5px; |
227 | } | |
e14852b4 | 228 | |
be6a4802 | 229 | .vjs-time-control { |
8e53163f C |
230 | line-height: inherit; |
231 | ||
be6a4802 C |
232 | &.vjs-current-time { |
233 | font-size: $font-size; | |
234 | display: inline-block; | |
235 | padding: 0; | |
236 | ||
237 | .vjs-current-time-display { | |
86f278cb | 238 | line-height: calc(#{$control-bar-height} + 1px); |
be6a4802 C |
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; | |
be6a4802 | 251 | .vjs-duration-display { |
86f278cb | 252 | line-height: calc(#{$control-bar-height} + 1px); |
be6a4802 C |
253 | } |
254 | } | |
255 | ||
256 | &.vjs-remaining-time { | |
257 | display: none; | |
258 | } | |
259 | } | |
e14852b4 | 260 | |
bf5685f0 | 261 | .vjs-peertube { |
be6a4802 C |
262 | width: 100%; |
263 | line-height: $control-bar-height; | |
264 | text-align: right; | |
be6a4802 | 265 | |
bf5685f0 | 266 | .vjs-peertube-displayed { |
a86309b4 C |
267 | display: block; |
268 | } | |
269 | ||
bf5685f0 | 270 | .vjs-peertube-hidden { |
a86309b4 C |
271 | display: none; |
272 | } | |
273 | ||
1ee156b2 | 274 | .download-speed-number, .upload-speed-number, .peers-number, .http-fallback { |
be6a4802 C |
275 | font-weight: $font-semibold; |
276 | } | |
277 | ||
1ee156b2 | 278 | .download-speed-text, .upload-speed-text, .peers-text, .http-fallback { |
be6a4802 C |
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 { | |
2a19a1e4 | 294 | background-image: url('#{$assets-path}/player/images/arrow-down.svg'); |
be6a4802 C |
295 | } |
296 | ||
297 | &.icon-upload { | |
2a19a1e4 | 298 | background-image: url('#{$assets-path}/player/images/arrow-up.svg'); |
be6a4802 C |
299 | } |
300 | } | |
301 | } | |
e14852b4 | 302 | |
57886d66 | 303 | .vjs-playback-rate { |
304 | font-size: 10px; | |
3ec8dc09 | 305 | width: 37px !important; |
a73c582e C |
306 | |
307 | .vjs-playback-rate-value { | |
308 | font-size: 13px; | |
309 | line-height: $control-bar-height; | |
310 | } | |
3ec8dc09 C |
311 | |
312 | .vjs-menu .vjs-menu-content { | |
313 | width: 37px !important; | |
314 | } | |
57886d66 | 315 | } |
316 | ||
be6a4802 | 317 | .vjs-mute-control { |
3ec8dc09 C |
318 | @include disable-outline; |
319 | ||
320 | line-height: $control-bar-height; | |
321 | padding: 0; | |
322 | width: 30px; | |
d7701449 | 323 | |
be6a4802 C |
324 | .vjs-icon-placeholder { |
325 | display: inline-block; | |
326 | width: 22px; | |
327 | height: 22px; | |
328 | vertical-align: middle; | |
2a19a1e4 | 329 | background: url('#{$assets-path}/player/images/volume.svg') no-repeat; |
be6a4802 C |
330 | background-size: contain; |
331 | ||
332 | &::before { | |
333 | content: ''; | |
334 | } | |
335 | } | |
336 | ||
337 | &.vjs-vol-0 .vjs-icon-placeholder { | |
2a19a1e4 | 338 | background: url('#{$assets-path}/player/images/volume-mute.svg') no-repeat; |
be6a4802 C |
339 | background-size: contain; |
340 | } | |
341 | } | |
e14852b4 | 342 | |
3ec8dc09 C |
343 | .vjs-volume-control { |
344 | width: 30px; | |
c6352f2c | 345 | margin: 0 5px 0 0; |
be6a4802 | 346 | } |
e14852b4 | 347 | |
be6a4802 C |
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 | } | |
3d5de919 C |
366 | |
367 | &:focus { | |
368 | text-shadow: none; | |
369 | box-shadow: none; | |
370 | } | |
be6a4802 | 371 | } |
e14852b4 | 372 | |
be6a4802 C |
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 | } | |
e14852b4 | 380 | |
be6a4802 C |
381 | .vjs-volume-panel .vjs-mute-control:hover ~ .vjs-volume-control.vjs-volume-horizontal { |
382 | width: 3em; | |
383 | height: auto; | |
384 | } | |
e14852b4 | 385 | |
be6a4802 C |
386 | .vjs-volume-panel .vjs-mute-control:hover ~ .vjs-volume-control { |
387 | transition-property: none; | |
388 | } | |
e14852b4 | 389 | |
be6a4802 C |
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 | } | |
e14852b4 | 406 | |
c6352f2c C |
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 | ||
054a103b C |
417 | .vjs-theater-control { |
418 | @include disable-outline; | |
419 | ||
420 | width: 37px; | |
421 | margin-right: 1px; | |
b335ccec | 422 | cursor: pointer; |
054a103b C |
423 | |
424 | .vjs-icon-placeholder { | |
4555697f | 425 | transition: transform 0.2s ease; |
054a103b C |
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 | ||
be6a4802 | 439 | .vjs-fullscreen-control { |
3ec8dc09 C |
440 | @include disable-outline; |
441 | ||
be6a4802 | 442 | width: 37px; |
2ce2fd7f | 443 | margin-right: 11px; |
be6a4802 C |
444 | |
445 | .vjs-icon-placeholder { | |
446 | display: inline-block; | |
447 | width: 22px; | |
448 | height: 22px; | |
449 | vertical-align: middle; | |
2a19a1e4 | 450 | background: url('#{$assets-path}/player/images/fullscreen.svg') no-repeat; |
be6a4802 C |
451 | background-size: contain; |
452 | ||
453 | &::before { | |
454 | content: ''; | |
455 | } | |
456 | } | |
457 | } | |
e14852b4 | 458 | |
be6a4802 | 459 | .vjs-menu-button-popup { |
be6a4802 | 460 | font-weight: $font-semibold; |
86f278cb | 461 | width: 50px; |
be6a4802 | 462 | |
be6a4802 | 463 | .vjs-resolution-button { |
3ec8dc09 | 464 | @include disable-outline; |
be6a4802 C |
465 | } |
466 | ||
467 | .vjs-menu { | |
468 | top: 20px; | |
3ec8dc09 | 469 | left: 0; |
be6a4802 C |
470 | |
471 | .vjs-menu-content { | |
86f278cb | 472 | width: 50px; |
3ec8dc09 | 473 | bottom: 20px; |
be6a4802 C |
474 | } |
475 | ||
476 | li { | |
477 | text-transform: none; | |
478 | font-size: 13px; | |
479 | } | |
480 | } | |
481 | } | |
482 | } | |
a86309b4 | 483 | |
6cf57b44 | 484 | @media screen and (max-width: 750px) { |
054a103b C |
485 | .vjs-theater-control { |
486 | display: none; | |
487 | } | |
488 | ||
6cf57b44 C |
489 | .vjs-dock-text { |
490 | font-size: 16px; | |
491 | } | |
492 | ||
493 | .vjs-dock-description { | |
3c40590d | 494 | font-size: 9px; |
6cf57b44 C |
495 | } |
496 | ||
497 | .vjs-big-play-button { | |
498 | font-size: 5em; | |
e0812403 | 499 | border-width: 3px; |
6cf57b44 C |
500 | |
501 | .vjs-icon-placeholder::before { | |
502 | @include big-play-button-triangle-size(32px); | |
503 | } | |
504 | } | |
505 | } | |
506 | ||
e700d33b | 507 | @media screen and (max-width: 570px) { |
869968d7 C |
508 | .vjs-dock-text { |
509 | font-size: 14px; | |
510 | } | |
511 | ||
8fa5653a | 512 | .vjs-big-play-button { |
869968d7 | 513 | font-size: 4.5em; |
e0812403 | 514 | border-width: 2.5px; |
864e782b C |
515 | |
516 | .vjs-icon-placeholder::before { | |
517 | @include big-play-button-triangle-size(27px); | |
518 | } | |
8fa5653a C |
519 | } |
520 | ||
7ccfb37f | 521 | .vjs-peertube { |
86f278cb C |
522 | padding: 0 !important; |
523 | ||
7ccfb37f | 524 | .vjs-peertube-displayed { |
86f278cb C |
525 | display: none !important; |
526 | } | |
527 | } | |
528 | } | |
529 | ||
530 | @media screen and (max-width: 300px) { | |
8fa5653a | 531 | .vjs-dock-text { |
22b59e80 C |
532 | font-size: 13px; |
533 | } | |
534 | ||
8fa5653a | 535 | .vjs-big-play-button { |
586f7c1b | 536 | font-size: 3em; |
e0812403 | 537 | border-width: 2px; |
864e782b C |
538 | |
539 | .vjs-icon-placeholder::before { | |
540 | @include big-play-button-triangle-size(20px); | |
541 | } | |
8fa5653a C |
542 | } |
543 | ||
86f278cb | 544 | .vjs-volume-control { |
a86309b4 C |
545 | display: none !important; |
546 | } | |
86f278cb | 547 | |
ea20306f C |
548 | .vjs-peertube-link { |
549 | padding: 0 !important; | |
550 | } | |
551 | ||
552 | .vjs-settings { | |
553 | width: 33px; | |
86f278cb | 554 | } |
a86309b4 | 555 | } |
4555697f C |
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 | } | |
e14852b4 | 574 | } |
b7a48512 | 575 | |
c6352f2c C |
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 | ||
bf5685f0 C |
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 | } | |
e0812403 | 621 | } |