Bug 1336400 - part1 : remove MozAutoplayEnabled from videocontrols.xml.
MozReview-Commit-ID: 8rZtAfRpjge
--- a/toolkit/content/widgets/videocontrols.xml
+++ b/toolkit/content/widgets/videocontrols.xml
@@ -437,17 +437,17 @@
//
// For videos with |autoplay| set, we'll leave the controls initially hidden,
// so that they don't get in the way of the playing video. Otherwise we'll
// go ahead and reveal the controls now, so they're an obvious user cue.
//
// (Note: the |controls| attribute is already handled via layout/style/html.css)
var shouldShow = !this.dynamicControls ||
(this.video.paused &&
- !(this.video.autoplay && this.video.mozAutoplayEnabled));
+ !this.video.autoplay);
// Hide the overlay if the video time is non-zero or if an error occurred to workaround bug 718107.
let shouldClickToPlayShow = shouldShow && !this.isAudioOnly &&
this.video.currentTime == 0 && !this.hasError();
this.startFade(this.clickToPlay, shouldClickToPlayShow, true);
this.startFade(this.controlsSpacer, shouldClickToPlayShow, true);
this.startFade(this.controlBar, shouldShow, true);
},
@@ -1022,17 +1022,17 @@
}
clearTimeout(this._hideControlsTimeout);
// Suppress fading out the controls until the video has rendered
// its first frame. But since autoplay videos start off with no
// controls, let them fade-out so the controls don't get stuck on.
if (!this.firstFrameShown &&
- !(this.video.autoplay && this.video.mozAutoplayEnabled)) {
+ !this.video.autoplay) {
return;
}
if (this._controlsHiddenByTimeout) {
this._showControlsTimeout = setTimeout(this._showControlsFn, this.SHOW_CONTROLS_TIMEOUT_MS);
} else {
this.startFade(this.controlBar, true);
}
@@ -1070,17 +1070,17 @@
event.clientY < controlRect.bottom &&
event.clientX > controlRect.left &&
event.clientX < controlRect.right;
// Suppress fading out the controls until the video has rendered
// its first frame. But since autoplay videos start off with no
// controls, let them fade-out so the controls don't get stuck on.
if (!this.firstFrameShown && !isMouseOver &&
- !(this.video.autoplay && this.video.mozAutoplayEnabled)) {
+ !this.video.autoplay) {
return;
}
if (!isMouseOver && !isMouseInControls) {
this.adjustControlSize();
// Keep the controls visible if the click-to-play is visible.
if (!this.clickToPlay.hidden) {
@@ -2267,20 +2267,16 @@
elem.addEventListener(eventName, boundFunc, { mozSystemGroup: true });
}
addListener(this.clickToPlay, "click", this.clickToPlayClickHandler);
addListener(this.video, "MozNoControlsBlockedVideo", this.blockedVideoHandler);
for (let event of this.videoEvents) {
this.video.addEventListener(event, this, { mozSystemGroup: true });
}
-
- if (this.video.autoplay && !this.video.mozAutoplayEnabled) {
- this.blockedVideoHandler();
- }
}
};
this.Utils.init(this);
this.Utils.video.dispatchEvent(new CustomEvent("MozNoControlsVideoBindingAttached"));
]]>
</constructor>
<destructor>
<![CDATA[