Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

Pixelbox

Create 2D games in JavaScript, made easier · By Cedric Stoquer

Builds fail on Chrome: AudioContext bug

A topic by blearn created Apr 19, 2020 Views: 211 Replies: 2
Viewing posts 1 to 3

When deploying a build to Itch.io I get the following error on Chrome browsers: “The AudioContext was not allowed to start. It must be resumed (or created) from a user gesture event handler. https://goo.gl/7K7WLu”

I think the way the pixelbox library initializes the AudioContext needs updated to resolve this.

For details see: https://developers.google.com/web/updates/2017/09/autoplay-policy-changes#webaudio

Edit: It fails on Brave (Version 1.7.92 Chromium: 80.0.3987.163) but does work on Chrome (Version 80.0.3987.163)

I thought that Itch had already some kind of hack to initialize the AudioContext when clicking on the play button (but I think it requires to uncheck the "Automatically start on page load" option).

I will try to think about something to fix this issue.