0

1. Problem

I am adding a shoutcast radio to website (appeding this code to BODY):

<embed src="http://www.shoutcast.com/media/popupPlayer_V19.swf?stationid=http://yp.shoutcast.com/sbin/tunein-station.pls?id=XXX&play_status=1" quality="high" width="0" height="0" type="application/x-shockwave-flash" pluginspage="http://www.adobe.com/go/getflashplayer"></embed>

I could not find any API/documentation of this player (and I cannot use a diffrent player for other reasons).

I would like to control volume of this SWF object with Javascript.

How do I do that?

I have no access to the SWF and I have no idea if it has any methods for volume control (and if it has, I don't know their names...).

2. Where did you get this player from?

  • visit http://www.shoutcast.com/
  • click HELP
  • select Settings
  • choose "Play SHOUTcast stations in SHOUTcast web player ( shown below )"
  • click Save Settings
  • choose any station
  • in the popup window click "Copy embed code"

3. Why not set width and height and use the included volume-slider?

Becouse I need to have custom graphics for Play/Pause buttons and volume slider.

So my goal is to add "onclick" events on some HTML objects and by JS control the swf video.

ioleo
  • 4,369
  • 5
  • 42
  • 59

1 Answers1

1

Unfortunately you cannot control the volume of an SWF externally the way you want.

One option would be to build another SWF to load the SWF you are currently using. Once you have done that, you can set the volume of the containing SWF. Of course, this may not be possible with the shoutcast app.

lee

Lee Loftiss
  • 2,835
  • 7
  • 40
  • 65
  • @loostro, It's very easy to build your own Flash movie to play your SHOUTcast stream. I'd recommend doing that. – Brad Jun 30 '12 at 16:11
  • @Brad, I ended up useing jPlayer. About my own flash movie - I do not have Adobe Flash Professional, so that was never an option – ioleo Jul 01 '12 at 09:17