Order Now AdSolution Sign Up | Login » Bits on the Run Sign Up | Login »

Forums

/

XML Playlist not playing

18 replies [Last post]

Hi:

I downloaded the player and used the sample code from the setup wizard to play an XML playlist. I copied the code and published and everything is fine - the blip.tv xml is playing. Now I put a link to my xml and it does not play. So of course you say something is wrong with my xml file, right? Wrong - it plays just fine in my own SWF player which is a just a basic player copied from http://library.creativecow.net/articles/brimelow_lee/video_playlist.php

So, any suggestions on what could be wrong? Here is my HTML source
<body>
<embed
src="http://www.jeroenwijering.com/embed/mediaplayer.swf"
width="470"
height="300"
allowscriptaccess="always"
allowfullscreen="true"
flashvars="width=470&height=300&file=http://www.TeeWhee.com/Channels/Comedy.xml"
/>
</body>
</html>

and here is the playlist
<?xml version="1.0" encoding="iso-8859-1"?>
<video>
<video url="http://www.youtube.com/get_video?video_id=c3k3QgAP8dw&l=117&sk=ThotMNJc33bFlnRQoB6mSAC&fmt_map=&t=OEgsToPDskIvQYLBPadOTTztnyHtM8gc&hl=en&plid=AARJcVrD7g0PEpifAAAAoAAgYAE" desc="The World's funniest commerials" />
<video url="http://www.youtube.com/get_video?video_id=wuEcLjbUS1E&l=330&sk=uUDYGbbJgHX9xyi0oRn3RQC&fmt_map=&t=OEgsToPDskKGE-RZzrNgqZwdh_jsdeOV&hl=en&plid=AARJcVrI6eAyIhB6AAAAoAQoYAA" desc="Soccer Comedy" />
</video>

And yes, I update as needed when I am playing it so that the youtube URLs work

Thanx,
AG

Because of Adobe Flash Player security restrictions, the SWF and XML files must come from the EXACT same domain. Host the mediaplayer.swf on http://www.TeeWhee.com/ and your playlist will work.

I forgot to mention that I tried that as well (it did not work), although as I understand it that only applies to Mediafiles. Also, if that is true, how does this sample code work - it was generated by the site using the setup wizard. Here the xml file is on blip.tv and the player is on jeroenwijering.com

<embed
src="http://www.jeroenwijering.com/embed/mediaplayer.swf"
width="470"
height="300"
allowscriptaccess="always"
allowfullscreen="true"
flashvars="width=470&height=300&file=http://mirror.video.blip.tv/hot-shows.xml"
/>

You've got it kind of mixed up. The security restrictions only apply to data such as that from XML files. The media files can come from anywhere.

The Blip TV playlist works because they have a crossdomain policy file on their site at:

http://mirror.video.blip.tv/crossdomain.xml

that looks like this:

<cross-domain-policy>
  <allow-access-from domain="*" />
</cross-domain-policy>

More information here: [url=http://kb.adobe.com/selfservice/viewContent.do?externalId=tn_14213]External data not accessible outside a Flash movie's domain[/url] and many, many other places on Adobe's web site.

Thanx for your help.

OK, I tried Blip TV's xml and the JWL player on my server and they work fine. So, maybe it is my XML file. Is there a recommended structure for the XML file? I found plenty of generators here and maybe I will try one of them, but nowhere have I found a sample or a description of an XML file. Is the file above correct or do you see something wrong?

Also, where does the crossdomain policy file go - in the root of my domain? How does the flash player know where to look for it?

Thanx again,
AG

please see the [url=http://www.jeroenwijering.com/?item=Supported_Playlists]Supported Playlists[/url] page...

Thanx for your help. I have looked at those till I was blue in the face, but no help. What *is* an ideal playlist format. Obviously the playlist format matters because I am getting different results from different formats using the same content links. For example, both of these are correct depending on where you look:
********************************************************
<?xml version='1.0' encoding='UTF-8'?>
<playlist version='1' xmlns='http://xspf.org/ns/0/'>
<trackList>
<track>
<creator>Anil</creator>
<title>Video 1</title>
<location>http://www.youtube.com/get_video?video_id=W1QvEyLDQuU&l=344&sk=2CHJ1yuaigrnFHusvEBstQU&t=OEgsToPDskK...</location>
<image>http://www.TeeWhee.com/files/hero.jpg</image>
<info>http://www.TeeWhee.com/</info>
</track>
<track>
<creator>Anil</creator>
<title>Song 1</title>
<location>http://www.youtube.com/get_video?video_id=c3k3QgAP8dw&l=117&sk=ThotMNJc33bFlnRQoB6mSAC&fmt_map=&t=OE...</location>
</track>
</trackList>
</playlist>
********************************************************
<?xml version="1.0" encoding="iso-8859-1"?>
<video>
<video url="http://www.youtube.com/get_video?video_id=c3k3QgAP8dw&sw=0.05&l=117&sk=Vbwuva7yD4FYtUyb_tadZgC&fmt_map=&t=OEgsToPDskI7tjGQiJgZOLAy-hm-fTDp&hl=en&plid=AARJeRu7bTBhRozRAAAAoAAgYAE" desc="The World's funniest commerials" />
<video url="http://www.youtube.com/get_video?video_id=wuEcLjbUS1E&l=330&sk=3ZTfm_WhnvAg8o3rKoC7cgC&fmt_map=&t=OEgsToPDskI_2k2_BcIOPM4mmqwC_akU&hl=en&plid=AARJeRu_v9eVjA8YAAAAoAQoYAA" desc="Soccer Comedy" />
</video>
********************************************************

So all I am asking is that since the player is obviously expecting a certain format to the playlist, why doesn't the author publish a sample format? Like a couple of sample files that are guaranteed to work - a simple and a complex example. Or point to a place on the web where it is documented such as w3.org

Thanx,
AG

The sample playlist files are linked here: [url=http://www.jeroenwijering.com/?item=Supported_Playlists]SUPPORTED PLAYLISTS[/url]. In case you can't find it, the link for the XSPF format is: [url=http://www.jeroenwijering.com/upload/xspf_example.xml]XSPF example[/url]

The link to the XSPF playlist standards organization is in the second line of the playlists that you have posted above. In case you can't find it, it is: [url=http://xspf.org]XSPF Org.[/url]

OK, looks like it works. I discovered the real problem though :-) It does not play YouTube URLs, at least in the format I have shown above. I also tried this format: http://www.youtube.com/get_video?video_id=Nc8AhymzcSk, based on a message in another thread and it still does not work. The funny thing is that it works fine in my player (which is a very basic player based on a tutorial I found on the web). Is there some special format for YouTube URLs (coincidentally you must be an expert in that area based on your name).

Basically, I use this URL http://www.youtube.com/watch?v=SJ_qK4g6ntM to get this URL http://www.youtube.com/get_video?video_id=SJ_qK4g6ntM&l=529&sk=tIIXMBwutfbF-FG3Jc32pAC&fmt_map=&t=OE... and I can play it in my player but not JWL. Is there some variable I have to set?

Thanx again.

Because the URI in the location element does not end in a recognized media extension (flv, jpg, mp3, etc.) you must tell the player what the media type is. In a playlist, you have to add the meta element, like this:<meta rel='type'>flv</meta> in every track that does not have a recognized media extension as the last three characters in the location element data. WOW! That's a load of crap! So here are a few examples of working YouTube tracks:

    <track>
  <creator>sniper22b</creator>
  <title>Piano Lesson With A Difference</title>
  <location>http://youtube-349.vo.llnwd.net/d1/03/7D/dYhhQhtrlFI.flv</location>
  <image>http://img.youtube.com/vi/dYhhQhtrlFI/2.jpg</image>
  <info>http://my.domain.com</info>
</track>
<track>
  <creator>MooseMouseMedia</creator>
  <title>Sexy Alien Cartoon Band</title>
  <location>http://youtube-133.vo.llnwd.net/d1/01/90/Mc-7YlBYWc4.flv</location>
  <image>http://img.youtube.com/vi/Mc-7YlBYWc4/2.jpg</image>
  <info>http://my.domain.com</info>
</track>
<track>
  <creator>capo420420</creator>
  <title>Charlotte North Carolina's Jeff Williams "Helpless"</title>
  <location>http://www.youtube.com/get_video.php?video_id=FELu606lidw&t=OEgsToPDskKAB8u6WisA9OPepRyxAWH7</location>
  <meta rel="type">flv</meta>
  <image>http://img.youtube.com/vi/FELu606lidw/2.jpg</image>
  <info>http://my.domain.com</info>
</track>
<track>
  <creator>John Butler Trio</creator>
  <title>Ocean</title>
  <location>http://www.youtube.com/get_video.php?video_id=6VAkOhXIsI0&t=OEgsToPDskIA6FcTe4-NAi40z3SZJNgj</location>
  <meta rel="type">flv</meta>
  <image>http://img.youtube.com/vi/6VAkOhXIsI0/2.jpg</image>
  <info>http://my.domain.com</info>
</track>

Notice that the image URI consists of: http://img.youtube.com/vi/ plus the YouTube jibberjabber 6VAkOhXIsI0 plus /2.jpg

Ah, thought as much! Anyway thanx for that huge tip. BTW, just my education in Flash/Adobe (and boy do I need it) is this an Adobe requirement or is it a JWL quirk? And this format:
<?xml version="1.0" encoding="iso-8859-1"?>
<video>
<video url="http://www.youtube.com/get_video?video_id=c3k3QgAP8dw&sw=0.05&l=117&sk=Vbwuva7yD4FYtUyb_tadZgC&fmt_map=&t=OEgsToPDskI7tjGQiJgZOLAy-hm-fTDp&hl=en&plid=AARJeRu7bTBhRozRAAAAoAAgYAE" desc="The World's funniest commerials" />
<video url="http://www.youtube.com/get_video?video_id=wuEcLjbUS1E&l=330&sk=3ZTfm_WhnvAg8o3rKoC7cgC&fmt_map=&t=OEgsToPDskI_2k2_BcIOPM4mmqwC_akU&hl=en&plid=AARJeRu_v9eVjA8YAAAAoAQoYAA" desc="Soccer Comedy" />
</video>
Isn't this an Adobe approved syntax for Playlists?

Thanx,
AG

Adobe has nothing at all to do with playlists. The format of supported playlists is up to the Flash programmer (Jeroen Wijering) to determine. The format can be something completely non-standard or, like Jeroen has done, several standard playlist formats are supported (XSPF, RSS, ASX).

C:\Documents and Settings\pc\My Documents\My Pictures

A simple, dumb once and for all question that i think you should post for noobies like me :)

So SWF and XML files must come from the EXACT same domain which means I cannot grab that xml file, modify it and uploaded it onto my server and call your swf file from your website to get it to work, right?

The only way it will work is if I buy it (for my business) and host both files onto my server, yes?

Yes, all data files (not media files) must come from the EXACT same domain as the SWF file. If you want to use a data file from another domain, you can put a cross domain policy file on the server hosting the data files. See: http://www.adobe.com/devnet/flashplayer/articles/cross_domain_policy.html and other Adobe documents for all of the gory details.

So, you could host your XML file on your server, put a cross domain policy file on your server and request the SWF from another domain.

There are also browser, cross domain JavaScript problems security restrictions to be aware of.

I'm sure my problem is a simple fix, as I'm new at this, but I need help! I downloaded the player and used the sample code from the setup wizard "media player with playlist of flv files". I copied the code and previewed in my browser and everything is fine - the blip.tv xml is playing. I downloaded Charlie Craig's XML Playlist Generator (http://www.iol.ie/~craigcharlie/blog/labels/Generate%20playlist.html) and followed his directions eventually replacing http://mirror.video.blip.tv/hot-shows.xml " with "playlist.xml" Within my website, I have a folder "video_clips" where video_clips.htm, playlist.xml, mediaplayer.swf, swfobject.js, and logo.png is. Also in that same folder is my subfolder "videos" where I have the 2 flv video files referenced in the playlist. (I have about 20 but am testing with only these two right now). As soon as I replaced the blip line with my playlist.xml nothing played in my preview browser! Here is a copy of my code:

LOCATED IN <HEAD> :
<script type="text/javascript" src="http://www.jeroenwijering.com/embed/swfobject.js"></script>

IN <BODY>:

<div id="player_div">
<embed
src="http://www.jeroenwijering.com/embed/player.swf"
width="600"
height="500"
allowscriptaccess="always"
allowfullscreen="true"
flashvars="height=500&width=600&file=playlist.xml&lightcolor=0x0000CC&screencolor=0x000000&logo=logo.png&displayheight=240&displaywidth=350&autoscroll=true"
/>

<script type="text/javascript">
var so = new SWFObject('http://www.jeroenwijering.com/embed/player.swf','mpl','600','500','8');
so.addParam('allowscriptaccess','always');
so.addParam('allowfullscreen','true');
so.addVariable('height','500');
so.addVariable('width','600');
so.addVariable('file','playlist.xml');
so.addVariable('lightcolor','0x0000CC');
so.addVariable('screencolor','0x000000');
so.addVariable('logo','logo.png');
so.addVariable('displayheight','240');
so.addVariable('displaywidth','350');
so.addVariable('autoscroll','true');
so.write('player');
</script>

</div>

The playlist generator produced this:

<?xml version="1.0" encoding="UTF-8" ?>
- <playlist version="1" xmlns="http://xspf.org/ns/0/">
<title>Your MP3 Playlist</title>
<info>http://YourWebpageHere/</info>
- <trackList>
- <track>
<title>Baruch_adonai.flv</title>
<location>videos/baruch_adonai.flv</location>
<info>http://www.google.com/search?hl=en&q=baruch_adonai</info>
</track>
- <track>
<title>Divin_in.flv</title>
<location>videos/divin_in.flv</location>
<info>http://www.google.com/search?hl=en&q=divin_in</info>
</track>
</trackList>
</playlist>

All the video clips I plan to use I have created with Final Cut Pro with the .mov extension. Transferring them to my PC, I've converted them to flv files because I believe that was recommended. I don't need a google link for these files. I would like a thumbnail image for each, the title, and a short description.
At this point, I haven't picked a web host - I'm busy building my site first - tho I do own a domain name. Is that causing problems in my code because I haven't replaced <info>http://YourWebpageHere/</info> ? How do I code for a thumbnail image and what size is recommended? Where can I add a brief description? Why is my logo.png not showing? HOW CAN I MAKE MY VIDEO CLIPS PLAY?

Thank you for any and all help... and for your patience with those of us who are trying ot learn.

See the previous post about the EXACT same domain Adobe Flash Player security restriction.
http://www.jeroenwijering.com/embed/player.swfand<strong><em>whatever</em></strong>/playlist.xmlare NOT the EXACT same domain.

You must download the JW FLV Media Player package, unzip it, and upload the mediaplayer.swf to your own site.

My problem is it only plays 1 video out of the two (more if possible)

here is the XML
<?xml version='2.0' encoding='UTF-8'?>
<playlist version='2' xmlns='http://xspf.org/ns/0/'>
<trackList>
<track>
<creator>Superhero Movies News</creator>
<title>Punisher:War Zone</title>
<location>http://www.fileden.com/files/2008/9/26/2116267/Official_Punisher__War_Zone_TV_Spot__3___quot_Clock_s...</location>
<image>http://i41.tinypic.com/zskd20.jpg</image>
<info>http://www.freewebs.com/superheromovies/index.htm/</info>
<title>The Spirit</title>
<location>http://www.fileden.com/files/2008/9/26/2116267/The_Spirit_TV_spot_-_Little_Action.flv</location>
<image>http://i44.tinypic.com/r10nj7.jpg</image>
<info>http://www.freewebs.com/superheromovies/index.htm</info>
</track>
</trackList>
</playlist>

 
Knight_Gambit,

I can see that you must have run out of track tags. Run over to your nearest tag store and grab a bag of tags; the assortment is the best value.

<?xml version='2.0' encoding='UTF-8'?>
<playlist version='2' xmlns='http://xspf.org/ns/0/'>
  <trackList>
    <track>
      <creator>Superhero Movies News</creator>
      <title>Punisher:War Zone</title>
      <location>http://www.fileden.com/files/2008/9/26/2116267/Official_Punisher__War_Zone_TV_Spot__3___quot_Clock_s_Ticking_quot_.flv</location>
      <image>http://i41.tinypic.com/zskd20.jpg</image>
      <info>http://www.freewebs.com/superheromovies/index.htm/</info>

      <title>The Spirit</title>
      <location>http://www.fileden.com/files/2008/9/26/2116267/The_Spirit_TV_spot_-_Little_Action.flv</location>
      <image>http://i44.tinypic.com/r10nj7.jpg</image>
      <info>http://www.freewebs.com/superheromovies/index.htm</info>
    </track>
  </trackList>
</playlist>

Once you have some more track tags, put them in the big blank space so that your playlist looks like this:

<?xml version='2.0' encoding='UTF-8'?>
<playlist version='2' xmlns='http://xspf.org/ns/0/'>
  <trackList>
    <track>
      <creator>Superhero Movies News</creator>
      <title>Punisher:War Zone</title>
      <location>http://www.fileden.com/files/2008/9/26/2116267/Official_Punisher__War_Zone_TV_Spot__3___quot_Clock_s_Ticking_quot_.flv</location>
      <image>http://i41.tinypic.com/zskd20.jpg</image>
      <info>http://www.freewebs.com/superheromovies/index.htm/</info>
    <strong><track></strong>
    <strong></track></strong>
      <title>The Spirit</title>
      <location>http://www.fileden.com/files/2008/9/26/2116267/The_Spirit_TV_spot_-_Little_Action.flv</location>
      <image>http://i44.tinypic.com/r10nj7.jpg</image>
      <info>http://www.freewebs.com/superheromovies/index.htm</info>
    </track>
  </trackList>
</playlist>

                                                                                            :D