I’ve had a few issues with audio on HTML5 targets, initially I thought it was this:
Hi @jonnym Thanks for the rundown When we use webfonts, they are not loaded initially. If you use a sample such as “AddingText”, which sets text once and moves on, it won’t work properly. Only if the text is rendered after the web font is available will it look right, so if you disable the loading, it would depend on your project and how it is written, whether you will notice the problem. I suppose we should try and see if there is a solution for waiting for web fonts to load on Android, or …
But, further experimentation has revealed that ios wants the m4a format, but, if I include those then the game will fail in IE11/Edge.
Is there a way to get m4a only to load in ios? (Or, to not load in IE?)
Ok, there’s a fix as mentioned in the other thread
<assets path="assets/sound" rename="sound" embed="false"/>
setting the embed of the audio as false means it works in all browsers, but this feels like a rather hacky fix…
Thanks @ilMareGames , I can see that this will not embed the sounds if I’m targeting HTML5, but what I really want is a way to set the embed as true for everything except HTML5,
so something like
<section if="html5">
<assets path="assets/sound" rename="sound" embed="false"/>
</section>
<section if="!html5">
<assets path="assets/sound" rename="sound" embed="true"/>
</section>
Is that possible?
you can use:
<assets path="assets/sound" rename="sound" embed="false" if="html5"/>
or
<section if="html5">
<assets path="assets/sound" rename="sound" embed="false"/>
</section>
Sorry @ilMareGames I appear to have managed to edit a previously unfinished response, so my question is above…