Bug 1348954 - Html5-video controls do not hide when in fullscreen. r=ralin
Undo incorrect change from bug 1341029, and tell ESLint about how Utils is 'global' to some of the videocontrols.xml event listeners. MozReview-Commit-ID: 9ItMIzwYhEj
This commit is contained in:
@@ -1006,19 +1006,19 @@
|
||||
_showControlsTimeout : 0,
|
||||
SHOW_CONTROLS_TIMEOUT_MS: 500,
|
||||
_showControlsFn() {
|
||||
if (this.Utils.video.matches("video:hover")) {
|
||||
this.Utils.startFadeIn(this.Utils.controlBar, false);
|
||||
this.Utils._showControlsTimeout = 0;
|
||||
this.Utils._controlsHiddenByTimeout = false;
|
||||
if (Utils.video.matches("video:hover")) {
|
||||
Utils.startFadeIn(Utils.controlBar, false);
|
||||
Utils._showControlsTimeout = 0;
|
||||
Utils._controlsHiddenByTimeout = false;
|
||||
}
|
||||
},
|
||||
|
||||
_hideControlsTimeout : 0,
|
||||
_hideControlsFn() {
|
||||
if (!this.Utils.scrubber.isDragging) {
|
||||
this.Utils.startFade(this.Utils.controlBar, false);
|
||||
this.Utils._hideControlsTimeout = 0;
|
||||
this.Utils._controlsHiddenByTimeout = true;
|
||||
if (!Utils.scrubber.isDragging) {
|
||||
Utils.startFade(Utils.controlBar, false);
|
||||
Utils._hideControlsTimeout = 0;
|
||||
Utils._controlsHiddenByTimeout = true;
|
||||
}
|
||||
},
|
||||
HIDE_CONTROLS_TIMEOUT_MS : 2000,
|
||||
@@ -1103,7 +1103,7 @@
|
||||
this.startFadeOut(this.controlBar, false);
|
||||
this.textTrackList.setAttribute("hidden", "true");
|
||||
clearTimeout(this._showControlsTimeout);
|
||||
this.Utils._controlsHiddenByTimeout = false;
|
||||
Utils._controlsHiddenByTimeout = false;
|
||||
}
|
||||
},
|
||||
|
||||
@@ -1267,7 +1267,7 @@
|
||||
|
||||
onFullscreenChange() {
|
||||
if (this.isVideoInFullScreen()) {
|
||||
this.Utils._hideControlsTimeout = setTimeout(this._hideControlsFn, this.HIDE_CONTROLS_TIMEOUT_MS);
|
||||
Utils._hideControlsTimeout = setTimeout(this._hideControlsFn, this.HIDE_CONTROLS_TIMEOUT_MS);
|
||||
}
|
||||
this.setFullscreenButtonState();
|
||||
},
|
||||
@@ -1832,6 +1832,9 @@
|
||||
this.controlListeners = [];
|
||||
|
||||
// Helper function to add an event listener to the given element
|
||||
// Due to this helper function, "Utils" is made available to the event
|
||||
// listener functions. Hence declare it as a global for ESLint.
|
||||
/* global Utils */
|
||||
function addListener(elem, eventName, func) {
|
||||
let boundFunc = func.bind(self);
|
||||
self.controlListeners.push({ item: elem, event: eventName, func: boundFunc });
|
||||
|
||||
Reference in New Issue
Block a user