Bug 760696 - Use :fullscreen to detect HTML5 video/audio state for controls visibility. r=jaws,dbaron

This commit is contained in:
Frank Yan 2012-06-01 15:10:37 -07:00
Родитель ad1b675c38
Коммит ab80151f3b
2 изменённых файлов: 2 добавлений и 10 удалений

Просмотреть файл

@ -702,13 +702,13 @@ iframe:-moz-full-screen {
}
/* media elements */
video > xul|videocontrols, audio > xul|videocontrols {
:-moz-any(video, audio) > xul|videocontrols {
display: -moz-box;
-moz-box-orient: vertical;
-moz-binding: url("chrome://global/content/bindings/videocontrols.xml#videoControls");
}
:-moz-any(video,audio):not([controls]) > xul|videocontrols:not(.forceControls) {
:-moz-any(video, audio):not([controls]):not(:-moz-full-screen) > xul|videocontrols {
visibility: hidden;
}

Просмотреть файл

@ -815,13 +815,6 @@
this.startFade(this.volumeStack, isMouseOver);
},
forceControls: function () {
if (document.mozFullScreenElement == this.video)
this.videocontrols.classList.add("forceControls");
else
this.videocontrols.classList.remove("forceControls");
},
_controlsHiddenByTimeout : false,
_showControlsTimeout : 0,
SHOW_CONTROLS_TIMEOUT_MS: 500,
@ -1404,7 +1397,6 @@
addListener(this.videocontrols, "transitionend", this.onTransitionEnd);
addListener(this.video.ownerDocument, "mozfullscreenchange", this.setFullscreenButtonState);
addListener(this.video.ownerDocument, "mozfullscreenchange", this.forceControls);
// Make the <video> element keyboard accessible.
this.video.setAttribute("tabindex", 0);