-
Notifications
You must be signed in to change notification settings - Fork 56
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
Error event returns event target, not error code #32
Comments
@nwittwer did you ever get a solution to this? |
@lawrence615 Haven't tried in a while, but after briefly looking again in this repo, it looks like it still emits vue-youtube/src/vue-youtube.js Lines 71 to 73 in 585299c
|
@nwittwer Yes I agree with you. What I noticed is that the event has value only when there's an error. Hence, all errors will be captured and treated the same way. |
When the
onError
event fires, I would like to access the error code, however this plugin currently returns only theevent.target
, which—as far as I can tell—is only the YouTube player object without any internal error logs.The YouTube API says that the error code is available via
event.data
.This plugin (
playerError()
): https://github.com/anteriovieira/vue-youtube/blob/master/src/vue-youtube.js#L68YouTube API (
onError()
): https://developers.google.com/youtube/iframe_api_reference#onErrorThe text was updated successfully, but these errors were encountered: