tags:

views:

362

answers:

1

I'm thinking of using JW Player to show some videos.
Currently I'm using this test XML file which works great. But now I need to change this with data from a database.

First I thought I could output the HTML playlist directly:

  <div class="clearfix" id="playlist">
    <div class="jw_playlist_playlist">
      <div class="jw_playlist_item even">
        <div class="jw_playlist_title">FLV video</div>
        <div class="jw_playlist_description">Big Buck Bunny.</div>
        <div class="clear"></div>
      </div>
      <div class="jw_playlist_item odd">
        <div class="jw_playlist_image_div"> <img class="jw_playlist_image" src="files/bunny.jpg"> </div>
        <div class="jw_playlist_title">MP3 Audio with image</div>
        <div class="jw_playlist_description">Big Buck Bunny .</div>
        <div class="clear"></div>
      </div>
    </div>
  </div>

But the problem is that there is no link to the file which needs to be played, so I guess this is still in the XML file.

So that leads me to the conclution that I have to make my own XML playlist. No problem, I have done that. But my problem is this:

How do I get the player to play my newly generated playlist? Do I have to generate and save the playlist each time someone opens the page? That sesems like a bit of overkill.

My playlist looks like this now:

<object id="player" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" name="player" width="480" height="320">
    <!-- IE params -->
    <param name="movie" value="/mediaplayer/player.swf" />
    <param name="allowfullscreen" value="true" />
    <param name="allowscriptaccess" value="always" />
    <param name="playlistsize" value="50" />
    <param name="flashvars" value="file=http://localhost/playlist.xml" />

    <!-- other browser params -->
    <embed
        type="application/x-shockwave-flash"
        id="player2"
        name="player2"
        src="/mediaplayer/player.swf" 
        width="480" 
        height="320"
        allowscriptaccess="always" 
        allowfullscreen="true"
        playlistsize ="50"
        flashvars="playlistfile=http://localhost/playlist.xml"
    />
</object>
<div id="playlist" class="clearfix"></div>

Any help is greatly appreciated.

UPDATE
Further investigation has led me to this forum page. It helps when you discover what keywords to use in search :)

I will post an update if I find the solution.

A: 

I found the solution.

What I did is this:

I change the playlist file to the following: flashvars="playlistfile=http://localhost/templatesNew/MultimediaPlayList.aspx?

Then I create a new ASPX file (MultimediaPlayList.aspx) which generates the XML code.

And voila :)

Steven