mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-23 10:15:41 +00:00
Bug 1447544 - Set firstShow to false before the control fades out r=Gijs
The flag is used to trigger play() when the control first hides. There is no reason to set only after transition ends. We can set it to false as soon as we trigger play(). This is likely to fix a regression from bug 1449532 given that we have switched to Web Animation API there. MozReview-Commit-ID: F4n3rKdzYKr --HG-- extra : rebase_source : 133fde3832c6303b87ad42e16ed397292cb98e7c
This commit is contained in:
parent
626b56fb10
commit
9bb2c92988
@ -1951,20 +1951,9 @@
|
||||
return;
|
||||
}
|
||||
this.Utils.startFadeOut(this.Utils.controlBar);
|
||||
if (this.firstShow) {
|
||||
this.videocontrols.addEventListener("transitionend", this);
|
||||
}
|
||||
},
|
||||
|
||||
handleEvent(aEvent) {
|
||||
if (aEvent.type == "transitionend") {
|
||||
this.firstShow = false;
|
||||
try {
|
||||
this.videocontrols.removeEventListener("transitionend", this);
|
||||
} catch (ex) {}
|
||||
return;
|
||||
}
|
||||
|
||||
if (this.videocontrols.randomID != this.Utils.randomID) {
|
||||
this.terminateEventListeners();
|
||||
}
|
||||
@ -2002,6 +1991,7 @@
|
||||
if (event.originalTarget == self.Utils.controlsSpacer) {
|
||||
if (self.firstShow) {
|
||||
self.Utils.video.play();
|
||||
self.firstShow = false;
|
||||
}
|
||||
self.toggleControls();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user