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

play fires before loadstart on Win8 RT, IE 10 #1270

Closed
dmlap opened this issue Jun 9, 2014 · 5 comments
Closed

play fires before loadstart on Win8 RT, IE 10 #1270

dmlap opened this issue Jun 9, 2014 · 5 comments
Labels

Comments

@dmlap
Copy link
Member

dmlap commented Jun 9, 2014

Discovered on Win8 RT, IE 10 but seems to be happening in Chrome on OSX as well. If play() is called programmatically immediately after setting a source, it may fire before loadstart and cause the big play button to stay up. Example on jsfiddle.

@heff
Copy link
Member

heff commented Jun 9, 2014

This is related to a few other open issues. Working on a fix now.

@dmlap
Copy link
Member Author

dmlap commented Jun 9, 2014

All of these issues seem to boil down to race conditions on loadstart. I think triggering the loadstart handler synchronously during player init (something like #1208) would be safer.

@heff
Copy link
Member

heff commented Jun 10, 2014

Yeah, @mmcc helped me think through this one and the conclusion was that the code assumes the play event comes after the loadstart event, which is wrong in a lot of cases, as you've found. So I'm reworking the code to take that into account.

The fun comes in that we have to use the loadstart event to know that we're working with a new source and reset the player (including the firstplay listener), but the (first) play event may have come before that loadstart. Kind of a chicken and egg? It's a potential plus on the side of creating a srcchange type event (#1194), but at the same time it shows what fun inventing new events (firstplay) can lead too...

@heff
Copy link
Member

heff commented Jun 10, 2014

Can you review this one? #1271

@heff
Copy link
Member

heff commented Jun 11, 2014

Closed by #1271

@heff heff closed this as completed Jun 11, 2014
@heff heff added the bug label Jun 11, 2014
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants