Browsers and stopping automatic video playback

mikeymikec

Lifer
May 19, 2011
20,061
14,469
136
Does anyone have a solution that consistently works (or say works at least 90% of the time), both for stopping the video from auto starting and being able to play desired videos?

I've gone through various solutions in the past, the most reliable was telling the Adobe Flash plugin in FF to 'ask to activate', but obviously since then most video is h264 these days. NoScript is a pain that often requires the users to allow more and more sources to temporarily be able to do scripting (and even then sometimes ad-laden videos won't work after temporarily allowing all a few times), FF and Chrome both have (had?) options to stop auto video playback that no longer work reliably, and right now I'm using media.autoplay.enabled=false in Firefox and that often results in the video not loading properly on the first attempt, and even after 1-3 page reloads it still sometimes doesn't, which is more or less what I previously found with it before I migrated to Chrome a couple of years ago.

Oddly, when I migrated to Linux the media.autoplay.enabled=false option worked wonderfully for a week or two, and then reverted to the behaviour that I'm used to with it.

I posted this in 'software for windows' as it's not platform specific and I thought people might be put off from replying if it's in the *nix thread.
 

lxskllr

No Lifer
Nov 30, 2004
59,181
9,658
126
Perhaps you could try using NoScript, allowing everything by default, but in the preferences, disallow media globally. That should make video click to play. I haven't tested it, but that might be an avenue of attack.
 

mikeymikec

Lifer
May 19, 2011
20,061
14,469
136
Admittedly I have ublock origin installed so I wonder whether that plus media.autoplay.disabled might be causing a problem. It would seem like a bad idea to combine NS with UBO. However it might be an idea to try a bit of testing with UBO disabled and see whether media.autoplay.disabled works better.
 

lxskllr

No Lifer
Nov 30, 2004
59,181
9,658
126
I have uBo and NoScript installed, and they don't seem to conflict, but I have them setup to make life difficult, so perhaps I just don't notice :^D
 

mikeymikec

Lifer
May 19, 2011
20,061
14,469
136
I used to have NS once upon a time, and I liked having the level of control it gives, but in the end I didn't like it at the expense of the tedium to get one sodding video to load on a news page... by the time I'm done getting the video to work, I could have probably watched the ad it came with three times over. And needless to say, I hate freaking adverts!

- edit - I just tried YouTube without UBO and media.autoplay didn't work any better.

Maybe I can work myself around to your suggestion, but asking me to configure NS to allow everything by default is like setting up a firewall in the same way, my rational brain revolts! :)
 
Last edited:

Cerb

Elite Member
Aug 26, 2000
17,484
33
86
No. The page can use javascript to make the video play at some point, such a after the page fully loads. The browser devs would need to embed restrictions, or possibly configurable exceptions, into the media control APIs they use, and both Mozilla and Google prefer not to, leaving us with browser extensions or Greasemonkey scripts that work for a month or two between breakages, when the website's code gets tweaked again.

Magic Actions for Youtube has worked well for me, in the past, but some think it's also data mining, so YMMV.
 

lxskllr

No Lifer
Nov 30, 2004
59,181
9,658
126
Maybe I can work myself around to your suggestion, but asking me to configure NS to allow everything by default is like setting up a firewall in the same way, my rational brain revolts! :)
If it makes you feel any better, that's typically how I setup NS for the technologically inept. Even allowing scripts globally, it can still block xss, and that beats a blank. It adds a bit of protection, and shouldn't require user intervention, and doesn't cause breakage ime.