• Hello [name]! Thanks for joining the GMC. Before making any posts in the Tech Support forum, can we suggest you read the forum rules? These are simple guidelines that we ask you to follow so that you can get the best help possible for your issue.

HTML5 Can't get music to play

Filipp_BSG

Member
I'm trying to get GMS (v1.4.1763) play music in mobile browsers, however, no results with settings like these:



All other sounds are playing as usual. I'm also using a workaround with eventlistener for unlocking audio on iOS and check audio_system() before calling an apporiate playback function, but music is still not playing. Not to mention, I even wrote a simple JS extension to handle music playback – works on desktop, but not on mobile, which may indicate that there may be a problem with security settings. I see that in many other GM games there are no problems with music playback on mobile devices. Maybe, there is a bug with GM version or I'm doing something wrong with audio settings?
 
Last edited:

Filipp_BSG

Member
Yes, I'm using check for LMB release, but stil nothing... The strangest thing is that all other sounds are playing as usual.
 
J

jadegames

Guest
Hi, you really don't need any workarounds to play audio on iOS.

Audio on iOS works in Gamemaker, if it didn't this forum would have more people complaining that it doesn't work!

So you changed your audio compression attributes to the ones I wrote in the link and still nothing? That is unusual. What do you mean "all other sounds are playing as usual"? Does it work on Android devices?

If you follow my steps below sound will work on iOS. I would almost recommend disabling any JS extensions you have and trying again.

Good luck!
 

Filipp_BSG

Member
Hi, thanks for your replies, iOS workaround was implemented in my base index.html way before it was actually added to GMS, so, yes, it's quite useless now. I've tried to set compression to Compressed/Streamed, got no result.
Yes, all other sounds are playing both on iOS and Android.
Regarding JS extensions: do you mean audio-related? If so, I don't have these, the one mentoined in the first post was written to test playback (if it worked, we could concluse that it's 100% a GMS problem).
 

chmod777

Member
For some reasons, compressed sounds don't use the JS Web Audio API, but instead it adds an audio node to the DOM with the autostart attribute. This is why it might not work on mobile devices.
 
Top