laaptu
03-08-2009, 11:10 AM
Dear users,
I have developed a live recorder and player. Once my application records and the recording time is stopped,it begans to play.The playing portion works well. I have used flash IDE and red5 0.7 server.
My play pause function looks like this:
private var bolLoaded:Boolean = false;
private function buttonListeners():void
{
play_btn.addEventListener(MouseEvent.CLICK,playPau se);
pause_btn.addEventListener(MouseEvent.CLICK,playPa use);
}
private function playPause(evt:MouseEvent):void
{
if(evt.target.name=="play_btn")
{
play_btn.visible = false;
pause_btn.visible = true;
if(!bolLoaded)
{
nsStream.play("myVideos.flv");
bolLoaded = true;
}
else
{
nsStream.resume( );
}
else
{
play_btn.visible = true;
pause_btn.visible = false;
nsStream.pause( );
}
}
Further when I do pause following NetStatus event are called
NetStream.Pause.Notify
NetStream.Buffer.Flush
And when I do play again after pausing
NetStream.Unpause.Notify
So in my application pausing is done but unpausing doesn't happen.
While going through some of the forums what I got is that pause and unpause issues must be resolved in both client and server.Means that pausing is triggered in server side but after unpause,the same effect can't be seen.
Do you have any idea on this? Your guidance will be well appreciated
I have developed a live recorder and player. Once my application records and the recording time is stopped,it begans to play.The playing portion works well. I have used flash IDE and red5 0.7 server.
My play pause function looks like this:
private var bolLoaded:Boolean = false;
private function buttonListeners():void
{
play_btn.addEventListener(MouseEvent.CLICK,playPau se);
pause_btn.addEventListener(MouseEvent.CLICK,playPa use);
}
private function playPause(evt:MouseEvent):void
{
if(evt.target.name=="play_btn")
{
play_btn.visible = false;
pause_btn.visible = true;
if(!bolLoaded)
{
nsStream.play("myVideos.flv");
bolLoaded = true;
}
else
{
nsStream.resume( );
}
else
{
play_btn.visible = true;
pause_btn.visible = false;
nsStream.pause( );
}
}
Further when I do pause following NetStatus event are called
NetStream.Pause.Notify
NetStream.Buffer.Flush
And when I do play again after pausing
NetStream.Unpause.Notify
So in my application pausing is done but unpausing doesn't happen.
While going through some of the forums what I got is that pause and unpause issues must be resolved in both client and server.Means that pausing is triggered in server side but after unpause,the same effect can't be seen.
Do you have any idea on this? Your guidance will be well appreciated