1 Reply Latest reply: Sep 20, 2010 12:55 AM by Varun Upadhyay RSS

    Getting problem with playing sound from server

    Varun Upadhyay Community Member

      Hi, I have an application of voice recording. This application is related to Red5 server.


      I can record well but when i want to play the recorded sound then, its not playing full recorded sound in AS3.


      My code is like this:


      nc=new NetConnection();


      nc.addEventListener(SecurityErrorEvent.SECURITY_ERROR,securityErrorHan dler);

      nc.connect("rtmp://" + serverName + "/oflaDemo");



      playns = new NetStream(nc);

      playns.client = this;

      playns.addEventListener(NetStatusEvent.NET_STATUS, netStatusHandler);

      playns.addEventListener(AsyncErrorEvent.ASYNC_ERROR, asyncErrorHandler);





      private function netStatusHandler(event:NetStatusEvent):void {


            trace('Net Event: '+event.info.code);




      private function asyncErrorHandler(event:AsyncErrorEvent):void {

                // ignore AsyncErrorEvent events.




      and trace output is as follow:

      Net Event: NetStream.Play.Reset

      Net Event: NetStream.Play.Start

      Net Event: NetStream.Buffer.Full

      Net Event: NetStream.Buffer.Empty

      Net Event: NetStream.Buffer.Full

      Net Event: NetStream.Play.Stop

      Net Event: NetStream.Buffer.Flush

      Net Event: NetStream.Buffer.Empty




      It's not playing full sound. i am not able to get it why. please help me.