views:

103

answers:

1

Hello good people of SO. I am building a flash media player for an live audio stream. The server is set up to stream from a url that looks like so:

rtmp://ourwowzaserver.net:80/ourfiledirectory

the instructions i have found say to first set the directory:

nc.connect("rtmp://ourwowzaserver.net:80/ourfiledirectory");

and then later play it:

nc.play(mp3:thefilename)

this works when we have discrete filenames on the server (thefilename), but the live stream is not a file - rtmp://ourwowzaserver.net:80/shoutcast. How in the heck do I get .play to play it?

Thanks in advance!

A: 

You will need to create a live stream on your server first.

When you have created the stream, you can play it by calling:

(nc is your NetConnection object)

NetStream liveStream = new NetStream(nc);
liveStream.play("streamName");

Hope this helped.

Kevin