jake
jake

Reputation: 21

Choppy/skippy sound when streaming from flash media server.

I'm having an issue streaming mp3 files form flash media server where the sound will be very choppy. When polled every second the newStream.time property has kind of crazy numbers like 1,3,6,8,10 always skipping a second or two. Raising the buffertime seems to help the problem but not fix it. Any ideas?

Thanks very much.

Upvotes: 2

Views: 328

Answers (2)

Ameed
Ameed

Reputation: 29

you have to do like this

{     
        var startPlay:Boolean=false;
        ns.play("your-video-url");
        ns.pause();
        ns.seek(0);
        addEventListener(Event.ENTER_FRAME, myFunction);

        function myFunction(E:Event):void{
        var loaded:number=ns.byteloaded/ns.totalbyte; 
        var tmp:Number=Math.Ceil(loaded);
        if(tmp>=4){
        startPlay=true;
        removeEventListener(Event.ENTER_FRAME, myFunction);
        ns.resume();
        }
        //if you want to make a progress 
        //progressText.text="Please wait a second";

        }


    }

Upvotes: 0

alex
alex

Reputation: 11

For HLS stream (to iOS device) you'll need to purchase AAC on FMLE.

Upvotes: 1

Related Questions