I am trying to build a Flash Radio player, that will stream a radio station that I have setup on an IceCast server. The stream is AACPlus encoded. The media player should also display metadata such as artist name, song title etc. Now I have got it to work with a test file stored locally using the Netstream class:
var connect_nc:NetConnection = new NetConnection();
connect_nc.connect(null);
var stream_ns:NetStream = new NetStream(connect_nc);
stream_ns.addEventListener(AsyncErrorEvent.ASYNC_ERROR, asyncErrorHandler);
stream_ns.play("sample.m4a");
function asyncErrorHandler(event:AsyncErrorEvent):void {
trace(event.text);
}
However, I cannot for the life of me figure out how to get a live Icecast stream(http//:127.0.0.1:8000) to work in flash like so
var connect_nc:NetConnection = new NetConnection();
connect_nc.connect(null);
var stream_ns:NetStream = new NetStream(connect_nc);
stream_ns.addEventListener(AsyncErrorEvent.ASYNC_ERROR, asyncErrorHandler);
stream_ns.play("http//:127.0.0.1:8000");
function asyncErrorHandler(event:AsyncErrorEvent):void {
trace(event.text);
}
The result of this code is just silence, with no errors.
Anyone had experience embedding an AAC encoded IceCAST stream in Flash. What am I missing? Any help would be greatly appreciated.
Thanks