[icecast] how to get "now playing"

Thomas B. Ruecker, DM8TBR dm8tbr at afthd.tu-darmstadt.de
Wed Feb 11 07:58:06 UTC 2004



Hi

> i'd like to incorporate a "now playing" section on my
> web page (links to the icecast2 server)
nice idea. ;)
 
> i'm guessing i have to get the <xsl:value-of
> select="artist" /> and <xsl:value-of select="title" />
> tags from the status.xsl file.  not sure what else
> needs to be coded into the index.html file to get this
> info.
Correct guess.
My xslt-sheet looks like this:

<xsl:stylesheet xmlns:xsl = "http://www.w3.org/1999/XSL/Transform" version = "1.0" >
<xsl:output method="text" indent="yes" />
<xsl:template match = "/icestats" >
<xsl:for-each select="source">
<xsl:if test="@mount='/test.ogg'">
<xsl:value-of select="artist" /> - <xsl:value-of select="title" />
</xsl:if>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>

This (text/plain) page containing only one line of text is then read by an flash-applet & included by a php-page.

You could of course place an frame/i-frame in your index.html to have the users browser make the "lookup". Then you need to make the output method "html" and make some nice formatting that suits your needs.

Regards

Thomas

--- >8 ----
List archives:  http://www.xiph.org/archives/
icecast project homepage: http://www.icecast.org/
To unsubscribe from this list, send a message to 'icecast-request at xiph.org'
containing only the word 'unsubscribe' in the body.  No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.



More information about the Icecast mailing list