]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - client/src/sass/player/peertube-skin.scss
Bumped to version v5.2.1
[github/Chocobozzz/PeerTube.git] / client / src / sass / player / peertube-skin.scss
CommitLineData
fa12eacc 1@use 'sass:math';
8cbc40b2
C
2@use '_variables' as *;
3@use '_mixins' as *;
4@use './_player-variables' as *;
3ec8dc09 5
122dbb57
C
6body {
7 --embedForegroundColor: #{$primary-foreground-color};
8
9 --embedBigPlayBackgroundColor: #{$primary-background-color};
10}
11
864e782b
C
12@mixin big-play-button-triangle-size($triangle-size) {
13 width: $triangle-size;
14 height: $triangle-size;
62ddc31a
C
15 top: calc(50% - #{math.div($triangle-size, 2)});
16 left: calc(53% - #{math.div($triangle-size, 2)});
864e782b
C
17}
18
be6a4802
C
19.video-js.vjs-peertube-skin {
20 font-size: $font-size;
e66883b3 21 color: pvar(--embedForegroundColor);
aa8b6df4 22
d3f4689b
C
23 &.disabled {
24 cursor: default;
25 pointer-events: none;
26
27 .vjs-big-play-button {
28 display: none !important;
29 }
30 }
31
be6a4802
C
32 .vjs-audio-button {
33 display: none;
34 }
e14852b4 35
be6a4802 36 .vjs-big-play-button {
33d78552
C
37 $big-play-width: 1.2em;
38 $big-play-height: 1.2em;
e14852b4 39
8cbc40b2 40 @include margin-left(-(math.div($big-play-width, 2)));
27bc9586 41
931d3430
C
42 outline: 0;
43 font-size: 6em;
44
abb3097e 45 border: 2px solid #fff;
33d78552 46 border-radius: 100%;
e14852b4 47
e14852b4
C
48 left: 50%;
49 top: 50%;
8cac1b64
C
50 width: $big-play-width;
51 height: $big-play-height;
52 line-height: $big-play-height;
8cbc40b2 53 margin-top: -(math.div($big-play-height, 2));
2acb622c 54 transition: 0.2s background-color;
adcaf1a8
C
55
56 &::-moz-focus-inner {
57 border: 0;
931d3430 58 padding: 0;
adcaf1a8 59 }
80d1057b
C
60
61 .vjs-icon-placeholder::before {
864e782b
C
62 @include big-play-button-triangle-size(45px);
63
64 content: '';
2a19a1e4 65 background-image: url('#{$assets-path}/player/images/big-play-button.svg');
80d1057b
C
66 }
67
931d3430
C
68 &.focus-visible,
69 &:hover {
70 background-color: var(--mainColor, #696969);
80d1057b 71 }
8fa5653a
C
72 }
73
597ca6de 74 // Show poster and controls when playing audio-only content
75 &.vjs-playing-audio-only-content {
76 .vjs-poster {
77 display: block;
78 visibility: visible;
79 }
80
81 .vjs-control-bar {
82 opacity: $primary-foreground-opacity-hover;
83 }
84 }
85
41fafa9e 86 // Do not display poster when video is starting
87 &.vjs-has-autoplay:not(.vjs-has-started) {
88 .vjs-poster {
89 opacity: 0;
90 visibility: hidden;
91 }
92 }
93
e6f62797
C
94 // Hide the big play button on autoplay
95 &.vjs-has-autoplay {
96 .vjs-big-play-button {
97 display: none !important;
98 }
99 }
100
be6a4802
C
101 .vjs-control-bar,
102 .vjs-big-play-button,
c6352f2c 103 .vjs-settings-dialog {
e66883b3 104 background-color: pvar(--embedBigPlayBackgroundColor);
be6a4802 105 }
e14852b4 106
be6a4802 107 .vjs-poster {
be6a4802
C
108 outline: 0;
109 }
e14852b4 110
a5a79d15 111 @media screen and (max-width: $screen-width-750) {
6cf57b44
C
112 .vjs-big-play-button {
113 font-size: 5em;
e0812403 114 border-width: 3px;
6cf57b44
C
115
116 .vjs-icon-placeholder::before {
117 @include big-play-button-triangle-size(32px);
118 }
119 }
120 }
121
a5a79d15 122 @media screen and (max-width: $screen-width-570) {
8fa5653a 123 .vjs-big-play-button {
869968d7 124 font-size: 4.5em;
e0812403 125 border-width: 2.5px;
864e782b
C
126
127 .vjs-icon-placeholder::before {
128 @include big-play-button-triangle-size(27px);
129 }
8fa5653a 130 }
86f278cb
C
131 }
132
a5a79d15 133 @media screen and (max-width: $screen-width-350) {
8fa5653a 134 .vjs-big-play-button {
586f7c1b 135 font-size: 3em;
e0812403 136 border-width: 2px;
864e782b
C
137
138 .vjs-icon-placeholder::before {
139 @include big-play-button-triangle-size(20px);
140 }
8fa5653a 141 }
a86309b4 142 }
4555697f
C
143
144 // Theater mode is enabled
145 &.vjs-theater-enabled {
146 .vjs-theater-control {
147 width: 30px;
148
149 .vjs-icon-placeholder {
150 transform: scale(0.8);
151 }
152 }
153 }
154
155 // On fullscreen, hide theater control
156 &.vjs-fullscreen {
157 .vjs-theater-control {
158 display: none;
159 }
160 }
e14852b4 161}
b7a48512 162
c6352f2c
C
163// Play/pause animations
164.vjs-has-started .vjs-play-control {
165 &.vjs-playing {
166 animation: remove-pause-button 0.25s ease;
167 }
168
169 &.vjs-paused {
170 animation: add-play-button 0.25s ease;
171 }
172
173 @keyframes remove-pause-button {
174 0% {
175 transform: rotate(90deg);
176 }
177 100% {
178 transform: rotate(0deg);
179 }
180 }
181
182 @keyframes add-play-button {
183 0% {
184 transform: rotate(-90deg);
185 }
186 100% {
187 transform: rotate(0deg);
188 }
189 }
190}
191
f2a16d93 192.vjs-error-display {
193 display: none;
194}
195
196.vjs-custom-error-display {
197 font-family: $main-fonts;
198
199 .error-details {
200 margin-top: 40px;
201 font-size: 80%;
202 }
203}
204
bd09dfaf
C
205.vjs-modal-dialog-content {
206 padding-top: 40px !important;
207}
208
bf5685f0
C
209// Error display disabled
210.vjs-error:not(.vjs-error-display-enabled) {
f2a16d93 211 .vjs-custom-error-display {
bf5685f0
C
212 display: none;
213 }
214
215 .vjs-loading-spinner {
216 display: block;
217 }
218}
219
220// Error display enabled
221.vjs-error.vjs-error-display-enabled {
f2a16d93 222 .vjs-custom-error-display {
bf5685f0
C
223 display: block;
224 }
e0812403 225}