Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2010-01-31 14:38:04

joel
Member
Registered: 2004-11-26
Posts: 162

Integration of JW player and XML playlists

Hi!

I want to integrate JW Player for audio playback on a project. I also would like a playlist served via XML from a specific files-category.

I’ve looked around but I didn’t find the right info anywhere. Could someone please point me in the right direction? Which plugins do I need etc.?

Thanks! :)

Offline

#2 2010-01-31 16:31:46

Gocom
Developer Emeritus
From: Helsinki, Finland
Registered: 2006-07-14
Posts: 4,533
Website

Re: Integration of JW player and XML playlists

I would go with rah_external_output and make it to generate a simple XML playlist file.

With the plugin, I could create a new (text/xml) snippet that would list the files. Code might look something like:

<?xml version="1.0" encoding="UTF-8"?>
<playlist xmlns="http://xspf.org/ns/0/" version="1">
<trackList>
	<txp:file_download_list category="MyCategoryHere">
		<track>
			<location>/MyFileLocation/path/to/<txp:file_download_name /></location>
		</track>
	</txp:file_download_list>
</trackList>
</playlist>

Note: It’s just an example. Use a XML template that you want and works for you and your player.

After that, the XML playist goes into the JW player with flasvars:

s1.addVariable("file","<txp:site_url />?rah_external_output=MyPlaylistSnippetName");

More info and resources:

Offline

#3 2010-02-04 14:31:58

mrtunes
Member
From: Toronto, On
Registered: 2007-03-12
Posts: 575
Website

Re: Integration of JW player and XML playlists

there is also mg setheader but rah_external_output looks a bit cleaner cause you don’t have to use pages to create your xml file it seems.

Offline

#4 2010-02-08 17:42:57

joel
Member
Registered: 2004-11-26
Posts: 162

Re: Integration of JW player and XML playlists

Thanks a lot! You guys really saved the day for me!!! :)

Offline

#5 2010-05-20 19:30:41

miles
Member
From: Plymouth
Registered: 2008-05-22
Posts: 78
Website

Re: Integration of JW player and XML playlists

Legend. Thank you

Offline

Board footer

Powered by FluxBB