Search code examples
jqueryxmljsonrssflowplayer

Flowplayer RSS-Playlist media:content tag


I am using Flowplayer 3.2.5 (javascript is 3.2.4) with the playlist-plugin, and having some trouble using the playlist template-system. Basically, Flowplayer access a rss-feed, and gets something like this:

<rss version="2.0" xmlns:media="http://search.yahoo.com/mrss/">
    <channel>
        <title>Desemberkonsert</title>
        <description>MangerDVD 09/10</description>
        <item>
            <title>In This Place</title>
            <link>desemberkonsert_in-this-place</link>
            <description>Excalibur</description>
            <pubDate>Mandag, 17. mai 2010 19:08:00 GMT+1</pubDate>
            <media:content url="../flv/desemberkonsert/21_in_this_place.flv" duration="339,96" />
            <media:thumbnail url="../flv/desemberkonsert/21_in_this_place.png" width="512" height="288" />
        </item>
    </channel>
</rss>

And the Flowplayer playlist template works like this:

<a href="${url}" title="${link}">
<h4>${title}</h4>
<h5>${description}</h5>
<img alt="thumbnail" src="${thumbnail}" class="thumbnail">
<p class="infobox">${time}</p>
</a>

Which tells it that ${title} corresponds to <title>, ${description} to <description> etc. However, how would I return the url from ? Regularly, this is done properly and automatically when using rss-feeds, but since I am using the controlbar-plugin, I use "jQuery xml2json" (http://www.fyneworks.com/jquery/xml-to-json/) to get the rss-info into a json object, and access that as the playlist.

And when used in the template system, this returns just ${time} instead of the parsed value of that I would get when using the regular rss-playlist.

Could anyone offer some insight on how to remedy this?


Solution

  • Could not find a suitable solution that were inherently available from Flowplayer to do this, so I ended up converting the XML to JSON, and using that as the playlist instead.