Skip to main content

Google Chrome’s autoplay blocker has an unintended victim — web games

Indie marketplace Itch.io has over 37,000 web embedded games.
Indie marketplace Itch.io has over 37,000 web embedded games.
Image Credit: GamesBeat

testsetset

Google rolled out its Chrome 66 update last month, and its biggest feature is that autoplaying content will be muted by default. This might be a positive for people who are sick of rogue videos as they’re browsing the Internet, but it has had a negative effect on game developers who embed their HTML5 games on the web.

Developers who upload their games on their personal sites as well as to places like the indie platform Itch.io can enable players to run their games in the browser. This is a popular option for smaller projects, like those made for the Ludum Dare game jam. Itch.io founder Leaf Corcoran says that “a pretty significant number of games” on the platform have been affected by Google’s update, causing games to run without a way to turn on audio.

“To make matters worse, from what I can tell, Chrome does not make it clear it’s disabling the audio,” said Corcoran in an email to GamesBeat. “It is probably also muting games that use game engines which initialize audio on start, but don’t immediately have sound playing.”

A workaround is for players and developers to select “click to run HTML5 game embeds” on their Itch.io settings. This way, when you go on a game page, you’re opting in to hear the audio when you click “run.” In January, Itch.io rolled out more embed options, including enabling developers to make all their projects “click to run” by default. However, Corcoran says that some game experiences “make more sense when they load with the page,” so Itch.io didn’t force developers to adopt this feature.

“We may have to make all games ‘click to run’ because of the Chrome update, but we’ll wait a bit to see how it pans out,” said Corcoran.

Google Chrome’s communications manager, Ivy Choi, pointed to previously posted documentation for developers’ best practices moving forward.

“With Chrome’s new autoplay policies, developers shouldn’t assume that audio can be played before a user gesture,” said Choi in an email to GamesBeat. “With gaming in Chrome, this may affect Web Audio. We have shared details on how developers can do to address this, and the design for the policy was published last year.”

https://twitter.com/mcclure111/status/993515051733532673

Indie developer Andi McClure calls the update “good and appropriate,” but notes that Google didn’t interface with the development community before rolling it out. This has led to confusion about what is affected by the update and what isn’t. For instance, Google uses a Media Engagement Index (MEI) to gauge whether or not a user frequently allows audio to be played on a site. However, the way it ranks pages is opaque. On Itch.io, I also didn’t seem to run into any trouble with Unity games, even though they didn’t present a “click to run” button.

For McClure, she’s noticed that if people click on a game from her main page, the audio will play. However, if someone tries to access the game through a direct link or by clicking through from somewhere else, like Twitter, then the audio is muted.

“It definitely looks to me like it is affecting a lot of devs,” said McClure in a chat conversation with GamesBeat. “I’m seeing a lot of people posting about being hit by it today. In addition, this affects even devs whose websites seem to still be working.”

She says that the documentation provided is unclear and doesn’t answer some of the questions developers might have about how to proceed with the new rules. The guidelines make sense for the majority of developers, but “vague about what happens in some semi-rare cases.” Choi did not directly answer questions about whether or not the Google Chrome team plans on clarifying the documentation or if it has done additional outreach to the game developer community.

“The thing developers are supposed to do is pretty straightforward. You have to wait until the first user interaction event callback and then unsuspend your audio context. This is sufficient for the majority of developers,” said McClure. “The problems I see are (1) What exactly are the relevant user interaction callbacks? It doesn’t say. (2) What about Audio objects [or] createMediaElementSource? (3) Why on earth is my website, which is based on WebAudio and is not following Google’s rules, not muted?”

McClure notes that the autoplay update is similar to the restrictions in Apple’s Safari mobile browser, so if a developer has written code to satisfy one, then they might be unaffected. However, it’s not clear whether or not that’s the case.

“The bigger problem is that most game devs will not be able to, or will not have the time to, patch their games for this,” said McClure. “I have six WebAudio games on my website. Cabbibo and Increpare have dozens each. It is more likely that developers will leave their games broken than individually rewrite the code and re-ship 20 separate games.”

Indie devs who are working on HTML5 games now may not encounter as many problems. Some are already documenting workarounds in line with Chrome 66’s guidelines. However, unless Google rolls out a fix for older games that were broken by the update, it’s not practical for most developers to spend the hours necessary to re-code them. Those games may simply stay broken forever — or vanish as developers opt to take them down.