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 in Firefox 3.6.13 #61

Closed
braydonf opened this issue Jan 6, 2011 · 3 comments
Closed

"ended" event in Firefox 3.6.13 #61

braydonf opened this issue Jan 6, 2011 · 3 comments
Labels

Comments

@braydonf
Copy link

braydonf commented Jan 6, 2011

Sometimes the ended event doesn't happen and the video controls will lock up.

@johndyer
Copy link
Collaborator

johndyer commented Jan 6, 2011

Flash or Ogg?

@braydonf
Copy link
Author

braydonf commented Jan 6, 2011

Yeah using the VideoElement and ogg.

@braydonf
Copy link
Author

braydonf commented Jan 9, 2011

Using a setTimeout instead of relying on the event being fired helped with my use. Using something like this in the media player js:

                    function end_loop(){
                        if(t.media.ended){
                            show_end()
                        } else {
                            setTimeout(end_loop, 333)
                        }
                    }
                    if (t.media){
                        end_loop()
                    }

                    function show_end(){
                            t.media.setCurrentTime(0);
                            t.media.pause();

                            if (t.options.loop) {
                                    t.media.play();
                            } else {
                                    t.controls.css('visibility','hidden');
                            }
                    }


                    // ended for all                                                                                                                                                                                         
                    t.media.addEventListener('ended', show_end, true);

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