4 ms·
The solution I use is to set media.autoplay.blocking_policy to 2 in about:config (I found this on the Mozilla wiki [1]). This setting requires a click to play m
by zwegner 5y ago
The solution I use is to set media.autoplay.blocking_policy to 2 in about:config (I found this on the Mozilla wiki [1]). This setting requires a click to play media.
Incidentally, I browse Twitter while logged in, but the autoplay settings are "per-browser", and Firefox's anti-fingerprinting mode makes Twitter think you're using a new browser on each visit, and thus keeps autoplaying all the time without the above setting. Pretty irritating.
[1] https://wiki.mozilla.org/Media/block-autoplay https://wiki.mozilla.org/Media/block-autoplay
- gruez 5y ago> The solution I use is to set media.autoplay.blocking_policy to 2 in about:config (I found this on the Mozilla wiki [1]). This setting requires a click to play media. Not really. The mozilla wiki says: >The technical detail for this policy is that the play invocation should be triggered inside an user input event handler. If the autoplay is what OP described (ie. "starting to auto-play just by scrolling into view"), then that would satisfy the condition because it's within an user input event handler (the scroll).
- zwegner 5y agoRight, and as the wiki mentions, it's not a great solution overall. But at least it works for me for Twitter (and Twitter is still trying to autoplay on scroll, the play button on videos disappear while scrolling only to reappear). Not sure why it works actually, but it's better than going in the Twitter settings all the time or dealing with autoplay.
- opheliate 5y agoFrom the wiki: > For example, when a user clicks the element X, then we only allow a website to start the element X from a function that is in the call stack based on the X's “click” event handler. I could be misinterpreting this, but doesn't that imply that scrolling into view would generally not be sufficient to allow autoplay? Since the scroll event would be on the body/window, and the video itself is not the target of the event?
- gruez 5y agoMy interpretation there is that you can start video playback within a click handler or one of its callees, but there's no check on where the video element is. The latter check would be impossible to implement because <video> elements can't have child elements (eg. for playback buttons) so adding that restriction would break custom playback buttons.
- eth0up 5y agoSome additional non-default settings I have which work very well so far: media.autoplay.default = 5 media.block-autoplay-until-in-foreground = false Of course, if you're using Android, about:config isn't an option unless you use nightly.
- nanis 5y agoCuriosly, I just checked and I have: * media.autoplay.default = 5 * media.autoplay.enabled = false in my about:config but media.block-autoplay-until-in-foreground was left at its default "true" value, so I changed that. I am going to post this and restart the browser to see if that did the trick. *Update*: No, it didn't. sigh I found this: https://support.mozilla.org/en-US/questions/1274056 https://support.mozilla.org/en-US/questions/1274056 > media.autoplay.allow-extension-background-pages false > media.autoplay.block-event.enabled true > media.autoplay.block-webaudio true > media.autoplay.default 5 > media.autoplay.enabled.user-gestures-needed false There is also this https://old.reddit.com/r/firefox/comments/h0rsd9/could_someone_please_explain_the_options_for/fuohfrs/ https://old.reddit.com/r/firefox/comments/h0rsd9/could_someo... > media.autoplay.blocking_policy = 2 seems to correspond to the media.autoplay.enabled.user-gestures-needed setting above. Will try those next. *Last Update*: I have set: media.autoplay.allow-extension-background-pages = false media.autoplay.block-event.enabled = true media.autoplay.block-webaudio = true media.autoplay.default = 5 media.autoplay.blocking_policy = 2 Thank you very much. and that finally seems to have restored the behavior I want.