How do you make the XML playlist?!

This thread may refer to an older version of JW Player! Check our articles for the most up-to-date information.
This Q&A thread was imported from our previous system and could apply to an older product.
  • I seem to have tried everything in creating my own XML playlist to play multiple videos, but it just never works and I just dont get it anymore. This is the structure I'm using for the XML file:

    bc.. <playlist version="1">
    <title>XSPF Example Playlist</title>
    <info>http:/xspf.org/xspf-v1.html</info>

    <trackList>

    <track>
    <title>Test video 1</title>
    <location>http://www.mysite.com/test.flv</location>
    <info>http://www.mysite.com/test.flv</info>
    </track>

    <track>
    <title>Test Video 2</title>
    <location>http://www.mysite.com/test.flv</location>
    <info>http://www.mysite.com/test.flv</info>
    </track>

    </trackList>
    </playlist>


    -------------

    When I run it, it will create the box, but no video loads and no sidebar items show, even though the FLVs and XML file are in the right place and being referenced. (of course I put "mysite.com" in there just for example). In looking at that code, do you know what is causing it to not work? Thanks

  • Your playlist looks OK. The best way to test playlists and the availability of media files is to copy & paste the URIs into your browser and see if you get a valid XML file (most browsers will validate the XML to varying degrees) and see if you can download the media files.

    http://www.mysite.com/playlist.xml
    http://www.mysite.com/test.flv

    Also, the *mediaplayer.swf* and the *playlist.xml* must come from the exact same domain. It's hard to tell if you are doing that without seeing your player code or a link to your page.

    Up Down 0 rated
  • Ajax: thanks for your tip...that took a step toward solving the problem. This is the error that showed up:

    XML Parsing Error: not well-formed
    Line Number 1, Column 1:{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fswiss\fcharset0 Arial;}}
    ^

    It's having a problem with that file from xspf.org...however, that's the URL that was in the example XML page from here: http://www.jeroenwijering.com/?item=Supported_Playlists

    Up Down 0 rated
  • You don't need that info element, try this for the headers of your XML file:bc.. <?xml version='1.0' encoding='UTF-8'?>
    <playlist version="1" xmlns="http://xspf.org/ns/0/">
    <trackList>
    <track>
    .....your tracks and closing tags go here.....

    Up Down 0 rated
  • You have to use a real text editor, not a text processor like "Word". The best choise is vi o textwrangler.

    http://familientagebuch.de/rainer

    Up Down 0 rated
  • Thanks, I got it to work now :D

    Up Down 0 rated
  • I thought I was having the same issue as Mark N, but my XML is well formed and created in TextWrangler.

    If I change the location of the .swf source from: http://www.jeroenwijering.com/embed/mediaplayer.swf to where it resides on my domain, I can no longer use my playlist. Nothing loads into the player or the playlist area.

    If I keep the mediaplayer.swf source to where it resides on my domain and switch to loading the demo flv, or one of the videos that are in my playlist, all works well.

    If I keep the source at http://www.jeroenwijering.com/embed/mediaplayer.swf everything works fine.

    Any ideas what could cause this?

    Up Down 0 rated
  • The server I am using is running IIS6 on Windows 2003. If that helps...

    I have also added the crossdomain.xml file to the root of my web directory (which is why the http://www.jeroenwijering.com/embed/mediaplayer.swf works)

    Up Down 0 rated
  • Flash security restrictions require that all XML files come from the EXACT same domain as the SWF file unless there is a crossdomain file on the server that is serving the XML file. Media files can come from anywhere except under normal circumstances online player=online files and offline player=offline files.

    Also there are some differences in the way Flash references media files, except FLVs, relative to the location of the HTML containing the SWF. More detailed explanations on Jeroen's tutorial pages.

    Up Down 0 rated
  • The XML file and the SWF file are coming from the EXACT same domain... and not working...

    Up Down 0 rated
  • I moved the files from the Windows 2003 server machine to my Mac running Leopard and changed the domain of the XML and the SWF file and everything worked fine.

    It seems that this is some sort of Windows issue, but that does not really get me much closer to a solution.

    Up Down 0 rated
  • Two hours later, everything is working, and I changed nothing...

    Up Down 0 rated
  • When the mediaplayer.swf and playlist.xml files were on your Windows server, were you able to load them into your browser?

    In other words, did http://domain/path/mediaplayer.swf and http://domain/path/playlist.xml load OK?

    The common IIS issue is only with the mime-type of the FLV files, not with SWF or XML files.

    Up Down 0 rated
  • Yes, they would load fine. Weird stuff.

    Up Down 0 rated
  • how can i make the player play the xml in order?
    becase it keeps skipping aroud and dosnt start on part 1

    <?xml version='1.0' encoding='UTF-8'?>
    <playlist version='1' xmlns='http://xspf.org/ns/0/'>
    <trackList>
    <track>
    <title>Part 1</title>
    <location>rtmp://flv.world.mii-streaming.net/motion/flash</location>
    <identifier>production/4410271-1acb045411c83a84-flv</identifier>
    </track>
    <track>
    <title>Part 2</title>
    <location>rtmp://flv.world.mii-streaming.net/motion/flash</location>
    <identifier>production/4400391-d5c0ce5c5c189f86-flv</identifier>
    </track>
    <track>
    <title>Part 3</title>
    <location>rtmp://flv.world.mii-streaming.net/motion/flash</location>
    <identifier>production/4400371-bd6cda9411e228ca-flv</identifier>
    </track>
    <track>
    <title>Part 4</title>
    <location>http://content.movies.myspace.com/0020672/78/96/2067206987.flv</location>
    </track>
    </trackList>
    </playlist>

    Up Down 0 rated
  • thanks frend

    Up Down 0 rated
  • Hi, I have been having trouble getting my playlist to load and I think I need some more specific help (from anyone who has the patience). I have never done this before but the xspf player is showing up in my website where I want it to but the "loading playlist" text never actually loads. Here is the code I'm using. Please pardon my lack of experience but, can I simply create this file in Dreamweaver and save as xspf? Could someone walk me through the WHOLE process of setting this up? Thanks so much for any help.

    <?xml version='1.0' encoding='UTF-8'?>
    <playlist version="1" xmlns="http://xspf.org/ns/0/">
    <trackList>

    <track>
    <title>name -title<title>
    <location>http://www.fractamodi.com/audio/platonewebclip.mp3</location>
    <image>http://www.fractamodi.com/images/stairs.jpg</image>
    <annotation>name -title</annotation>
    </track>

    <track>
    <location>http://www.example.com/folder/song2.mp3</location>
    <image>http://www.example.com/folder/album2.jpg</image>
    <annotation>Name of Track 2</annotation>
    </track>

    </trackList>
    </playlist>




    Up Down 0 rated
  • @Stuck - use any plain text or code editor like *notepad* on windows - save as playlist.*xml*
    make sure whichever program you use, doesnt append its own filetype extension - in notepad select the filetype "All files"

    Up Down 0 rated
  • Can XML playlists play .mov files?

    If so... why doesn't this work?

    <playlist version="1" xmlns="http://xspf.org/ns/0/">
    <trackList>

    <track>
    <title>Track 1</title>
    <creator></creator>
    <location>1.mov</location>
    <info></info>
    </track>

    <track>
    <title>Track 2</title>
    <creator></creator>
    <location>2.mov</location>
    <info></info>
    </track>

    </trackList>
    </playlist>

    Up Down 0 rated
  • @ loonylondonlad

    I have been trying to get .MOV files to play also.

    I can see my images in the actual playlist, but none of the files will play.

    I ended up going back to a prior version of the player v 3.13 and .MOV files worked without any problems.

    Is anyone else seeing these kind of problems with .MOV files?

    Up Down 0 rated
  • I also wasn't able to get .MP4 files to work either, are you guys aware of this?

    Up Down 0 rated
  • jghjg

    Up Down 0 rated
  • how can get <playlist version="1" xmlns="http://xspf.org/ns/0/"> from database when gerated xml file

    Up Down 0 rated
  • I have a problem. I need to play a little intro, before main movie. How can i do this with xml?

    Up Down 0 rated
  • @Avatar,

    Make a playlist, use the playlist as the *file* flashvar value.

    See the supported playlist formats here: *http://code.longtailvideo.com/trac/* The XSPF format is the simplest and easiest to use.

    Up Down 0 rated
  • bc..
    ssafdbc..

    Up Down 0 rated
  • Yo guys, I'm an co owner of my friend's forums, but i have no clue how to make a playlist on it, if u guys can tell me the steps i would love that, thanks...peace.

    Up Down 0 rated
  • how to play the .flv files in sequence in xml file using .swf player

    Up Down 0 rated
  • Yes, I am also completely baffled as to how to make a video playlist from scratch.
    I get that you need to use an xml but its the AS code in Flash that I can't work out, and there don't seem to be any easy tutorials anywhere.
    Argh!

    Up Down 0 rated
  • ay wats up dude

    Up Down 0 rated
  • ay dude you are very cool!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

    Up Down 0 rated
  • faget bitch ass nigga you are a pussy and who ever is reading this YOU ARE A FAGET BITCH

    Up Down 0 rated
  • Hello
    **stuck**
    Is it possible to add a target like "iframe" to a <info>urlhere</info> playlist?

    I tried everything but can't get it going.

    I need the Iframe for the page to open in a "light-box"!?

    Thanks a lot

    Up Down 0 rated
  • Use the javascript pseudoprotocol to call a JavaScript function.
    bc.. <info>javascript:someFunction(obj)</info>




    Then within that function, you can do whatever you need to do.

    Up Down 0 rated
  • Hi Snake

    Thanks for your reply.
    I tried ...

    I have an XML flash with 4 slides. When clicking on a slide I'd like to have the page open in a lightbox (colorbox) and this is one part of my XML 1.0 file

    <track>
    <title>Take a quick survey</title>
    <creator>my name</creator>
    <location>images/file</location>
    <info>javascript:onclick="window.open('myURLpath');return false;" class="iframe"</info>

    HOWEVER, it just doesn't do anything. Only this works ...
    <info>myURLpath</info>
    opening the link in a normal page, but.

    Am truly lost here ...

    Thanks a lo

    Up Down 0 rated
  • how to put mp3 song duration

    Up Down 0 rated
  • You set the duration flashvar to do this.

     
    Up Down 0 rated
  • bc.. so.addVariable('shuffle', 'false');
    orbc.. &shuffle=false

    Up Down 0 rated
  • how can i insert multipul files in to the .xml file in one go i have thousends of files to put into the .xml file?

    Up Down 0 rated
  • You are going to have to do this manually.

     
    Up Down 0 rated
  • http://www.longtailvideo.com/support/jw-player/jw-player-for-flash-v5/24/creating-a-playlist

     
    Up Down 0 rated

This QA is closed.

Still don't have JW Player? Get It Here