PDA

View Full Version : Netstream pause issue


amandeepsiin
02-06-2009, 09:58 AM
Hi,

I am developing an application in which user can record their responses. And later can listen to them.

I am using Flash Media Server 3.

The problem that i am facing is with the NetStream.pause. Here i am explaining you with example.

Lets say the flv that i playback is of 8 sec. I play the flv with NetStream,play method. Say at 4 sec user pause the flv, here i call NetStream.pause(true). NetStream.Pause.Notify and NetStream.Buffer.Flush notification occurs and my stream gets paused. But after 4 sec (this is the remaining time of the stream where user pause the playback) NetStream.Play.Stop notification occures.

However i pause the stream still this Stop notification fires, which i don't want to occur. can anyone tell me is there any known issue in FMS or i am doing something wrong.

Regards,
Amandeep

PS. I also tried NetStream.pause(), this also does not solve the problem.

lg101
03-04-2009, 06:16 AM
ideally this shud not happen...
can you post your code snippet

DrRobertAGreen
03-05-2009, 10:29 PM
I am experiencing a similar problem. I have the following issue found during QA.

1. If a user clicks pause it pauses the playback, if they click a second time, it works too, but any subsequent pause clicks have no effect on the NetStream playback.
2. If a stream is, say 2:00 long, and the user clicks pause at :10 seconds, goes to the bathroom or is away for, say :45 seconds, when the user clicks play the video speeds up to :55 seconds (:10 + :45). It's like the stream continues even though the NetStream.pause() method is called.

Here's my code;
NetConnection nc = new NetConnection(somePath);
NetStream ns = new NetStream(nc);

myPauseBtn.addEventListener(MouseEvent.CLICK, pauseVideo);
myPlayBtn.addEventListener(MouseEvent.CLICK, playVideo);

function pauseVideo(evt:MouseEvent):void{
ns.pause();
}
function pauseVideo(evt:MouseEvent):void{
ns.resume();
}

I also have tried:

function pauseVideo(evt:MouseEvent):void{
ns.togglePause();
}
function pauseVideo(evt:MouseEvent):void{
ns.togglePause();
}

I have NO idea what this could be. Please, any assistance is greatly appreciated.

lg101
03-06-2009, 06:52 AM
i believe ur playing a vod right?
bcos in live the above behavior is ideal..

lg101
03-06-2009, 06:59 AM
I see the pauseVideo method is repeated for
1. ns.pause();
2. ns.resume();

ns.resume() should ideally be in playVideo method.

vivansarai
03-06-2009, 08:29 AM
Hi Robert,

NetStream.Play.Stop doesn't mean, the Subscriber played to end of file. NetStream.Play.Stop messages gets triggered when FMS had successfully sent all stream data to subscribers buffer.

For Checking if the subscriber had played full stream successfully, we need to check NetStream.onPlayStatus() method and check if you get, "NetStream.Play.Complete".

Hope this help to solve your problem.

DrRobertAGreen
03-07-2009, 10:19 PM
Thanks all but it seems that I had inserted some code a few weeks ago that would modify the ns.bufferTime based on certain status messages. As soon as I commented out that code, I was back working at 100%!

Thanks for the assistance.