Eric Princen
2006-Sep-13 14:15 UTC
[Icecast] Access for scripting??? Displaying play history
Hey there, I'm looking into setting up a station using icecast, and I need a basic functionality of being able to have my site know what has been played recently, what is playing now, and perhaps even what is coming up (which is very optional.) I have not found a way to do this in my searches. Perhaps I've been searching for the wrong thing. If there are any script snippets or an API available, I'd love to check it out. An example would be what is displayed on the top right of the following page: http://www.radioparadise.com/ Thanks, -Eric ;-)
David Baelde
2006-Sep-13 17:37 UTC
[Icecast] Access for scripting??? Displaying play history
Hi, I'm not sure about what you can get from icecast. There is a textual version of status.xsl (is it status2.xsl) which can be parsed by javascript: you setup an XMLHTTPRequest in ascii mode, get the file, parse it, display the song info on your page. Now if you want the last ten songs somewhere, or more information than just the usual metadata, I think you need cooperation from the stream client. The streamer could update an XML description of whatever you need, and you would then parse it using javascript from your webpage -- this time it's real AJAX. Dolebra? uses the liquidsoap streamer (http://savonet.sf.net/wiki/Liquidsoap) to do that. The XML is <http://dolebrai.net/~dbaelde/last.xml>, it is parsed periodically from every page to get the current song info (on the top left in <http://dolebrai.net>), and more info from this XML is displayed on the playlist page <http://dolebrai.net/playlist>. Feel free to ask if you need more description about this solution. Cheers. -- David