I just deployed a significant update to the HTML5 audio system. The previous one was just kind of barely working in order to get the HTML5 engine released, but it should be much better now - it even has a couple of minor improvements:
* Bugfix: Audio looping in editor fixed
* Bugfix: Audio stopping issues fixed
* Bugfix: Escape key now behaves properly when behavior window is open
* Bugfix: Audio pauses/resumes with game
* Improvement: Sound select preview uses volume setting
* Improvement: Sound volume slider plays sound on change (to make testing volume easier)
** NOTE **
I also ran into an issue that I cannot easily resolve. Both Chrome and Firefox (and Safari, and maybe others...) do not allow sounds to play until the player interacts with the page
. Interact means click somewhere on the page, basically. This is a problem, obviously, for any game that has audio on the intro screen. I'd like to hear thoughts about how we should handle this - here are some ideas:
1) Don't change anything - if you want to have audio play on the initial startup, have some sort of "unmute" or "play" button on the screen that initiates the music or ambient audio.
2) Have some sort of "click to unmute" message on the loading screens. This isn't ideal, since it would not be customizable per game - they would all look the same.
3) Have some sort of messaging outside the game, on the page. This isn't great either, since people would likely not ever read it.
4) Maybe some other idea?
Some documentation on this issue:https://hacks.mozilla.org/2019/02/firefox-66-to-block-automatically-playing-audible-video-and-audio/https://developers.google.com/web/updates/2017/09/autoplay-policy-changes#webaudio