Hello guys, i’m new here, but i follow brackeys channel long time, so, near to the topic, i have a problem and as title says, i can’t play mp3 files on android from local device. I tried to use NAudio to play this and even converted mp3 to wav but with no succes, it’s just playing on Windows. I tried unity forum but seems no one is trying to help me, so i’m appealing to you guys, please, i really need this for my project. Code is:
IEnumerator PlayThis(string url) { WWW www = new WWW(url); yield return www; AudioSource audio = GetComponent(); audio.clip = NAudioPlayer.FromMp3Data (www.bytes); audio.Play(); }
starting coroutine is something like this : “StartCoroutine(PlayThis(“file://”+_curMusicPaths[i]));“, and cuMusicPaths i’m getting from DirectoryInfo and it’s FullName(full link)