Get title from mp3 stream

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Get title from mp3 stream

agm65
Hi all,

i want to get the tile of the songs playing on mp3 stream:
it seems that the onID3InfoReceived is not fired, any ideas how to get the
titles?


private var req:URLRequest;
private var context:SoundLoaderContext = new SoundLoaderContext(8000);
private var s:Sound;
private var channel:SoundChannel = new SoundChannel();

req = new
URLRequest("https://swr-swr3-live.sslcast.addradio.de/swr/swr3/live/mp3/128/stream.mp3");
s = new Sound(req, context);
s.addEventListener(Event.ID3, onID3InfoReceived);
s.addEventListener(Event.COMPLETE, completeHandler);
channel = s.play();

protected function onID3InfoReceived(event:Event):void {
var id3:ID3Info = event.target.id3;
trace("Received ID3 Info:");
for (var propName:String in id3)
{
trace(propName + " = " + id3[propName]);
}
}

thx for help!

 



--
Sent from: http://apache-flex-users.2333346.n4.nabble.com/
Reply | Threaded
Open this post in threaded view
|

Re: Get title from mp3 stream

leokan23
I am building a similar app and I have similar problems :)

You should check if the stream you are using has the ID3 info (v1 or v2).

In my case, it didn't so we used an external .xml feed with information
about the artist, artwork, title, etc.



--
Sent from: http://apache-flex-users.2333346.n4.nabble.com/
Reply | Threaded
Open this post in threaded view
|

Re: Get title from mp3 stream

agm65
Thx for your answer.

I do the same right now. Get the data from an api.
But i'll check the stream.

Thx alot!
 




--
Sent from: http://apache-flex-users.2333346.n4.nabble.com/
Reply | Threaded
Open this post in threaded view
|

Re: Get title from mp3 stream

leokan23
It looks like I have the same issue. Although my stream comes with the info,
the ID3 event is never triggered.



--
Sent from: http://apache-flex-users.2333346.n4.nabble.com/
Reply | Threaded
Open this post in threaded view
|

Re: Get title from mp3 stream

leokan23
After some research, Radio Streams don't use ID3 so this is why there is no
trigger.

Depending on their server (icecast or shoutcast) they use a different type
of metadata.



--
Sent from: http://apache-flex-users.2333346.n4.nabble.com/