See how the following goes for you, I simply converted your current code to work with the SWFObject library but of course you will need to test it. Before you can test it make sure you download the swfobject.js file from this link and ensure you update the src path in the below script tag to the location on the server.
PHP Code:
<span id="swfMovie"></span>
<script type="text/javascript" src="swfobject.js"></script>
<script type="text/javascript">
var settings = {
// Path to the SWF file we want to use
movie : <?php echo "'" . JURI::root() . "/modules/mod_shoutcastplayer/ffmp3-config.swf'"; ?>,
// The height and width of the flash file
height : parseInt(<?php echo "'$height'"; ?>),
width : parseInt(<?php echo "'$width'"; ?>),
// Setup the flashvars
flashvars : {
autoplay : <?php echo ($autostart === 'true') ? "'true'" : "''"; ?>,
buffering : 5,
codec : <?php echo "'$codec'"; ?>,
introurl : <?php echo "'$introurl'"; ?>,
jsevents : false,
lang : 'auto',
skin : <?php echo "'" . JURI::root() . "/modules/mod_shoutcastplayer/" . $skin . ".xml'"; ?>,
title : <?php echo "'$name'"; ?>,
tracking : true,
url : <?php echo "'$url'"; ?>,
volume : <?php echo "'$volume'"; ?>
},
// Setup the parameters
params : {
allowscriptaccess : 'always',
flashvars : settings.flashvars,
movie : settings.movie,
scale : 'noscale',
wmode : 'transparent'
},
// Setup the attributes
attributes : {}
};
swfobject.embedSWF(settings.movie, 'swfMovie', settings.width, settings.height, false, settings.flashvars, settings.params, settings.attributes);
</script>
Bookmarks