Audio issues HTML5 target (IE Edge vs. IOS Safari)

I’ve had a few issues with audio on HTML5 targets, initially I thought it was this:

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…

Should be:

<section unless="html5">
1 Like