Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Some sites, such as YouTube, don't start playing a video until you switch to the tab.


That hasn't been my experience with YouTube; middle-clicking to open a half-dozen videos in tabs starts all the videos playing at once.


Not sure if you're using Chrome or Firefox. I just tested FF 54 by alt-clicking a link. It loads and autoplays the non-active tab. Chrome v59, loads the page but doesn't autoplay until you switch to it. Chrome is my daily driver and I really prefer this behavior.

But recent performance improvements, especially the handling of many, many tabs has me looking at FF again.


By default they do start playing immediately in Firefox. Configurable with the media.block-autoplay-until-in-foreground setting.


Sorry but you got the wrong setting here. To disable autoplay it's media.autoplay.enabled


media.autoplay.enabled toggles whether videos in the current (foreground) tab starts auto playing or not

The question was about videos in a background tab, which is controlled by the media.block-autoplay-until-in-foreground setting.


Sadly mozilla provides no documentation for those settings, but I can assure you that this setting does not care if the tab is in the foreground or background, autoplay is simply disabled which it seems to me was what was asked here IIANM.


Unfortunately, neither of those settings does quite what I'd like. Once a tab has been in the foreground, I'd like it to continue being able to play things in the background, including new things. (For instance, some sites play a chime for notifications.) I just don't want anything played from a tab that has never been in the foreground.


Some sites maybe, but definitely not youtube.




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: