Hi,
I have a dropdown that loads playlists, I have modded the following example:
http://home5.inet.tele.dk/nyboe/flash/mediaplayer4/JW_API_xmpl_5-2-3-0.html
All was good until I changed the content of one of the playlist.xml's...
The player is still displaying the old content that I deleted out of the file and replaced with new.
I have closed my browser and tried again but although I have new content in the playlist.xml the player is showing the old content.
Does the player cache playlist content?
I cleared the cache from my browser and then the new content inside the playlist.xml works fine.
Please tell me their is something wrong with the code I have and that the player does not cache (I cannot get ask my users to clear their cache every time I change a playlist.xml with new content.
My code below:
<html>
<head>
<title>JW API Example 5-2-3-0 - JW FLV Media Player</title>
<script type="text/javascript" src="swfobject.js"></script>
<script type="text/javascript">
var player = null;
function playerReady(thePlayer) {
player = document.getElementById(thePlayer.id);
}
function createPlayer(thePlayer, theFile) {
var flashvars = {
file:theFile,
skin:"snel.swf",
autostart:"false",
playlist:"right",
playlistsize:"300",
shuffle:"false",
autoscroll:"false",
volume:"50"
}
var params = {
allowfullscreen:"true",
allowscriptaccess:"always"
}
var attributes = {
id:thePlayer,
name:thePlayer
}
swfobject.embedSWF("player.swf", "placeholder1", "900", "480", "9.0.115", false, flashvars, params, attributes);
}
</script>
<style type="text/css">
<!--
body {
background-color: #000000;
}
.style2 {color: #000000}
.style3 {
font-weight: bold;
vertical-align: middle;
font-family: Geneva, Arial, Helvetica, sans-serif;
color: #FFFFFF;
}
-->
</style>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"></head>
<body onLoad="createPlayer('player1', 'playlist_stuff.xml')">
<div id="placeholder1">
<p class="style2"><a href="http://www.adobe.com/go/getflashplayer">Get flash</a> to see <br>
</p>
</div>
<table width="370" border="0">
<tr>
<td width="329" height="39" valign="middle"><div align="left"><span class="style3">Select a playlist: </span>
<select name="sel1" onChange="javascript:player.sendEvent('STOP'); player.sendEvent('LOAD', this.value);" style="width:auto;">
<option value="playlist_mp3.xml" >MP3</option>
<option value="playlist_mixmedia.xml"> Mixed</option>
<option value="playlist_birds.xml">Birds</option>
<option value="playlist_remember.xml">Remember</option>
<option value="playlist_stuff.xml" selected>Boys</option>
</select>
</div></td>
<td width="31"> </td>
</tr>
</table>
</body>
</html>

the browser will indeed check if it already has a playlist of known name -
but try if this little change will do