I noticed that in HTML 5 + Firefox, PlayMusic("music.ogg",1) does not loop the music.
(It does loop in HTML 5 + Chrome.)
Therefore, for the time being, I have added this MusicState check to OnUpdate to achieve a "manual" kind of looping:
Method OnUpdate:Int() ' music is not playing If (MusicState() = 0) Then ' start music PlayMusic("music.ogg",1) End If End Method
There is a slight pause between two plays.
By the way, I switched to using OGG for music in HTML 5 (MP3 in Flash) since my song, which lasts only about 5 seconds, would be sized 600 KB in WAV, while the OGG version is only 70 KB.
Of course the downside of OGG is that it does not work under IE. So people who play my game as HTML 5 + IE would hear no music at all.
In that respect I suppose HTML 5 is still to be seen as "hey that's nice that it works as HTML 5 too" but not as the main target to make a game for.