views:

12

answers:

0

I've recorded a live video stream using Red5 .8. When I play it back, it works fine. When I pause (with ns.togglePause) it pauses but when I resume with ns.resume it doesn't play.

private function viewTheStream():void{ nc = new NetConnection(); nc.addEventListener(NetStatusEvent.NET_STATUS,streamConnect); nc.connect(rtmpPath.text ); }

private function streamConnect(event:NetStatusEvent):void { switch (event.info.code) { case "NetConnection.Connect.Success": ns = new NetStream( nc ); ns.addEventListener(AsyncErrorEvent.ASYNC_ERROR, asyncErrorHandler); ns.client = this; ns.play(streamName.text); vid = new Video; viewVideo.addChild(vid); vid.attachNetStream(ns); break; ...

private function btnPlay_Click():void {
if (btnPlay.label == "Pause") {
ns.togglePause();
btnPlay.label = "Play"
}
else {
ns.resume();
btnPlay.label = "Pause"
}

Do I have a problem with the recorded file or my playback program... at a loss!!