Dond RSS Feed

RSS Feed

DonD’s WebPlus Demo site

DonD 2012© No Rights Reserved

Page last updated 25/01/2012 10:24:02

Produced with

Site Feedback

Search

Intro 3rd Party X5 WP/X2/X4 Topical Demo's Forum Contact Downloads sitemap

MediaPlayer with .xml playlist


If want to be able to use a playlist of FLV or MP3 files you will have to make a .xml playlist.

Before you do anything else download the JW MediaPlayer, if you have not already, from here onto your PC and unzip the file into a folder on your desktop.


Download this trial playlist, to use as a template, from my server here or copy the text from here and open notepad and paste in and save as playlist.xml


You will notice that the <location> address is an absolute written address. This does prevent confusion for the mediaplayer.swf in finding the files. But if everything is in the same folder, site html page, mediaplayer.swf, playlist.xml and the media files, just the file name will work i.e. <location>Intro.mp3</location>. If after putting in just the file names it does not work, will only work when it’s been uploaded, return using absolute addresses.


Due to security restrictions, Flash can only import XML files if they reside on the same domain as the SWF file. Up untill now, with the single flv & mp3 demos, we have been using the mediaplayer.swf linked from JW’s site but now you will have to use one that is on your server.


To use a playlist we have to upload the following from the mediaplayer.zip onto your server.


1. player.swf

2. playlist.xml


If you look at the code below both the player.swf & playlist.xml are on the same domain name but in different folders. You can have them in the same folder as each other to make life easier. They must reside on the same server for security.


Copy this code below into WebPlus to try.


<embed

src="http://www.dond.ulmb.com/jwtest/player.swf"

width="450"

height="150"

allowscriptaccess="always"

allowfullscreen="true"  flashvars="file=http://www.dond.ulmb.com/jwtest/playlist3.xml&playlist=right&playlistsize=220"

/>


If you look through the wizard “flvplayer with a rss playlist” you will find all the options to change its looks and behaviour. Don’t forget to press the “update preview & code” button before previewing again.


When using the “mediaplayer with a playlist of MP3’s, displayed at the right” setup you have the option to put any artwork for the MP3’s into the small screen next to the song titles. To do this, apart from having the artwork uploaded as well as the mediaplayer.swf etc. a link to it in the playlist.xml has to be included. Note - Upload all to your host before you can view the player working.


As an example:-


<track>

<title>Sgt. Pepper(mp3)</title>

<creator>Beatles</creator>

<location>http://www.dgdown.plus.com/mediaplayer/Sgt. Pepper's.mp3</location>

</track>


Would change to this if I had a .jpg file with the name thebeatles.jpg uploaded to the mediaplayer folder


<track>

<title>Sgt. Pepper(mp3)</title>

<creator>Beatles</creator>

<location>http://www.dgdown.plus.com/mediaplayer/Sgt. Pepper's.mp3</location>

<image>http://www.dgdown.plus.com/mediaplayer/thebeatles.jpg</image>

</track>

.xml Playlist

You can mix and match the file formats within a playlist. When using the wizard for this select to use “mediaplayer with a playlist of FLV’s” as this will show a video when selected and also play the MP3’s.

Top

JW Mediaplayer

3/6

Player demo's Single MP3's

3/6

Player demo's Single MP3's