Archive for the ‘Audio’ Category
One of the most popular audio player plugins for Wordpress is the Wordpress Audio Player especially since it can also be used as a standalone player on non Wordpress sites.
We recently ran into a situation where the standalone version of this player was working fine in most browsers, but not in Internet Explorer 8 (IE8). Although initially frustrating, the fix is simple. If the player is being setup with more than one parameter, such as this:
<script type="text/javascript" src="path/to/audio-player.js"></script>
<script type="text/javascript">
AudioPlayer.setup("http://yoursite.com/path/to/player.swf", {
width: 290,
transparentpagebg: "yes",
});
</script>
make sure there is no trailing comma after the last array element passed as the second parameter to the setup() method. Although it is common to have a comma after the last array element in Javascript, the above code fails to load the player under IE8. Instead use:
<script type="text/javascript" src="path/to/audio-player.js"></script>
<script type="text/javascript">
AudioPlayer.setup("http://yoursite.com/path/to/player.swf", {
width: 290,
transparentpagebg: "yes"
});
</script>
and the player should display as expected.