Bug 708814 - Introduce a new function "onFullscreenChange" which is called when mozfullscreenchange event takes place and add a timer for hiding videocontrol when fullscreen starts. r=jaws

This commit is contained in:
Sunny 2013-04-17 11:48:07 -04:00
parent d80727e491
commit 7db2d83bdc

View File

@ -1029,6 +1029,13 @@
this.fullscreenButton.removeAttribute("fullscreened");
},
onFullscreenChange: function () {
if (this.isVideoInFullScreen()) {
this.Utils._hideControlsTimeout = setTimeout(this._hideControlsFn, this.HIDE_CONTROLS_TIMEOUT_MS);
}
this.setFullscreenButtonState();
},
clickToPlayClickHandler : function(e) {
if (e.button != 0 || this.hasError())
return;
@ -1423,7 +1430,7 @@
}
addListener(this.videocontrols, "transitionend", this.onTransitionEnd);
addListener(this.video.ownerDocument, "mozfullscreenchange", this.setFullscreenButtonState);
addListener(this.video.ownerDocument, "mozfullscreenchange", this.onFullscreenChange);
addListener(this.video, "keypress", this.keyHandler);
this.log("--- videocontrols initialized ---");