Hey!
I am trying to load external mp3 file when using WebGL I am getting:
Streaming of 'mp3' on this platform is not supported
Here is the code:
IEnumerator LoadAudio()
{
WWW www = new WWW ("file://"+audioPath);
yield return www;
if (string.IsNullOrEmpty (www.error)) {
audioSource.clip = www.GetAudioClipCompressed (false, AudioType.MPEG);
audioSource.Play ();
} else {
Debug.LogError (www.error);
}
}
I am totally fine with not streaming it, can read the whole thing before playing.
Any pointers?
Thanks!
↧