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

Fix Vimeo instantiation error catching #240

Closed
wants to merge 1 commit into from
Closed

Fix Vimeo instantiation error catching #240

wants to merge 1 commit into from

Conversation

rijk
Copy link
Contributor

@rijk rijk commented Oct 2, 2017

Errors happening during instantiation of the Vimeo player (for example: a private video or 404) were not caught and passed to the error handler. This resulted in a bunch of console errors (triggered by the this.player.on(...) calls after instantiation), a broken player, and no way to do anything about it or even tell the user what is going on.

This change calls player.ready() right after instantiation (which returns a promise), allowing us to check if everything is OK (in which case we attach all the listeners), or not (in which case we pass the error on to our onError method).

More info: vimeo/player.js#165

@cookpete cookpete closed this in d34d228 Oct 2, 2017
@cookpete
Copy link
Owner

cookpete commented Oct 2, 2017

d34d228 should fix this, but there is still a bug with the Vimeo API that renders the player useless after the initial error occurs: vimeo/player.js#166.

Thanks for the PR!

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.

None yet

2 participants