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