HTML5 Sounds on HTML are acting weird

Mr Errorz

Member
Got this HTML project, and the sound is acting weird.
Some sounds play in delay, like a little bit after they are triggered by code, while some sounds don't play at all until I restart the room, and than they play normally..
Any one knows why this is happening or how to solve?

BTW, all the sounds I imported to the project, are attributed as Compressed - Streamed,
not sure if that is related.
 

Mr Errorz

Member
Investigated a little more, used audio_sound_is_playable() and it seems all sounds in the game are not playable when the game starts until I interact with it [i.e. a mouse press on the browser's window].
Any way to get around this?
 

Mert

Member
Investigated a little more, used audio_sound_is_playable() and it seems all sounds in the game are not playable when the game starts until I interact with it [i.e. a mouse press on the browser's window].
Any way to get around this?
This is not a bug, nor error. It's a general rule by Google/Mozilla etc.
You can only play sound right after user interacts with the window.

But, also if I remember correctly, Game Maker uses a technique to override this rule.
 

Mr Errorz

Member
This is not a bug, nor error. It's a general rule by Google/Mozilla etc.
You can only play sound right after user interacts with the window.

But, also if I remember correctly, Game Maker uses a technique to override this rule.
So what is that technique?
 
Top