Log In  

Chrome 71 (December 2018) implements the new autoplay audio policy for the Web Audio API, which affects the Pico-8 web player. The BBS is OK because it implements a "curtain" that the user clicks on to start the player, which does the Web Audio enable interaction. But this breaks the exported web player as of Pico-8 0.1.11g: If I export a game to its own page then load the page, Pico-8 starts immediately and is disallowed sound. No interaction enables sound after this point.

One fix is for the exported web player to implement a curtain similar to the BBS. I don't know if that meets everyone's needs but would resolve the issue for the exported page. I assume we can work around this by implementing our own player curtain.

Interesting side note: This appears to affect stat() calls regarding sound as well. I have a cart that paused on stat(24) != 0, to wait for music to finish playing. The web export with sound disabled never gets past this point. I added a timeout for the pause to get around this, though I still don't have sound in this case.


P#59836 2018-12-08 21:55 ( Edited 2018-12-08 22:21)

This also needs to be investigated and tested with Safari 12. I don't use Safari regularly so I don't know how recently they implemented new autoplay policies. Various articles suggest they did it earlier, possibly last year with Safari 11. We're noticing a similar blocked audio behavior with HTML exports in Safari.

P#59859 2018-12-09 20:07

Thanks @Liquidream for reminding me of @ultrabrite's replacement .html file, which resolves the autoplay audio issue in Chrome 71—but not Safari 12, as far as I can tell:


Demo with Santa Panic:

P#59861 2018-12-09 21:12

Just what I was looking for! Excellent!

P#60226 2018-12-21 23:55

[Please log in to post a comment]

Follow Lexaloffle:        
Generated 2022-09-27 13:26:00 | 0.013s | Q:15