Answer the question
In order to leave comments, you need to log in
How to stream mp3?
I have been facing this for a long time and I can’t seem to get out of this situation, what should I do?
Streaming of 'mp3' on this platform is not supported
UnityEngine.WWW:GetAudioClip(Boolean, Boolean, AudioType)
c__Iterator0:MoveNext() (at Assets/Scripts/MusicPlayer/MusicPlayer.cs:192)
IEnumerator DownloadAndPlay(Track trackOb, int index)
{
nameLabel.text = trackOb.name;
if (StaticSettings.language == 2f)
statusLabel.text = "Buffering...";
else
statusLabel.text = "Буферизация...";
www = new WWW(trackOb.url);
while (!www.isDone)
{
yield return new WaitForEndOfFrame();
}
if (trackOb.format == "wav")
source.clip = www.GetAudioClip(false, true, AudioType.WAV);
else if (trackOb.format == "ogg")
source.clip = www.GetAudioClip(false, true, AudioType.OGGVORBIS);
else if (trackOb.format == "mp3")
source.clip = www.GetAudioClip(false, true, AudioType.MPEG);
source.clip.name = trackOb.name;
source.time = 0f;
sldSeek.value = 0f;
source.Play();
if (StaticSettings.language == 2f)
statusLabel.text = "Playing...";
else
statusLabel.text = "Проигрывается...";
isPaused = false;
next = true;
playlistTracks[index].duration = source.clip.length;
StartCoroutine(PlayerUpd());
DrawDisplay();
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question