If that doesn't work there is always the option to load the audio directly on the page?
That is how my games play music in the background - in this case one can then then pause/play the playlist with the music button in the game bar
. It can also map puzzlescript sounds to custom sounds (used in Gravirinth
) but without control over when to stop them from playing.