]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blob - client/src/app/videos/+video-watch/video-watch.component.scss
Improve 4k resolution bitrate
[github/Chocobozzz/PeerTube.git] / client / src / app / videos / +video-watch / video-watch.component.scss
1 @import '_variables';
2 @import '_mixins';
3 @import '_bootstrap-variables';
4 @import '_miniature';
5
6 $other-videos-width: 260px;
7 $player-factor: 1.7; // 16/9
8
9 @function getPlayerHeight($width){
10 @return calc(#{$width} / #{$player-factor})
11 }
12
13 @function getPlayerWidth($height){
14 @return calc(#{$height} * #{$player-factor})
15 }
16
17 @mixin playlist-below-player {
18 width: 100% !important;
19 height: auto !important;
20 max-height: 300px !important;
21 max-width: initial;
22 border-bottom: 1px solid $separator-border-color !important;
23 }
24
25 .root {
26 &.theater-enabled #video-wrapper {
27 flex-direction: column;
28 justify-content: center;
29
30 #videojs-wrapper {
31 width: 100%;
32 }
33
34 ::ng-deep .video-js {
35 $height: calc(100vh - #{$header-height} - #{$theater-bottom-space});
36
37 height: $height;
38 width: 100%;
39 max-width: initial;
40 }
41
42 my-video-watch-playlist ::ng-deep .playlist {
43 @include playlist-below-player;
44 }
45 }
46 }
47
48 .blacklisted-label {
49 font-weight: $font-semibold;
50 }
51
52 #video-wrapper {
53 background-color: #000;
54 display: flex;
55 justify-content: center;
56 margin: 0 -15px;
57
58 #videojs-wrapper {
59 display: flex;
60 justify-content: center;
61 flex-grow: 1;
62 }
63
64 .remote-server-down {
65 color: #fff;
66 display: flex;
67 flex-direction: column;
68 align-items: center;
69 text-align: center;
70 justify-content: center;
71 background-color: #141313;
72 width: 100%;
73 font-size: 24px;
74 height: 500px;
75
76 @media screen and (max-width: 1000px) {
77 font-size: 20px;
78 }
79
80 @media screen and (max-width: 600px) {
81 font-size: 16px;
82 }
83 }
84
85 ::ng-deep .video-js {
86 width: 100%;
87 max-width: getPlayerWidth(66vh);
88 height: 66vh;
89
90 // VideoJS create an inner video player
91 video {
92 outline: 0;
93 position: relative !important;
94 }
95 }
96
97 @media screen and (max-width: 600px) {
98 .remote-server-down,
99 ::ng-deep .video-js {
100 width: 100vw;
101 height: getPlayerHeight(100vw)
102 }
103 }
104 }
105
106 .alert {
107 text-align: center;
108 border-radius: 0;
109 }
110
111 #video-not-found {
112 height: 300px;
113 line-height: 300px;
114 margin-top: 50px;
115 text-align: center;
116 font-weight: $font-semibold;
117 font-size: 15px;
118 }
119
120 .video-bottom {
121 display: flex;
122 margin-top: 40px;
123
124 .video-info {
125 flex-grow: 1;
126 // Set min width for flex item
127 min-width: 1px;
128 max-width: 100%;
129
130 .video-info-first-row {
131 display: flex;
132
133 & > div:first-child {
134 flex-grow: 1;
135 }
136
137 .video-info-name {
138 margin-right: 30px;
139 min-height: 40px; // Align with the action buttons
140 font-size: 27px;
141 font-weight: $font-semibold;
142 flex-grow: 1;
143 }
144
145 .video-info-date-views {
146 flex-grow: 1;
147 margin-bottom: 10px;
148 margin-right: 10px;
149 font-size: 16px;
150 }
151
152 .video-info-channel {
153 font-weight: $font-semibold;
154 font-size: 15px;
155
156 a {
157 @include disable-default-a-behaviour;
158
159 color: var(--mainForegroundColor);
160
161 &:hover {
162 opacity: 0.8;
163 }
164
165 img {
166 @include avatar(18px);
167
168 margin: -2px 2px 0 5px;
169 }
170 }
171
172 my-subscribe-button {
173 margin-left: 5px;
174 }
175 }
176
177 .video-info-by {
178
179 a {
180 @include disable-default-a-behaviour;
181
182 display: inline;
183 align-items: center;
184 font-size: 13px;
185 color: var(--mainForegroundColor);
186
187 span:hover {
188 opacity: 0.8;
189 }
190
191 img {
192 @include avatar(18px);
193
194 margin-top: -2px;
195 margin-left: 7px;
196 }
197 }
198
199 my-help {
200 position: relative;
201 top: 1px;
202 margin-left: 2px;
203 }
204 }
205
206 my-feed {
207 margin-left: 5px;
208 margin-top: 1px;
209 }
210
211 .video-actions-rates {
212 margin: 20px 0 10px 0;
213 align-items: start;
214
215 .video-actions {
216 height: 40px; // Align with the title
217 display: flex;
218 align-items: center;
219
220 .action-button:not(:first-child),
221 .action-dropdown,
222 my-video-actions-dropdown {
223 margin-left: 10px;
224 }
225
226 .action-button {
227 @include peertube-button;
228 @include grey-button;
229 @include button-with-icon(21px, 0, -1px);
230 @include apply-svg-color($grey-foreground-color);
231
232 font-size: 15px;
233 font-weight: $font-semibold;
234 display: inline-block;
235 padding: 0 10px 0 10px;
236 white-space: nowrap;
237
238 &::after {
239 display: none;
240 }
241
242 &.action-button-like.activated {
243 background-color: $green;
244
245 my-global-icon {
246 @include apply-svg-color(#fff);
247 }
248 }
249
250 &.action-button-dislike.activated {
251 background-color: $red;
252
253 my-global-icon {
254 @include apply-svg-color(#fff);
255 }
256 }
257
258 &.action-button-support {
259 color: var(--supportButtonColor);
260 background-color: var(--supportButtonBackgroundColor);
261
262 &:hover {
263 opacity: 0.9;
264 }
265
266 my-global-icon {
267 @include apply-svg-color(var(--supportButtonColor));
268 }
269 }
270
271 &.action-button-save {
272 my-global-icon {
273 top: 0 !important;
274 right: -1px;
275 }
276 }
277
278 .icon-text {
279 margin-left: 3px;
280 }
281 }
282 }
283
284 .video-info-likes-dislikes-bar {
285 $likes-bar-height: 2px;
286 height: $likes-bar-height;
287 margin-top: -$likes-bar-height;
288 width: 186px;
289 background-color: $red;
290 position: relative;
291 top: 10px;
292
293 .likes-bar {
294 height: 100%;
295 background-color: $green;
296 }
297 }
298 }
299 }
300
301 .video-info-description {
302 margin: 20px 0;
303 font-size: 15px;
304
305 .video-info-description-html {
306 @include peertube-word-wrap;
307 }
308
309 .glyphicon, .description-loading {
310 margin-left: 3px;
311 }
312
313 .description-loading {
314 display: inline-block;
315 }
316
317 .video-info-description-more {
318 cursor: pointer;
319 font-weight: $font-semibold;
320 color: $grey-foreground-color;
321 font-size: 14px;
322
323 .glyphicon {
324 position: relative;
325 top: 2px;
326 }
327 }
328 }
329
330 .video-attributes .video-attribute {
331 font-size: 13px;
332 display: block;
333 margin-bottom: 12px;
334
335 .video-attribute-label {
336 min-width: 142px;
337 padding-right: 5px;
338 display: inline-block;
339 color: $grey-foreground-color;
340 font-weight: $font-bold;
341 }
342
343 a.video-attribute-value {
344 @include disable-default-a-behaviour;
345 color: var(--mainForegroundColor);
346
347 &:hover {
348 opacity: 0.9;
349 }
350 }
351
352 &.video-attribute-tags {
353 .video-attribute-value:not(:nth-child(2)) {
354 &::before {
355 content: ', '
356 }
357 }
358 }
359 }
360 }
361
362 ::ng-deep .other-videos {
363 padding-left: 15px;
364 flex-basis: $other-videos-width;
365 min-width: $other-videos-width;
366
367 .title-page {
368 margin-top: 0 !important;
369 }
370
371 .video-miniature {
372 display: flex;
373 width: $other-videos-width;
374 height: 100%;
375 margin-bottom: 20px;
376 flex-wrap: wrap;
377
378 .video-thumbnail {
379 margin-right: 10px
380 }
381 }
382 }
383 }
384
385 my-video-comments {
386 display: inline-block;
387 width: 100%;
388 margin-bottom: 20px;
389 }
390
391 // If the view is not expanded, take into account the menu
392 .privacy-concerns {
393 width: calc(100% - #{$menu-width});
394 }
395
396 @media screen and (max-width: $small-view) {
397 .privacy-concerns {
398 margin-left: $menu-width - 15px; // Menu is absolute
399 }
400 }
401
402 :host-context(.expanded) {
403 .privacy-concerns {
404 width: 100%;
405 margin-left: -15px;
406 }
407 }
408
409 .privacy-concerns {
410 position: fixed;
411 bottom: 0;
412
413 padding: 5px 15px;
414
415 display: flex;
416 flex-wrap: nowrap;
417 align-items: center;
418 justify-content: flex-start;
419 background-color: rgba(0, 0, 0, 0.9);
420 color: #fff;
421
422 .privacy-concerns-text {
423 margin: 0 5px;
424 }
425
426 a {
427 @include disable-default-a-behaviour;
428
429 color: var(--mainColor);
430 transition: color 0.3s;
431
432 &:hover {
433 color: #fff;
434 }
435 }
436
437 .privacy-concerns-okay {
438 background-color: var(--mainColor);
439 padding: 5px 8px 5px 7px;
440 margin-left: auto;
441 border-radius: 3px;
442 cursor: pointer;
443 transition: background-color 0.3s;
444 font-weight: $font-semibold;
445
446 &:hover {
447 background-color: #000;
448 }
449 }
450 }
451
452 @media screen and (max-width: 1600px) {
453 .video-bottom .video-info .video-attributes .video-attribute {
454 margin-bottom: 5px;
455 }
456 }
457
458 @media screen and (max-width: 1300px) {
459 .privacy-concerns {
460 font-size: 12px;
461 padding: 2px 5px;
462
463 .privacy-concerns-text {
464 margin: 0;
465 }
466 }
467 }
468
469 @media screen and (max-width: 1100px) {
470 #video-wrapper {
471 flex-direction: column;
472 justify-content: center;
473
474 my-video-watch-playlist ::ng-deep .playlist {
475 @include playlist-below-player;
476 }
477 }
478
479 .video-bottom {
480 flex-direction: column;
481
482 ::ng-deep .other-videos {
483 padding-left: 0 !important;
484
485 ::ng-deep .video-miniature {
486 flex-direction: row;
487 width: auto;
488 }
489 }
490 }
491 }
492
493 @media screen and (max-width: 600px) {
494 .video-bottom {
495 margin: 20px 0 0 0 !important;
496
497 .video-info {
498 padding: 0;
499
500 .video-info-first-row {
501
502 .video-info-name {
503 font-size: 20px;
504 height: auto;
505 }
506 }
507 }
508 }
509
510 ::ng-deep .other-videos .video-miniature {
511 flex-direction: column;
512 }
513
514 .privacy-concerns {
515 width: 100%;
516
517 strong {
518 display: none;
519 }
520 }
521 }
522
523 @media screen and (max-width: 450px) {
524 .video-bottom {
525 .action-button .icon-text {
526 display: none !important;
527 }
528
529 .video-info .video-info-first-row {
530 .video-info-name {
531 font-size: 18px;
532 }
533
534 .video-info-date-views {
535 font-size: 14px;
536 }
537
538 .video-actions-rates {
539 margin-top: 10px;
540 }
541 }
542
543 .video-info-description {
544 font-size: 14px !important;
545 }
546 }
547 }