views:

914

answers:

2

On chrome it works ok.

My flash version is WIN 10,0,32,18 Debug: No

This is the code that i wrote:

<script type="text/javascript" src="/swfobject.js"></script> 
<div id="player"> 
<a href="http://www.macromedia.com/go/getflashplayer"&gt;Get the Flash Player</a> 
to see this player.
</div> 
<script type="text/javascript"> 

var so = new SWFObject('player.swf', 'streambaby', '500', '15', '7');
so.addVariable('type', 'sound');
so.addVariable('file', 'http://path_to_shoutcast:port');
so.addVariable('displayheight', '15');
so.write('player');

</script>

The problem is that on chrome the stream works OK but on Firefox 3.5.2 it stopps after a few seconds. I opened Firebug and hit the Net tab and I see that even after the playing stopps, firefox still downloads the stream.

I've searched on google and found answeres that said I should update my flash plugin, but it's the latest.

A: 

I managed to bypass this problem with adding

so.addVariable('duration','-1');

Before so.write, so the script becomes:

<script type="text/javascript"> 

var so = new SWFObject('player.swf', 'streambaby', '500', '15', '7');
so.addVariable('type', 'sound');
so.addVariable('file', 'http://path_to_shoutcast:port');
so.addVariable('displayheight', '15');
so.addVariable('duration','-1');
so.write('player');

</script>
hydrarulz