1 /* This Source Code Form is subject to the terms of the Mozilla Public
2 * License, v. 2.0. If a copy of the MPL was not distributed with this
3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
5 @namespace url
("http://www.w3.org/1999/xhtml");
8 writing-mode: horizontal-tb
;
11 display: inline-block
;
15 /* Prevent unwanted style inheritance. See bug 554717. */
17 list-style-image: none
!important
;
18 font: normal normal normal
100%/normal sans-serif
!important
;
19 text-decoration: none
!important
;
20 white-space: normal
!important
;
24 --clickToPlay-size: 48px;
27 --timer-long-size: 60px;
30 --label-font-size: 13px;
31 --pip-toggle-bgcolor: rgb
(0, 96, 223);
32 --pip-toggle-text-and-icon-color: rgb
(255, 255, 255);
33 --pip-toggle-padding: 5px;
34 --pip-toggle-icon-width-height: 16px;
35 --pip-toggle-translate-x: calc
(100% - var
(--pip-toggle-icon-width-height
) - 2 * var
(--pip-toggle-padding
));
37 .controlsContainer.touch {
38 --clickToPlay-size: 64px;
41 --timer-long-size: 78px;
44 --label-font-size: 16px;
47 /* Some CSS custom properties defined here are referenced by videocontrols.js */
49 /* Do not delete: these variables are accessed by JavaScript directly.
50 see videocontrols.js and search for |-width|. */
51 --clickToPlay-width: var
(--clickToPlay-size
);
52 --playButton-width: var
(--button-size
);
53 --scrubberStack-width: 64px;
54 --muteButton-width: var
(--button-size
);
55 --volumeStack-width: 48px;
56 --castingButton-width: var
(--button-size
);
57 --closedCaptionButton-width: var
(--button-size
);
58 --fullscreenButton-width: var
(--button-size
);
59 --positionDurationBox-width: var
(--timer-size
);
60 --durationSpan-width: var
(--timer-size
);
61 --positionDurationBox-width-long: var
(--timer-long-size
);
62 --durationSpan-width-long: var
(--timer-long-size
);
66 /* Do not delete: these variables are accessed by JavaScript directly.
67 see videocontrols.js and search for |-width|. */
68 --scrubberStack-width: 84px;
69 --volumeStack-width: 64px;
72 .controlsContainer
[hidden
],
74 .pictureInPictureToggleButton
[hidden
],
75 .videocontrols[inDOMFullscreen] > .controlsContainer > .controlsOverlay > .pictureInPictureToggleButton {
79 .controlBar[size="hidden"] {
83 .controlsSpacer[hideCursor] {
103 flex-direction: column
;
104 justify-content: center
;
106 background-color: rgb
(80,80,80, .85);
111 flex-direction: column
;
112 justify-content: center
;
116 .controlsSpacerStack {
118 flex-direction: column
;
120 justify-content: center
;
127 box-sizing: border-box
;
128 justify-content: center
;
133 background-color: rgba
(26,26,26,.8);
140 .controlBar > .button {
142 min-width: var
(--button-size
);
143 min-height: var
(--button-size
);
147 background-color: transparent
;
148 background-repeat: no-repeat
;
149 background-position: center
;
150 background-origin: content-box
;
151 background-clip: content-box
;
152 -moz-context-properties: fill
;
156 .touch .controlBar > .button {
157 background-size: 24px 24px;
160 .controlBar > .button:hover {
164 .controlBar > .button:hover:active {
169 background-image: url
(chrome://global
/skin
/media
/pauseButton
.svg
);
171 .playButton[paused] {
172 background-image: url
(chrome://global
/skin
/media
/playButton
.svg
);
176 background-image: url
(chrome://global
/skin
/media
/audioUnmutedButton
.svg
);
179 background-image: url
(chrome://global
/skin
/media
/audioMutedButton
.svg
);
181 .muteButton
[noAudio
],
182 .muteButton
[noAudio
]:hover
,
183 .muteButton[noAudio]:hover:active {
184 background-image: url
(chrome://global
/skin
/media
/audioNoAudioButton
.svg
);
187 .muteButton[noAudio] + .volumeStack {
192 background-image: url
(chrome://global
/skin
/media
/castingButton-ready
.svg
);
195 .castingButton[enabled] {
196 background-image: url
(chrome://global
/skin
/media
/castingButton-active
.svg
);
199 .closedCaptionButton {
200 background-image: url
(chrome://global
/skin
/media
/closedCaptionButton-cc-off
.svg
);
202 .closedCaptionButton[enabled] {
203 background-image: url
(chrome://global
/skin
/media
/closedCaptionButton-cc-on
.svg
);
207 background-image: url
(chrome://global
/skin
/media
/fullscreenEnterButton
.svg
);
209 .fullscreenButton[fullscreened] {
210 background-image: url
(chrome://global
/skin
/media
/fullscreenExitButton
.svg
);
217 .volumeControl::-moz-range-thumb
,
218 .scrubber::-moz-range-thumb {
219 height: var
(--thumb-size
);
220 width: var
(--thumb-size
);
223 background-color: #ffffff;
224 filter: drop-shadow
(0px 0px 2px rgba
(0,0,0,0.65));
227 .volumeControl::-moz-focus-outer
,
228 .scrubber::-moz-focus-outer {
232 .progressBackgroundBar {
234 flex-direction: column
;
235 justify-content: center
;
242 height: var
(--track-size
);
246 /* minus margin to get basis of required width */
247 min-width: calc
(var
(--scrubberStack-width
) - 18px);
248 flex-basis: calc
(var
(--scrubberStack-width
) - 18px);
256 min-width: var
(--volumeStack-width
);
275 border-radius: calc
(var
(--track-size
) / 2);
278 background-color: transparent
;
283 background-color: rgba
(0,0,0,0.7);
286 .bufferBar::-moz-progress-bar
,
287 .progressBar::-moz-progress-bar
,
288 .volumeBackground::-moz-meter-bar {
293 border-radius: calc
(var
(--track-size
) / 2);
297 .scrubber:hover::-moz-range-thumb
,
298 .volumeControl:hover::-moz-range-thumb {
299 background-color: #48a0f7;
302 .scrubber:active::-moz-range-thumb
,
303 .volumeControl:active::-moz-range-thumb {
304 background-color: #2d89e6;
307 .scrubber::-moz-range-track
,
308 .scrubber::-moz-range-progress {
309 background-color: transparent
;
312 .volumeControl::-moz-range-progress
,
313 .volumeControl::-moz-range-track {
314 height: var
(--track-size
);
315 border-radius: calc
(var
(--track-size
) / 2);
318 .volumeControl::-moz-range-progress {
319 background-color: #ffffff;
322 .volumeControl::-moz-range-track {
323 background-color: rgba
(0,0,0,0.7);
327 .bufferBar::-moz-progress-bar {
328 background-color: rgba
(255,255,255,0.3);
329 border-radius: calc
(var
(--track-size
) / 2);
332 .progressBar::-moz-progress-bar {
333 background-color: #00b6f0;
341 border: 1px solid
#000000;
342 border-radius: 2.5px;
344 vertical-align: middle
;
345 background-color: #000000;
349 .touch .textTrackList {
353 .textTrackList > .textTrackItem {
356 height: var
(--button-size
);
357 font-size: var
(--label-font-size
);
364 text-overflow: ellipsis
;
366 background-color: transparent
;
369 .textTrackList > .textTrackItem:hover {
370 background-color: #444444;
373 .textTrackList > .textTrackItem[on] {
382 .positionDurationBox {
384 padding-inline-start: 1px;
385 padding-inline-end: 9px;
388 font-size: var
(--label-font-size
);
389 font-size-adjust: 0.55;
394 .positionDurationBox {
395 font-size-adjust: unset
;
396 font-family: "Helvetica Neue", "Helvetica", sans-serif
;
401 display: inline-block
;
412 /* Not showing the throbber on mobile because of conflict with m.youtube.com (see bug 1289412) */
413 .controlsContainer:not(.mobile) .statusIcon[type="throbber"] {
414 background: url
(chrome://global
/skin
/media
/throbber
.png
) no-repeat center
;
417 .controlsContainer:not(.mobile) .statusIcon[type="throbber"][stalled] {
418 background: url
(chrome://global
/skin
/media
/stalled
.png
) no-repeat center
;
421 .statusIcon
[type
="error"],
422 .statusIcon[type="pictureInPicture"] {
423 background-size: contain
;
424 background-repeat: no-repeat
;
425 background-position: center
;
428 .statusIcon[type="error"] {
431 background-image: url
(chrome://global
/skin
/media
/error
.png
);
434 .statusIcon[type="pictureInPicture"] {
437 background-image: url
(chrome://global
/skin
/media
/pictureinpicture
.svg
);
438 -moz-context-properties: fill
, stroke
;
443 .pictureInPictureToggleButton {
445 -moz-appearance: none
;
447 background-color: var
(--pip-toggle-bgcolor
);
448 color: var
(--pip-toggle-text-and-icon-color
);
450 padding: var
(--pip-toggle-padding
);
453 translate: var
(--pip-toggle-translate-x
) -50%;
454 transition: opacity
160ms linear
, translate
160ms linear
;
455 min-width: max-content
;
456 pointer-events: auto
;
460 .pictureInPictureToggleButton[policy="hidden"] {
464 .pictureInPictureToggleButton[policy="top"] {
466 translate: var
(--pip-toggle-translate-x
);
469 .pictureInPictureToggleButton[policy="one-quarter"] {
473 .pictureInPictureToggleButton[policy="three-quarters"] {
477 .pictureInPictureToggleButton[policy="bottom"] {
479 translate: var
(--pip-toggle-translate-x
) -100%;
482 .pictureInPictureToggleIcon {
483 display: inline-block
;
484 background-image: url
(chrome://global
/skin
/media
/pictureinpicture
.svg
);
485 background-position: center left
;
486 background-repeat: no-repeat
;
487 -moz-context-properties: fill
, stroke
;
488 fill: var
(--pip-toggle-text-and-icon-color
);
489 stroke: var
(--pip-toggle-text-and-icon-color
);
490 width: var
(--pip-toggle-icon-width-height
);
491 height: var
(--pip-toggle-icon-width-height
);
492 min-width: max-content
;
495 .statusIcon
[type
="pictureInPicture"]:dir
(rtl
),
496 .pictureInPictureToggleIcon:dir(rtl) {
497 transform: scaleX
(-1);
500 .pictureInPictureToggleLabel {
501 margin-inline-start: var
(--pip-toggle-padding
);
505 * For the Picture-in-Picture toggle, we don't use the built-in :hover
506 * pseudoclass because there are many sites where the arrangement of the DOM
507 * or the CSS will conspire to prevent :hover from matching on the <video>
508 * itself. PictureInPictureToggleChild takes care of punching through those
509 * barriers, and manually sets a .hovering class.
512 .controlsOverlay.hovering > .pictureInPictureToggleButton {
516 .controlsOverlay[hidetoggle="true"].hovering > .pictureInPictureToggleButton:not(.hovering) {
520 .controlsOverlay.hovering > .pictureInPictureToggleButton.hovering {
525 .controlsOverlay.hovering > .pictureInPictureToggleButton.hovering[policy="top"] {
529 .controlsOverlay.hovering > .pictureInPictureToggleButton.hovering[policy="bottom"] {
533 @supports -moz-bool-pref
("media.videocontrols.picture-in-picture.video-toggle.testing") {
535 * To make automated tests faster, we drop the transition duration in
538 .pictureInPictureToggleButton {
539 transition-duration: 10ms;
543 /* Overlay Play button */
545 min-width: var
(--clickToPlay-size
);
546 min-height: var
(--clickToPlay-size
);
548 background-image: url
(chrome://global
/skin
/media
/playButton
.svg
);
549 background-repeat: no-repeat
;
550 background-position: 54% 50%;
551 background-size: 40% 40%;
552 background-color: #1a1a1a;
553 -moz-context-properties: fill
;
560 .controlsSpacerStack:hover
> .clickToPlay
,
565 .controlsSpacerStack:hover > .clickToPlay[fadeout] {
569 .controlBar[fullscreen-unavailable] .fullscreenButton {
573 .statusOverlay
[fadeout
],
574 .statusOverlay[error] + .controlsOverlay > .controlsSpacerStack {
578 .pictureInPictureOverlay {
580 flex-direction: column
;
581 justify-content: center
;
584 background-color: rgb
(12, 12, 13);
587 /* Status description formatting */
600 [status
="errorAborted"] > [id
="errorAborted"],
601 [status
="errorNetwork"] > [id
="errorNetwork"],
602 [status
="errorDecode"] > [id
="errorDecode"],
603 [status
="errorSrcNotSupported"] > [id
="errorSrcNotSupported"],
604 [status
="errorNoSource"] > [id
="errorNoSource"],
605 [status
="errorGeneric"] > [id
="errorGeneric"],
606 [status
="pictureInPicture"] > [id
="pictureInPicture"] {
611 @media (-moz-windows-default-theme: 0) {
614 background-color: transparent
;