aboutsummaryrefslogtreecommitdiff
path: root/arc-firefox-theme/chrome/global/media/videocontrols.css
blob: 17101add81991b08f6f71c62feb6c27919185749 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */

@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
@namespace html url("http://www.w3.org/1999/xhtml");

.controlBar {
  height: 28px;
  background-color: rgba(35,31,32,.74);
}

.playButton,
.muteButton,
.fullscreenButton {
  background-color: transparent;
  background-repeat: no-repeat;
  background-position: center;
  -moz-appearance: none;   /* Remove the native button appearance and styling */
  margin: 0;
  padding: 0;
  min-height: 28px;
  min-width: 28px;
  border: none;
  opacity: 0.7;
}

.playButton:hover,
.muteButton:hover,
.fullscreenButton:hover {
  opacity: 1;
}

.playButton:hover:active,
.muteButton:hover:active,
.fullscreenButton:hover:active {
  opacity: 0.4;
}

.playButton {
  background-image: url(chrome://global/skin/media/pauseButton.png);
  margin-right: -22px; /* 1/2 of scrubber thumb width, for overhang. */
  position: relative; /* Trick to work around negative margin interfering with clicking on the button. */
}

.playButton[paused] {
  background-image: url(chrome://global/skin/media/playButton.png);
}

.muteButton {
  background-image: url(chrome://global/skin/media/muteButton.png);
  min-width: 33px;
}
.muteButton[muted] {
  background-image: url(chrome://global/skin/media/unmuteButton.png);
}

.muteButton[noAudio] {
  background-image: url(chrome://global/skin/media/noAudio.png);
}

.muteButton[noAudio] + .volumeStack {
  display: none;
}

.fullscreenButton {
  background-image: -moz-image-rect(url("chrome://global/skin/media/fullscreenButton.png"), 0, 16, 16, 0);
}

.fullscreenButton[fullscreened] {
  background-image: -moz-image-rect(url("chrome://global/skin/media/fullscreenButton.png"), 0, 32, 16, 16);
}

.volumeControl {
  width: 32px;
  opacity: 0;
}

.volumeBackground,
.volumeForeground {
  background-repeat: no-repeat;
  background-position: center;
  width: 32px;
}

.volumeBackground {
  background-image: url(chrome://global/skin/media/volume-empty.png);
}

.volumeForeground {
  background-image: url(chrome://global/skin/media/volume-full.png);
  background-clip: content-box;
}

.controlBar[fullscreen-unavailable] > .volumeStack {
  /* This value is duplicated in the videocontrols.xml adjustControlSize function. */
  -moz-margin-end: 8px;
}

.volumeControl .scale-thumb {
  min-width: 0;
  opacity: 0;
}

.durationBox {
  -moz-box-pack: center;
}

.durationLabel {
  margin-left: -22px; /* 1/2 of scrubber thumb width, for overhang. */
  padding-left: 8px; /* don't bump into the scrubber bar */
  padding-top: 0; /* center vertically with scrubber bar */
  color: rgba(255,255,255,.75);
  font-size: 11px;
  font-family: Arial, sans-serif;
}

.positionLabel {
  display: none;
}

.backgroundBar {
  /* margin top/bottom: make bar 8px tall (control height = 28, minus 2 * 10 margin) */
  /* margin left/right: 1/2 of scrubber thumb width, for overhang. */
  margin: 10px 22px;
  background-color: rgba(255,255,255,.5);
  border-radius: 2.5px;
}

.bufferBar,
.progressBar {
  /* margin top/bottom: make bar 8px tall (control height = 28, minus 2 * 10 margin) */
  /* margin left/right: 1/2 of scrubber thumb width, for overhang. */
  margin: 10px 22px;
  -moz-appearance: none;
  border: none;
  background-color: transparent;
  min-width: 0;
  min-height: 0;
}

/* .progress-bar is an element inside the <progressmeter> implementation. */
.bufferBar .progress-bar {
  /*
   * Note that this is drawn on top of the .backgroundBar. So although this
   * has the same background-color specified, the semitransparent
   * compositing gives it a different visual appearance.
   */
  background-color: rgba(255,255,255,.5);
  border-radius: 2.5px;
  -moz-appearance: none;
}

.progressBar .progress-bar {
  background-color: white;
  border-radius: 2.5px;
  -moz-appearance: none;
}

/* .scale-slider is an element inside the <scale> implementation. */
.scrubber .scale-slider,
.volumeControl .scale-slider {
  /* Hide the default horizontal bar. */
  -moz-appearance: none;
  background: none;
  margin: 0;
}

.scrubber .scale-slider {
  /* abs(margin-top) + margin-bottom + bar height == timeThumb height */
  margin-top: -10px;
  margin-bottom: 10px;
}

/* .scale-thumb is an element inside the <scale> implementation. */
.scrubber .scale-thumb,
.volumeControl .scale-thumb {
  /* Override the default thumb appearance with a custom image. */
  -moz-appearance: none;
  background: transparent;
  border: none;
}

.timeThumb {
  background: url(chrome://global/skin/media/scrubberThumb.png) no-repeat center;
  min-width: 45px;
  min-height: 28px;
  -moz-box-pack: center;
}

.timeThumb[showhours="true"] {
  background-image: url(chrome://global/skin/media/scrubberThumbWide.png);
}

.timeLabel {
  color: rgba(255,255,255,.75);
  font-size: 10px;
  font-family: Arial, sans-serif;
  text-shadow: rgba(0,0,0,.3) 0 1px;
  padding-top: 5px;
}

.statusOverlay {
  -moz-box-align: center;
  -moz-box-pack: center;
  background-color: rgba(0,0,0,.55);
}

.statusIcon {
  margin-bottom: 28px; /* same height as .controlBar, to keep icon centered above it */
  width: 36px;
  height: 36px;
}

.statusIcon[type="throbber"] {
  background: url(chrome://global/skin/media/throbber.png) no-repeat center;
}

.statusIcon[type="throbber"][stalled] {
  background: url(chrome://global/skin/media/stalled.png) no-repeat center;
}

.statusIcon[type="error"] {
  background: url(chrome://global/skin/media/error.png) no-repeat center;
}

/* Overlay Play button */
.clickToPlay {
  width: 64px;
  height: 64px;
  -moz-box-pack: center;
  -moz-box-align: center;
  opacity: 0.7;
  background-image: url(chrome://global/skin/media/clicktoplay-bgtexture.png),
                    url(chrome://global/skin/media/videoClickToPlayButton.svg);
  background-repeat: repeat, no-repeat;
  background-position: center, center;
  background-size: auto, 64px 64px;
  background-color: hsla(0,0%,10%,.5);
}
.clickToPlay:hover {
  opacity: 1;
}

/* Statistics formatting */
html|*.statsDiv {
  position: relative;
}
html|td {
  height: 1em;
  max-height: 1em;
  padding: 0 2px;
}
html|table {
  font-family: Helvetica, Arial, sans-serif;
  font-size: 11px;
  color: white;
  text-shadow:
    -1px -1px 0 #000,
    1px -1px 0 #000,
    -1px 1px 0 #000,
    1px 1px 0 #000;
  min-width: 100%;
  background: rgba(68,68,68,.7);
  table-layout: fixed;
  border-collapse: collapse;
  position: absolute;
}

/* CSS Transitions */
.clickToPlay {
  transition-property: opacity, background-size;
  transition-duration: 400ms, 400ms;
}
.clickToPlay[fadeout] {
  background-size: auto, 192px 192px;
  opacity: 0;
}
.clickToPlay[fadeout][immediate] {
  transition-property: opacity, background-size;
  transition-duration: 0s, 0s;
}
.controlBar:not([immediate]) {
  transition-property: opacity;
  transition-duration: 200ms;
}
.controlBar[fadeout] {
  opacity: 0;
}
.volumeStack:not([immediate]) {
  transition-property: opacity, margin-top;
  transition-duration: 200ms, 200ms;
}
.volumeStack[fadeout] {
  opacity: 0;
  margin-top: 0;
}
.statusOverlay:not([immediate]) {
  transition-property: opacity;
  transition-duration: 300ms;
  transition-delay: 750ms;
}
.statusOverlay[fadeout] {
  opacity: 0;
}

/* Error description formatting */
.errorLabel {
  font-family: Helvetica, Arial, sans-serif;
  font-size: 11px;
  color: #bbb;
  text-shadow:
    -1px -1px 0 #000,
    1px -1px 0 #000,
    -1px 1px 0 #000,
    1px 1px 0 #000;
  padding: 0 10px;
  text-align: center;
}