I just wrote a tutorial on disabling auto-playing Flash and HTML5 videos in Firefox and Chrome in which I mentioned Firefox's media.autoplay.enabled preference to disable some -- but not all -- HTML5 videos from playing automatically.
The reason why this works only on some sites but not on others is because of how sites implement the player and play() calls. Sites may call play() directly without using autoplay, and if that is the case, they are not blocked by Firefox's current implementation of the feature as it only blocks videos if autoplay is explicitly used.
This is for instance the case on YouTube which you can test easily by setting the preference to false in Firefox before you play a video on YouTube afterwards. You will notice that the video plays automatically when you open the site.
At least, that is the case if you run a version of the browser prior to 41. If you run the latest Nightly build of the browser, you will notice that Mozilla fixed the issue.
Setting the preference to false and visiting YouTube afterwards will stop all videos from playing automatically on the site.
The bug listing, opened back in 2011 had to be reopened multiple times as Mozilla, for varying reasons, did not implement the change in the browser.
Work on it began just a couple of days ago and the final patch that resolves the issue landed for Firefox 41 versions quickly afterwards.
Firefox 41 is currently available in the Nightly channel. This means that Stable users will have to wait a couple of months before it lands in their version of the browser (it takes six weeks to move to a new version with the next update to version 39 being released on June 30, 2015).
Mozilla aims to release Firefox 41 on September 22 to the stable channel of the web browser.
Instructions to enable the blocking of HTML5 video in Firefox
Do the following to block HTML5 video autoplay in the browser:
Doing so once sets the preference to false which turns autoplay off for HTML elements in Firefox. You can reverse that at any time by double-clicking again, or by right-clicking on the preference and selecting the reset option from the context menu.
Advertising revenue is falling fast across the Internet, and independently-run sites like Ghacks are hit hardest by it. The advertising model in its current form is coming to an end, and we have to find other ways to continue operating this site.
We are committed to keeping our content free and independent, which means no paywalls, no sponsored posts, no annoying ad formats or subscription fees.
If you like our content, and would like to help, please consider making a contribution:
Ghacks is a technology news blog that was founded in 2005 by Martin Brinkmann. It has since then become one of the most popular tech news sites on the Internet with five authors and regular contributions from freelance writers.