Open nwittwer opened 5 years ago
@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 event.target
, so I assume it still would not solve this.
@lawrence615 Haven't tried in a while, but after briefly looking again in this repo, it looks like it still emits
event.target
, so I assume it still would not solve this.
@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#L68 YouTube API (onError()
): https://developers.google.com/youtube/iframe_api_reference#onError