]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - client/src/sass/video-js-custom.scss
Don't leak unlisted videos
[github/Chocobozzz/PeerTube.git] / client / src / sass / video-js-custom.scss
CommitLineData
be6a4802
C
1// Thanks: https://github.com/zanechua/videojs-sublime-inspired-skin
2$primary-foreground-color: #fff;
3$primary-background-color: #000;
4$font-size: 13px;
5$control-bar-height: 34px;
aa8b6df4 6
be6a4802
C
7.video-js.vjs-peertube-skin {
8 font-size: $font-size;
9 color: $primary-foreground-color;
aa8b6df4 10
be6a4802
C
11 .vjs-button > .vjs-icon-placeholder::before {
12 line-height: $control-bar-height;
aa8b6df4 13 }
e14852b4 14
be6a4802
C
15 .vjs-mouse-display:before,
16 .vjs-play-progress:before,
17 .vjs-volume-level:before {
18 content: ''; /* Remove Circle From Progress Bar */
19 }
e14852b4 20
be6a4802
C
21 .vjs-audio-button {
22 display: none;
23 }
e14852b4 24
be6a4802 25 .vjs-big-play-button {
9e6b41cc 26 outline: 0;
be6a4802 27 font-size: 8em;
e14852b4 28
be6a4802
C
29 $big-play-width: 3em;
30 $big-play-height: 1.5em;
e14852b4 31
be6a4802
C
32 border: 0;
33 border-radius: 0.3em;
e14852b4 34
e14852b4
C
35 left: 50%;
36 top: 50%;
37 margin-left: -($big-play-width / 2);
38 margin-top: -($big-play-height / 2);
20206dfb 39 background-color: transparent !important;
adcaf1a8
C
40
41 &::-moz-focus-inner {
42 border: 0;
43 padding: 0
44 }
80d1057b
C
45
46 .vjs-icon-placeholder::before {
47 transition: text-shadow 0.3s;
48 }
49
50 &:hover .vjs-icon-placeholder::before {
51 text-shadow: 0 0 2px rgba(255, 255, 255, 0.8);
52 }
be6a4802 53 }
e14852b4 54
8fa5653a
C
55 &.vjs-has-started .vjs-big-play-button {
56 display: block;
57 visibility: hidden;
58 opacity: 0;
9581cabc 59 transition: visibility 0.3s, opacity 0.3s;
8fa5653a
C
60 }
61
be6a4802
C
62 .vjs-control-bar,
63 .vjs-big-play-button,
64 .vjs-menu-button .vjs-menu-content {
65 background-color: rgba($primary-background-color, 0.5);
66 }
e14852b4 67
be6a4802 68 $slider-bg-color: lighten($primary-background-color, 33%);
e14852b4 69
be6a4802
C
70 .vjs-slider {
71 background-color: rgba(255, 255, 255, .3);
e14852b4 72 border-radius: 2px;
be6a4802
C
73 height: 5px;
74 }
e14852b4 75
be6a4802
C
76 /* The slider bar color is used for the progress bar and the volume bar
77 (the first two can be removed after a fix that's coming) */
78 .vjs-volume-level,
79 .vjs-play-progress,
80 .vjs-slider-bar {
81 background: $primary-foreground-color;
82 }
e14852b4 83
be6a4802
C
84 .vjs-load-progress {
85 background: rgba($slider-bg-color, 0.5);
86 }
e14852b4 87
be6a4802
C
88 .vjs-load-progress div {
89 background: rgba($slider-bg-color, 0.75);
90 }
e14852b4 91
be6a4802
C
92 .vjs-poster {
93 outline: none; /* Remove Blue Outline on Click*/
94 outline: 0;
95 }
e14852b4 96
be6a4802
C
97 .vjs-control-bar {
98 height: $control-bar-height;
e14852b4 99
be6a4802
C
100 .vjs-progress-control {
101 bottom: 34px;
102 width: 100%;
103 position: absolute;
104 height: 5px;
e14852b4 105
be6a4802
C
106 .vjs-progress-holder {
107 margin: 0;
108 border-radius: 0;
109 }
110 }
e14852b4 111
be6a4802 112 .vjs-play-control {
d7701449 113 outline: 0;
be6a4802
C
114 font-size: $font-size;
115 padding: 0 17px;
116 margin-right: 5px;
117 }
e14852b4 118
be6a4802
C
119 .vjs-time-control {
120 &.vjs-current-time {
121 font-size: $font-size;
122 display: inline-block;
123 padding: 0;
124
125 .vjs-current-time-display {
86f278cb 126 line-height: calc(#{$control-bar-height} + 1px);
be6a4802
C
127
128 &::after {
129 content: "/";
130 margin: 0 1px 0 2px;
131 }
132 }
133 }
134
135 &.vjs-duration {
136 font-size: $font-size;
137 display: inline-block;
138 padding: 0;
139
140 .vjs-duration-display {
86f278cb 141 line-height: calc(#{$control-bar-height} + 1px);
be6a4802
C
142 }
143 }
144
145 &.vjs-remaining-time {
146 display: none;
147 }
148 }
e14852b4 149
be6a4802
C
150 .vjs-webtorrent {
151 width: 100%;
152 line-height: $control-bar-height;
153 text-align: right;
154 padding-right: 60px;
155
a86309b4
C
156 .vjs-webtorrent-displayed {
157 display: block;
158 }
159
160 .vjs-webtorrent-hidden {
161 display: none;
162 }
163
be6a4802
C
164 .download-speed-number, .upload-speed-number, .peers-number {
165 font-weight: $font-semibold;
166 }
167
168 .download-speed-text, .upload-speed-text, .peers-text {
169 margin-right: 15px;
170 }
171
172 .icon {
173 display: inline-block;
174 width: 15px;
175 height: 15px;
176 background-size: contain;
177 vertical-align: middle;
178 background-repeat: no-repeat;
179 margin-right: 6px;
180 position: relative;
181 top: -1px;
182
183 &.icon-download {
184 background-image: url('../assets/player/images/arrow-down.svg');
185 }
186
187 &.icon-upload {
188 background-image: url('../assets/player/images/arrow-up.svg');
189 }
190 }
191 }
e14852b4 192
be6a4802 193 .vjs-mute-control {
d7701449
C
194 outline: 0;
195
be6a4802
C
196 .vjs-icon-placeholder {
197 display: inline-block;
198 width: 22px;
199 height: 22px;
200 vertical-align: middle;
201 background: url('../assets/player/images/volume.svg') no-repeat;
202 background-size: contain;
203
204 &::before {
205 content: '';
206 }
207 }
208
209 &.vjs-vol-0 .vjs-icon-placeholder {
210 background: url('../assets/player/images/volume-mute.svg') no-repeat;
211 background-size: contain;
212 }
213 }
e14852b4 214
be6a4802
C
215 .vjs-volume-menu-button,
216 .vjs-volume-panel {
217 width: 6em;
218 position: absolute;
219 right: 0;
220 margin-right: 65px;
221 }
e14852b4 222
be6a4802
C
223 .vjs-volume-bar {
224 background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACwAAAAcCAQAAACw95UnAAAAMElEQVRIx2NgoBL4n4YKGUYNHkEG4zJg1OCRYDCpBowaPJwMppbLRg0eNXjUYBLEAXWNUA6QNm1lAAAAAElFTkSuQmCC) no-repeat;
225 background-size: 22px 14px;
226 height: 100%;
227 width: 100%;
228 max-width: 22px;
229 max-height: 14px;
230 margin: 7px 4px;
231 border-radius: 0;
232 top: 3px;
233
234 .vjs-volume-level {
235 background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACwAAAAcAQAAAAAyhWABAAAAAnRSTlMAAHaTzTgAAAAZSURBVHgBYwAB/g9EUv+JokCqiaT+U4MCAPKPS7WUUOc1AAAAAElFTkSuQmCC) no-repeat;
236 background-size: 22px 14px;
237 max-width: 22px;
238 max-height: 14px;
239 height: 100%;
240 }
241 }
e14852b4 242
be6a4802
C
243 .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-slider-active,
244 .vjs-volume-panel.vjs-volume-panel-horizontal:active,
245 .vjs-volume-panel.vjs-volume-panel-horizontal:focus,
246 .vjs-volume-panel.vjs-volume-panel-horizontal:hover {
247 width: 6em;
248 transition-property: none;
249 }
e14852b4 250
be6a4802
C
251 .vjs-volume-panel .vjs-mute-control:hover ~ .vjs-volume-control.vjs-volume-horizontal {
252 width: 3em;
253 height: auto;
254 }
e14852b4 255
be6a4802
C
256 .vjs-volume-panel .vjs-mute-control:hover ~ .vjs-volume-control {
257 transition-property: none;
258 }
e14852b4 259
be6a4802
C
260 .vjs-volume-panel {
261 .vjs-mute-control {
262 width: 2em;
263 z-index: 1;
264 padding: 0;
265 }
266
267 .vjs-volume-control {
268 display: inline-block;
269 position: relative;
270 left: 5px;
271 opacity: 1;
272 width: 3em;
273 height: auto;
274 }
275 }
e14852b4 276
be6a4802
C
277 .vjs-fullscreen-control {
278 width: 37px;
d7701449 279 outline: 0;
be6a4802
C
280
281 .vjs-icon-placeholder {
282 display: inline-block;
283 width: 22px;
284 height: 22px;
285 vertical-align: middle;
286 background: url('../assets/player/images/fullscreen.svg') no-repeat;
287 background-size: contain;
288
289 &::before {
290 content: '';
291 }
292 }
293 }
e14852b4 294
be6a4802
C
295 .vjs-menu-button-popup {
296 font-size: 13px;
297 font-weight: $font-semibold;
86f278cb 298 width: 50px;
be6a4802
C
299
300 // Thanks: https://github.com/kmoskwiak/videojs-resolution-switcher/pull/92/files
301 .vjs-resolution-button-label {
302 line-height: $control-bar-height;
303 position: absolute;
304 top: 0;
86f278cb 305 left: 4px;
be6a4802
C
306 width: 100%;
307 height: 100%;
308 text-align: center;
309 box-sizing: inherit;
86f278cb 310 text-align: center;
be6a4802
C
311 }
312
313 .vjs-resolution-button {
314 outline: 0 !important;
315 }
316
317 .vjs-menu {
318 top: 20px;
319
320 .vjs-menu-content {
86f278cb 321 width: 50px;
be6a4802 322 left: 50%; /* Center the menu, in it's parent */
86f278cb 323 margin-left: -21px;
be6a4802
C
324 }
325
326 li {
327 text-transform: none;
328 font-size: 13px;
329 }
330 }
331 }
332 }
a86309b4 333
86f278cb 334 @media screen and (max-width: 550px) {
8fa5653a
C
335 .vjs-big-play-button {
336 font-size: 6.5em;
337 }
338
86f278cb
C
339 .vjs-webtorrent {
340 padding: 0 !important;
341
342 .vjs-webtorrent-displayed {
343 display: none !important;
344 }
345 }
346 }
347
348 @media screen and (max-width: 300px) {
8fa5653a
C
349 .vjs-dock-text {
350 font-size: 1.5em;
351 }
352
353 .vjs-big-play-button {
354 font-size: 5em;
355 }
356
86f278cb 357 .vjs-volume-control {
a86309b4
C
358 display: none !important;
359 }
86f278cb
C
360
361 .vjs-volume-panel {
362 width: 26px !important;
363 margin-right: 83px !important;
364 }
a86309b4 365 }
e14852b4 366}
b7a48512
C
367
368// Thanks: https://projects.lukehaas.me/css-loaders/
369.vjs-loading-spinner {
fd45e8f4 370 left: 50%;
b7a48512 371 font-size: 10px;
fd45e8f4
C
372 text-indent: -9999em;
373 border: 0.7em solid rgba(255, 255, 255, 0.2);
374 border-left-color: #ffffff;
b7a48512 375 transform: translateZ(0);
9581cabc 376 animation: 0.3s ease-out 1.1s forwards vjs-spinner-show, spinner 1.4s infinite linear !important;
b2731bff 377 overflow: hidden;
dfbd250d 378 visibility: hidden;
b7a48512
C
379
380 &:before {
b7a48512 381 animation: none !important;
b7a48512
C
382 }
383
384 &:after {
b7a48512 385 border-radius: 50%;
fd45e8f4
C
386 width: 6em;
387 height: 6em;
b7a48512
C
388 animation: none !important;
389 }
390
fd45e8f4 391 @keyframes spinner {
b7a48512 392 0% {
b7a48512
C
393 transform: rotate(0deg);
394 }
395 100% {
b7a48512
C
396 transform: rotate(360deg);
397 }
398 }
dfbd250d
C
399
400 @keyframes vjs-spinner-show {
401 0% {
402 display: none;
403 opacity: 0;
404 }
405
406 1% {
407 display: block;
408 visibility: visible;
409 opacity: 0;
410 }
411
412 100% {
413 display: block;
414 visibility: visible;
415 opacity: 1;
416 }
417 }
b7a48512 418}
a86309b4 419