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

Add sync option to ready() #2392

Closed
wants to merge 2 commits into from
Closed

Add sync option to ready() #2392

wants to merge 2 commits into from

Conversation

heff
Copy link
Member

@heff heff commented Jul 22, 2015

Should fix #2326

heff added 2 commits July 21, 2015 17:07
For 5.0 we switched ready() to always execute listeners
asynchronously, but for most internal use cases we would
prefer the ready function to execute immediately if the
component is already ready.

Fixes videojs#2326
Related: videojs#2382, videojs#1667, videojs#2188
@pam
Copy link

pam commented Jul 22, 2015

Tests failed. Automated cross-browser testing via Sauce Labs and Travis CI shows that the JavaScript changes in this pull request are: BUSTED

Commit: 44a6d8d
Build details: https://travis-ci.org/pam/video.js/builds/72042662

(Please note that this is a fully automated comment.)

@dmlap
Copy link
Member

dmlap commented Jul 22, 2015

Nice. How did you look for ready() calls that needed to be converted to the sync form?

@heff
Copy link
Member Author

heff commented Jul 22, 2015

ready\([^\)]

I only added sync for the ones that needed it or seemed like they would be better with it.

@heff
Copy link
Member Author

heff commented Jul 22, 2015

Sorry, that could be more detailed. There were obvious ones where we were just waiting to send the call because the tech wasn't ready, but ideally they'd be synchronous. Then I also added sync to the ones that seemed like they could be player loading speed related. Otherwise if they looked like just needed to happen some time after the ready event, I left them alone.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Setting the src is not synchronous
3 participants