There are still very few addons you can install on Firefox for Android (without a dev version and a bunch of hassle), but it's telling that one of the few addons that anyone can install disables this API: <a href="https://addons.mozilla.org/android/addon/video-background-play-fix/" rel="nofollow">https://addons.mozilla.org/android/addon/video-background-pl...</a>
IIRC this comes down to disagreements between browser vendors as to what is and what isn't potentially harmful (for a wide definition of harmful) detection of user behavior.<p>I don't remember the details, but expect browsers to differ on details of this API basically forever.
It might make sense to detect page visibility prior to loading a pay-per-load API like Mapbox GL JS, Apple Maps on Web, etc.<p>The scenario I imagine is:<p>1. Your map is loaded<p>2. User opens a new tab (your map is now in a background tab)<p>3. User restarts browser and existing tabs are loaded<p>4. You get charged for an API load even though the page is not visible<p>Does anyone know if this is the case?<p>Edit: also analytics. If you don't load your GA until page is visible, I wonder what impact that has on your visitor numbers
I tried using the page visibility API to refresh displayed data when the user returned to the page after being away for a while. It's more efficient than needlessly polling when no one's around to see.<p>I discovered a bunch of these edge cases and had to abandon the approach - it just wasn't reliable. The page would fail to recognize departure + return in too many scenarios and so wouldn't refresh.
Off topic: This page is yet another example of many, many websites that display a useless horizontal scrollbar. Non-overlay scrollbars simply do not work with elements that are set to a width of 100vw. Using 100vw is almost always a mistake.<p><a href="https://duckduckgo.com/?q=avoid+100vw" rel="nofollow">https://duckduckgo.com/?q=avoid+100vw</a>