0 users online. Create an account or sign in to join them.Users
Audio Playlist with Projekktor
This is an open discussion with 3 replies, filed under XSLT.
Search
It appears that Projekktor reads playlists as a separate JSON file (example on the Projekktor site). Just add another page and create that JSON-schema using XSLT.
Thank you phoque. I've created a json page in Symphony. The problem I've got at the moment is that Symphony adds a commented events tag to my json file although I'm using the Content Type Mappings extension, I've added the "json" => "application/type" line to my config.php file and I've identified the page in the page settings in the backend as a json type page. I don't know what I'm doing wrong.
I've noticed that Symphony adds the events tag to all html pages that it outputs as well. Could it be a bug in symphony or am I not writing the page template correctly?
Here is a link to a json page.
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output output="text" omit-xml-declaration="yes" />
<xsl:template match="data">
<xsl:text>{"playlist":[</xsl:text>
<xsl:apply-templates select="samples/entry"/>
<xsl:text>]}</xsl:text>
</xsl:template>
<xsl:template match="samples/entry">
<xsl:text>{"0":{"src": "</xsl:text>
<xsl:value-of select="$workspace"/>
<xsl:value-of select="upload/@path"/>
<xsl:text>/</xsl:text>
<xsl:value-of select="upload/filename"/>
<xsl:text>", "type": "audio/mp3"}, "config":{"title":"</xsl:text>
<xsl:value-of select="caption"/>
<xsl:text>"}}</xsl:text>
<xsl:if test="position() != last()">
<xsl:text>, </xsl:text>
</xsl:if>
</xsl:template>
</xsl:stylesheet>
Create an account or sign in to comment.
Hi,
I'm trying to include a non-flash audio playlist on a website powered by Symphony CMS. I'm using projekktor Has anybody tried something similar?
Here is the website I'm trying to do this for: adam baker