I have tried so many different ways for this to work. What I have is a website where I have a streaming radio player at the top of the page. Normally I have just the default given script
<center>
<!--Wavestreaming.com SHOUTcast Flash Player-->
<script type="text/javascript" src="http://player.wavestreamer.com/cgi-bin/swf.js?id=A7GCMO5PSJJE1EC9"></script>.
<script type="text/javascript" src="http://www.syracusehiphop.com/wp-content/uploads/2012/04/scriptfornoflashtext.js.txt"></script>
</center>
It works fine on all desktop browsers of course, but when someone from an IPAD or Tablet comes I want them to be able to also listen.
So I am using a simple HTML5 code,but of course it only works in a mobile browser so now desktops browsers wont play it unless I provide multiple MIME types, but I am unabl to provide that.
So I tried multiple "ELSE IF" codes and just cant get it rght the close I got was getting it to display the HTML5 on the mobile or tablet browsers and then both the default script and HTML5 stacked up on each other on desktop
This is my latest attempt
<script type="text/javascript">
$(document).ready(function()
{
if ( $.browser.msie )
{
<center> <!--Wavestreaming.com SHOUTcast Flash Player-->
<script type="text/javascript" src="http://player.wavestreamer.com/cgi-bin/swf.js?id=A7GCMO5PSJJE1EC9"></script>.
<script type="text/javascript" src="http://www.syracusehiphop.com/wp-content/uploads/2012/04/scriptfornoflashtext.js.txt"></script>
</center>
}
else if ( $.browser.mozilla )
{
<center>
<!--Wavestreaming.com SHOUTcast Flash Player-->
<script type="text/javascript" src="http://player.wavestreamer.com/cgi-bin/swf.js?id=A7GCMO5PSJJE1EC9"></script>.
<script type="text/javascript" src="http://www.syracusehiphop.com/wp-content/uploads/2012/04/scriptfornoflashtext.js.txt"></script>
</center>
}
else if ( $.browser.webkit || $.browser.safari )
{
<center>
<!--Wavestreaming.com SHOUTcast Flash Player-->
<script type="text/javascript" src="http://player.wavestreamer.com/cgi-bin/swf.js?id=A7GCMO5PSJJE1EC9"></script>.
<script type="text/javascript" src="http://www.syracusehiphop.com/wp-content/uploads/2012/04/scriptfornoflashtext.js.txt"></script>
</center>
}
else if ( $.browser.opera )
{
<center>
<!--Wavestreaming.com SHOUTcast Flash Player-->
<script type="text/javascript" src="http://player.wavestreamer.com/cgi-bin/swf.js?id=A7GCMO5PSJJE1EC9"></script>.
<script type="text/javascript" src="http://www.syracusehiphop.com/wp-content/uploads/2012/04/scriptfornoflashtext.js.txt"></script>
</center>
}
else if ( $mobile_browser )
{
<audio controls="controls">
<source src="http://delicious.wavestreamer.com:3057/listen.pls" type="audio/mpeg" />
</audio>
})
</script>