XML driven FLV Player by eckert


You may have checked out THIS FIX to getting an FLV on your site, but now you want to pull data from an XML file.  Why would you want to do this?  Perhaps you want to add pre- or post-roll commercials with your video.  Maybe you want more than one video to play.

Remember to get the flvplayer.swf first.

Here’s the embed code -

<embed src="http://yourdomain.com/flvplayer.swf" width="480" height="360" allowscriptaccess="always" allowfullscreen="true" flashvars="height=360&width=480&file=http://yourdomain.com/yourplaylist.xml&displaywidth=480&autostart=false&shuffle=false&playlist=false&scroll=true" />

Once again, you can modify any of the variables (height, width, autostart).  I have the display set so that it will hide the playlist.

Now for the xml playlist, you need to have your XML file and your FLV’s in the same folder.  The XML needs to be formatted like this -

<?xml version='1.0' encoding='UTF-8'?>
<playlist version='1' xmlns='http://xspf.org/ns/0/'>
<trackList>
<track>
<location>http://yourdomain.com/folder/video1.flv</location>
</track>
<track>
<location>http://yourdomain.com/folder/video2.flv</location>
</track>
<track>
<location>http://yourdomain.com/folder/video3.flv</location>
</track>
</trackList>
</playlist>

You can have as many or as few “tracks” as you’d like.  Just modify the XML to reflect that.

Tags: , , , , , , ,

5 Responses to “XML driven FLV Player”

  1. patrick Says:

    not working .. video play but no image display

  2. Randy Says:

    I get it to auto-play but then it stops after the first video and when I click play again it plays the same video again. I can hit fast forward to skip to the next video, but I would like for it to be an auto-transition… What am I doing wrong?

  3. eckert Says:

    that’s interesting, I have not had the same problem before. if i am able to reproduce it, I’ll let you know.

  4. Francesca Webb Says:

    the best video player that i use is none other than VLC Player, it is free and i think it is open source too~,;

  5. Bogdan Says:

    not working !

Leave a Reply


It’s Called Web Design is sponsored by Seeing Interactive and powered by WordPress
Entries (RSS) and Comments (RSS).
53 queries. 0.265 seconds.