Make little games, worlds, and stories! (No coding required.) · By Adam Le Doux
Hey there! I'm making a game and want a loop of .wav music in the background. How'd I do that? (editing HTML only no Borksy....) And where exactly do I put it?
In the HTML export file, scroll down to the bottom, where it says:
<!-- DOCUMENT BODY --><body onload='startExportedGame()'><!-- GAME CANVAS --><canvas id='game'></canvas>
Above the final </body> tag but below <canvas id='game'></canvas>, put this:
<audio src="YOURAUDIOFILENAME.mp3" autoplay loop display="none">
You need to make sure when you upload your zip that the path to your audio file is correct, but otherwise, that's it.
Thanks, I had already fixed this, but I'll keep this in mind! I included it in my premium package at https://kewbish.itch.io/-insertspacehere-whales !