According to this http://docs.unity3d.com/Manual/webgl-audio.html www.audioClip works in webgl. But when I try and load a .mp3 from the server it loads up fine but I get no audio coming out when I play it. If I try and use .ogg format instead it tells me Chrome can't stream that format even though I have streaming turned off. Can anyone confirm if loading .mp3 files using www.audioClip actually works in WebGL? Currently building with Unity5.3.1f1
how are you loading the mp3 ? You should build it into an asset bundle, which then you download at run-time from the server.
Oh right that's a pain I have about 1000 clips, and I load them as required, I don't want to load them all at once. Currently all built using ffmpeg. Which works fine for the Webplayer.
Ah wait it is playing, just at a very very low volume... If I crank the volume up to 100% on my laptop I can hear it fine, I just get deafened by the Windows alerts I'll have to see if I can control the volume dependent on platform.
In a quick test in Firefox and Chrome I would say the volume is about 1/10th that of the webplayer by default. Further testing required. At least it is playing... It's not a direct comparison as the webplayer version was built in 4.3 and the WebGl one is 5.3 so I'm not sure what else might have changed.
In case it helps, I use audio with WebGL using AudioClips for my demos. Works fine, volume is normal, using 5.3.1f1.