Hi,
I have implemented an xml based flash media player (could also do with video) using the xspf (XML Shareable Playlist Format) standard. I have a template with a Macro that generates (via an xslt file) a compliant file listing all the relevant media content. The player loads the playlist by linking to the url (e.g. playlist.aspx).
You can then pass on a query string from your hyperlinks the file info to play. This can be generated in the xslt.
I also add the XSPF Plylist as an individual Document Type
player
http://musicplayer.sourceforge.net/XSPF Schema
http://www.xspf.org/schema/Example Template to Load Macro
Code:<?xml version="1.0" encoding="UTF-8"?>
<playlist version="1" xmlns="http://xspf.org/ns/0/">
<trackList>
<?UMBRACO_MACRO macroAlias="XSPFPlaylistGen" domain="http://localhost/umbraco_stmutants"></?UMBRACO_MACRO>
</trackList>
</playlist>
Example Macro XSLT
Code:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE xsl:Stylesheet [ <!ENTITY nbsp " "> ]>
<xsl:stylesheet
version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:msxml="urn:schemas-microsoft-com:xslt"
xmlns:umbraco.library="urn:umbraco.library"
exclude-result-prefixes="msxml umbraco.library">
<xsl:output method="xml" omit-xml-declaration="yes"/>
<xsl:param name="currentPage"/>
<xsl:variable name="domain" select="/macro/domain"/>
<xsl:variable name="catType" select="$currentPage/ancestor-or-self::node [@nodeTypeAlias = 'wwMusic']/node"/>
<xsl:template match="/">
<!-- Generate XML doc for track list player -->
<xsl:for-each select="$catType">
<xsl:sort select="./data [@alias = 'relDate']" order="descending"/>
<xsl:if test="string(data [@alias='umbracoNaviHide']) != '1'">
<track>
<location><xsl:value-of select="$domain"/><xsl:value-of select="umbraco.library:GetMedia(./data [@alias ='audioFile'],0)/data [@alias = 'umbracoFile']"/></location>
<!-- name of the song -->
<title><xsl:value-of select="@nodeName"/></title>
</track>
</xsl:if>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>