Order Now AdSolution Sign Up | Login » Bits on the Run Sign Up | Login »

Forums

/

Preview image disappears when streaming mp3

6 replies [Last post]

Hi,

When playing an mp3 file the preview image remains displayed.
However, when one selects an mp3 stream (e.g. for shoutcast) the preview image disappears (screen becomes black).

I would like to setup the JW Player such that the user initially sees a picture with a play button on it,
and when the user hits the play button, the player starts to play the mp3 stream and keeps the picture.
Like said above, this works for a mp3 file but not for a mp3 stream.

How can I easily achieve this?

-Paul.

Here is an example, the html file (all js/swf files are standard files put in the same directory as this html file):

<head>

<title>Player Testpage</title>

<script type="text/javascript" src="swfobject.js"></script>

</head>

<body>
<div class="media" id="preview">You need Flash Player 9 and a browser with javascript to use this test!</div>

<script type="text/javascript">
var s1 = new SWFObject("player.swf","player","470","470","9");
s1.addParam("allowfullscreen","true");
s1.addParam("allowscriptaccess","always");
s1.addParam("wmode","opaque");
s1.addParam("flashvars","file=mybunnies.xml&skin=overlay.swf&lightcolor=ff9900&frontcolor=ffffff&=&backcolor=000000&controlbar=over&playlist=bottom");
s1.write("preview");
</script>

</body>

And the playlist "mybunnies.html" containig one mp3 and one shoutcast stream:

<rss version="2.0" xmlns:media="http://search.yahoo.com/mrss/">
<channel>
<item>
<title>Big Buck Bunny - MP3 audio</title>
<media:content url="http://www.jeroenwijering.com/upload/bunny.mp3" type="audio/mpeg" duration="33" />
<media:thumbnail url="http://www.jeroenwijering.com/upload/bunny.jpg" />
<media:credit>Blender Foundation</media:credit>
<description>Big Buck Bunny is a short animated film by the Blender Institute, part of the Blender Foundation. Like the foundation's previous film Elephants Dream, the film is made using free and open source software.</description>
<link>http://www.bigbuckbunny.org</link>
</item>

<item>
<title>Test Stream</title>
<media:content url="http://broadband.eve-radio.com:8000/;stream.nsv" type="audio/mpeg"/>
<media:thumbnail url="http://www.jeroenwijering.com/upload/bunny.jpg" />
<media:credit>Blender Foundation</media:credit>
<description>Big Buck Bunny is a short animated film by the Blender Institute, part of the Blender Foundation. Like the foundation's previous film Elephants Dream, the film is made using free and open source software.</description>
<link>http://www.bigbuckbunny.org</link>
</item>

</channel>
</rss>

(In my posting above, the playlist should of course be called "mybunnies.xml" and not "mybunnies.html")

You can trick the player into thinking it's playing an MP3 by appending "?mp3" to the stream URI:

<media:content url="http://broadband.eve-radio.com:8000/;stream.nsv<strong>?mp3</strong>" type="audio/mpeg"/>

Hi kLink,

That indeed did the trick. Thanks!

-Paul.

@Paulus,

You're welcome. Good Luck!      :D

that didnt help at all

 
@ciara,

If you post a link to your Test Page, someone may be able to give you some useful and effective help. We can't guess.