• Bypassing Chrome's Autoplay Policy
    5 replies, posted
I'm recycling one of the domains I bought as a joke on the forums a while back to basically act as a webm/MP4 version of thebest404pageever/z0rde sites, but Chrome implemented a policy a while back that went into effect this april that basically disables autoplay. https://developers.google.com/web/updates/2017/09/autoplay-policy-changes So far nothing I tried seemed to work and took me a good while to figure out that it was Chrome itself blocking the autoplay playback I'll show a proof of concept later when Namecheap's DNS aggregation is finished (like 72 hours), but it basically picks a random video from an array, slaps it into a <video> tag with DOM editing, makes it as the site background with CSS magic and uses JS promise to either start video playback or display clickable text to run the video. I basically don't want the "click to play" part
This was a challenge for our web app too. Not sure how our engineers got around it though. https://bugs.chromium.org/p/chromium/issues/detail?id=840866 There's some discussion going on here. > We've updated Chrome 66 to temporarily remove the autoplay policy for the Web Audio API. > This change does not affect most media playback on the web, as the autoplay policy will remain in effect for <video> and <audio>. > > We’re doing this to give Web Audio API developers (e.g. gaming, audio applications, some RTC features) more time to update their code. The team > here is working hard to improve things for users and developers, but in this case we didn’t do a good job of communicating the impact of the new > autoplay policy to developers using the Web Audio API. > > The policy will be re-applied to the Web Audio API in Chrome 70 (October). Developers should update their code based on the recommendations at: > https://developers.google.com/web/updates/2017/09/autoplay-policy-changes#webaudio From the WebRTC side, we are going to work on landing some of the improvements discussed in this thread, including https://bugs.chromium.org/p/chromium/issues/detail?id=835767#c6. We will try to communicate the status of this work regularly.
Google picked wrong solution for the problem if you ask me. They should've just made background tabs be muted untill you open them and if you mute them manually it should've stored that state.
This. Don't try to bypass a browser block, it just makes you look silly, plus people who are now expecting Chrome to block autoplay will be wondering why your website has somehow gotten round it. If anyone comes to you and asks "why isn't this video autoplaying" just direct them to that Chrome link and say it's not your fault. People can choose to use another browser if they're not happy with Google's decisions
Thank you so much for sharing this useful information.
Sorry, you need to Log In to post a reply to this thread.