Hi everyone,
I am demoing the elements of a website for a college radio station and I am trying to get all the various configurations of the player I can see us using working - playing the web stream from an IP address, playing single MP3 files and playing a playlist of MP3 files.
The temporary site is hosted here:
http://www.c-allen.co.uk/vpa
As you can see there, I have managed to get the streaming player working (I can't fully test as the streaming server is not running) and the single MP3 file player working.
All players will ideally use the Snel skin however, the bottom two players are supposed to be firstly a player using the snel skin and showing a playlist on the bottom and secondly a playlist coded using the embed method (which works!) but as soon as I attempt to add a skin the player disappears.
So my questions are:
Does anyone have any suggestions as to why the 3rd player down dissapears when I add the so.addVariable('playlist','bottom'); line? The playlist does work and the next / previous arrows appear when I remove the above line of code.
The bottom player showing the playlist also disappears when I attempt to change the skin but I'm not 100% sure how to add a skin using the embed method, can anyone help please?
I would appreciate any suggestions greatly!
Thanks in advance,
Chris.
Here is the code from the players and the playlist:
<! --Radio Player-->
<div>
<center>
<div>
<script type='text/javascript' src='swfobject.js'></script>
<div id='radio'>Radio - This text will be replaced</div>
<script type='text/javascript'>
var so = new SWFObject('player.swf','ply','470','32','9','#ffffff');
so.addVariable("skin", "http://www.c-allen.co.uk/vpa/snel.swf");
so.addParam('allowfullscreen','true');
so.addParam('allowscriptaccess','always');
so.addParam('wmode','opaque');
so.addVariable('file','http://212.219.144.32:8000/;stream.nsv');
so.write('radio');
</script>
<p>
<p>
<!--Test MP3 Player-->
<div>
<center>
<div>
<script type='text/javascript' src='swfobject.js'></script>
<div id='testmp3'>Test MP3 - This text will be replaced</div>
<script type='text/javascript'>
var so = new SWFObject('player.swf','ply','470','32','9','#ffffff');
so.addVariable("skin", "http://www.c-allen.co.uk/vpa/snel.swf");
so.addParam('allowfullscreen','true');
so.addParam('allowscriptaccess','always');
so.addParam('wmode','opaque');
so.addVariable('file','http://www.c-allen.co.uk/vpa/lift.mp3');
so.write('testmp3');
</script>
<p>
<p>
<!--Playlist-->
<script type='text/javascript' src='swfobject.js'></script>
<div id='playlist'>Playlist - This text will be replaced</div>
<script type='text/javascript'>
var so = new SWFObject('player.swf','ply','470','32','9','#ffffff');
so.addParam('allowfullscreen','true');
so.addVariable("skin", "http://www.c-allen.co.uk/vpa/snel.swf");
so.addParam('allowscriptaccess','always');
so.addParam('wmode','opaque');
so.addVariable('file','playlist.xml');
so.addVariable('playlist','bottom');
so.write('playlist');
</script>
<p>
<p>
<!--Embed Playlist Script-->
<script type="text/javascript" src="swfobject.swf"></script>
<div id="embeded">Embeded Playlist - This text will be replaced</div>
<script type="text/javascript">
var so = new SWFObject('player.swf','mpl','470','200','9');
so.addParam('allowscriptaccess','always');
so.addVariable("skin", "http://www.c-allen.co.uk/vpa/snel.swf");
so.addParam('allowfullscreen','true');
so.addParam('flashvars','&file=playlist.xml&playlist=bottom');
so.write('embeded');
</script>
And here is the XML playlist (although this checks out as valid on http://validator.xspf.org/):
<?xml version='1.0' encoding='UTF-8'?>
<playlist version="1" xmlns="http://xspf.org/ns/0/">
<trackList>
<track>
<title>Death Star Lift Music</title>
<location>http://www.c-allen.co.uk/vpa/lift.mp3</location>
</track>
<track>
<title>Riff</title>
<location>http://www.c-allen.co.uk/vpa/Lick.mp3</location>
</track>
</trackList>
</playlist>
I've just spotted the
so.addVariable("skin", "http://www.c-allen.co.uk/vpa/snel.swf");
in the embedded playlist player code and this was part of my desperation in trying to make it work (I stuck it in there to see what happened). I'd tried using a line of code involving an & (which I can't find now) but that caused the player to dissapear.
Chris.