Question

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">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.

Was it helpful?

Solution

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>

OTHER TIPS

Just for reference, I had a similar issue while streaming .nsv in Firefox with JW Player. It would only stream about a quarter of a second. I accidentally defined an invalid duration and it started to stream correctly. I ended up using this code:

so.addVariable('duration','invalid');

This works for me in Firefox, IE and Chrome.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top