Quantcast
Channel: Adobe Community : Discussion List - HTTP Dynamic Streaming
Viewing all articles
Browse latest Browse all 130

No NetStream.Buffer.Full triggered while appendBytes()

$
0
0

Take the code http://www.adobe.com/devnet/video/articles/media-measurement-flash.htm l as an example,

what may cause netstream not to trigger NetStream.Buffer.Full or NetStream.Buffer.Empty?

I'm sure the data has come in.

 

private var httpStream:URLStream = null;

private function playHttpStreaming():void

{

  var nc:NetConnection = new NetConnection();

  nc.connect(null);

  var ns:NetStream = new NetStream(nc);

   ns.addEventListener(NetStatusEvent.NET_STATUS, onNetStatus);

  ns.play(null);

 

  var request:URLRequest = new URLRequest("http://my.url/myfile.flv");

  httpStream = new URLStream();

  httpStream.addEventListener(ProgressEvent.PROGRESS, onData);

  httpStream.load(request);

}

 

private function onNetStatus(event:NetStatusEvent):void{

                                            trace(event.info.code)

}

 

private function onData(e:ProgressEvent):void

{

  var b:ByteArray = new ByteArray();

  httpStream.readBytes(b, 0, httpStream.bytesAvailable);

  ns.appendBytes(b);

}


Viewing all articles
Browse latest Browse all 130

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>