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

Use emptied event to reset player states #1277

Open
heff opened this issue Jun 10, 2014 · 1 comment
Open

Use emptied event to reset player states #1277

heff opened this issue Jun 10, 2014 · 1 comment
Labels
confirmed enhancement pinned Things that stalebot shouldn't close automatically

Comments

@heff
Copy link
Member

heff commented Jun 10, 2014

In #1124 we added a feature to let the player reset its 'has-started' state when a new source is loaded. It used the loadstart event to do this.

In #1271 we found that the play and loadstart events could fire in any order, so we made a fix so that the the firstplay event would be fired even if the play event came before the loadstart.

In #1271 we also realized that emptied is the event we should be relying on to reset the player states. It always comes before the play event, so it can greatly simply the code we currently have for the firstplay event.

However, the Flash SWF doesn't fire the emptied event, so before we can use it we have to first implement it in Flash. Adding a related issue on the swf repo. videojs/video-js-swf#100

@gkatsev
Copy link
Member

gkatsev commented Aug 9, 2016

Just ran into this. With autoplay and ads on safari, we end up getting the play event before loadstart but ads even up pausing the player before loadstart fires so we think we switched videos and we reset the started state but we shouldn't have because we didn't actually change videos.

@gkatsev gkatsev added the pinned Things that stalebot shouldn't close automatically label Jul 2, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
confirmed enhancement pinned Things that stalebot shouldn't close automatically
Projects
None yet
Development

No branches or pull requests

2 participants