disable HTML5 autoplay
Hi, I read all previous posts on this subject, like https://support.mozilla.org/en-US/questions/961940
I already tried: media.autoplay.enabled;false media.windows-media-foundation.enabled;false plugins.click_to_play;true Stop Tube add on - it works only on YouTube FlashBlock - does not work because there is no Flash is installed
Then jscher2000 advised to start a new thread, so I am starting it. Note that in the last few weeks (November 2013) this problem became urgent since Yahoo news and many, many other sites started to include auto-play videos in almost all news articles.
Here is a sample element:
So, I guess, all Firefox needs to do is to automatically replace this autoplay="true" by autoplay="false" and I can start visiting yahoo again without those blasts of noise on every page.
Všetky odpovede (5)
There's autoplay and there's a script that calls the play() method on the media...
The media.autoplay.enabled preference handles the case of where autoplay is hardcoded into the page. However, it doesn't handle the case of where a script in the page virtually clicks play on the media. There is a bug on file requesting that the preference handle both cases: 659285 – Extend media.autoplay.enabled to provide a way to disable untrusted play() invocations.
Note about the bug tracking system: it's generally not helpful to add comments to bugs, but you can register on the Bugzilla site and "vote" for them to be fixed. See:
One workaround might be to inject your own script into the page to pause all media. But there's a timing problem: you need to pause instantly after it's played. Pausing before is useless, and pausing too long after will play at least a little bit of sound. That could be tricky to code.
Could you give a sample URL or two that has HTML5 autoplay video on Yahoo or other sites important to you?
"There's autoplay and there's a script that calls the play() method on the media... "
Firefox does not allow me to disable a particular script method, does it? (it would have been great). May be someone with Firefox sources can verify your idea by temporarily disabling that method.
"Could you give a sample URL or two that has HTML5 autoplay video on Yahoo or other sites important to you? "
Right now every link under http://screen.yahoo.com/ has this autoplay behavior. If you want specific url, here are few: http://screen.yahoo.com/popular/fit-fiction-chicken-soup-actually-183139983.html or http://screen.yahoo.com/popular/3-reasons-no-one-quite-210008183.html
Hi jhnlmn, on screen.yahoo.com I'm getting the Flash player, not the HTML5 player.
The Controle de Scripts extension can be used to block JavaScript methods, but I haven't tried to create a rule for the play method. (I've experimented with this extension in the past but don't use it regularly.)
"on screen.yahoo.com I'm getting the Flash player, not the HTML5 player. "
This is because you are still have Flash plugin installed. It is time to get rid of that old and insecure thing. Just go to Tools|Add-Ons|Plugins Select Shockwave Flash and change it to "Never Activate". Then refresh screen.yahoo.com and observe "<video>" elements, which are HTML5. And all those elements have autoplay=true
Are you sure that media.autoplay.enabled;false does, indeed, disables this autoplay=true?
"The Controle de Scripts extension can be used to block JavaScript methods"
Personally, I prefer not to use any plugins or add-ons in my browser for security reason. Still, just as experiment I installed 'Controle de Scripts' in a VM. But then, what method should I block? I tried to block:
video.play() HTMLVideoElement.play() HTMLMediaElement.play()
Nothing works (mean it still auto-plays).
I use Flashblock from the Mozilla Add-ons Web Page. It blocks everything, Including the click you put on this thread.