Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"ended" event firing before actual stream end #49

Closed
sompylasar opened this issue Dec 17, 2010 · 12 comments
Closed

"ended" event firing before actual stream end #49

sompylasar opened this issue Dec 17, 2010 · 12 comments
Labels

Comments

@sompylasar
Copy link

While the stream is still active and downloading data, the "ended" event is firing.

I found that the correct way to determine stream end is to only set a flag in NetStream.Play.Stop event and handle stream end in NetStream.Buffer.Empty event only if
the flag is set.

So here is the problem and the fix: http://stackoverflow.com/questions/2134450/anyone-run-into-this-bug-rtmp-streaming-videos-ending-3-4-secs-too-early

Moreover, I think Stop handler has to also set a timeout to handle the opposite situation: Buffer.Empty has fired before Stop and won't fire once again after Stop. What do you think of this?

@johndyer
Copy link
Collaborator

Thanks for the tip. I'll take a look

@johndyer
Copy link
Collaborator

johndyer commented Jan 1, 2011

Have you experienced this in practice? I'd like to work on it, but I can't seem to replicate it.

@sompylasar
Copy link
Author

Yes, I'm experiencing this for slow streams. I cannot give you samples because the problem is not in files but in streaming speed. Try slowing down a stream (e.g. with some server-side proxy script that reads from a file and sleeps between flushing pieces).

@sompylasar
Copy link
Author

Have you worked on the problem?

@johndyer
Copy link
Collaborator

No, I still haven't gotten to this one.

@sompylasar
Copy link
Author

Please, reopen. Accidentally clicked 'Comment and close'

@sompylasar
Copy link
Author

Oh, you're online. Hope you'll get to streaming soon. I've got another issue: black screen while consuming a stream without 'static file' metadata. Looking for possible solutions now.

@johndyer
Copy link
Collaborator

Any chance you want to take a stab at adding the code you found?

@sompylasar
Copy link
Author

As soon as I find an environment to compile Flash files.

@johndyer
Copy link
Collaborator

This is now in the latest /src/

@sompylasar
Copy link
Author

Cool, thanks! As soon as I'm able to test the latest version, I'll report if that helped.

RobRoy pushed a commit to RobRoy/mediaelement that referenced this issue May 27, 2011
@sompylasar
Copy link
Author

Still seing this issue on my live streams. After getting 'ended' event, JS wrapper performs setCurrentTime(0) and pause(). Setting a breakpoint on these lines allows to see that the stream is not actually ended, and the Flash component continues to play it.

Please, have a look at this stream to test: http://sbcast03d.maps.yandex.ru/ms058.flv?token=CDCkADAwAAAAABAwD7BGBqC1CDCkCIAwDgDKCEAA

You may take more live streams on the map if this one is expired: http://maps.yandex.ru/-/CBUey-ng (click on any camera icon at the map and look for .flv in Network panel of Firebug)

A working fix to this is very important. Thanks in advance!

marcboivin pushed a commit to libeo/vibeo that referenced this issue Oct 12, 2012
some timer events were happening before metadata was loaded.
(i don't know enough AS to track down what they were)

not sure if there were any specifics on rebuilding the swf.
i compiled it in CS4 without changing any options.

related to but not entirely mediaelement/mediaelement#49
rexblack pushed a commit to rexblack/mediaelement that referenced this issue May 22, 2014
some timer events were happening before metadata was loaded.
(i don't know enough AS to track down what they were)

not sure if there were any specifics on rebuilding the swf.
i compiled it in CS4 without changing any options.

related to but not entirely mediaelement#49
rexblack pushed a commit to rexblack/mediaelement that referenced this issue May 22, 2014
some timer events were happening before metadata was loaded.
(i don't know enough AS to track down what they were)

not sure if there were any specifics on rebuilding the swf.
i compiled it in CS4 without changing any options.

related to but not entirely mediaelement#49
rexblack pushed a commit to rexblack/mediaelement that referenced this issue May 22, 2014
rexblack pushed a commit to rexblack/mediaelement that referenced this issue May 22, 2014
marmite22 pushed a commit to elucidat/mediaelement that referenced this issue Dec 16, 2016
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants