Get the error details on the error event (for instance a HTTP error 401), by doing :
instance.on("error", function (event) {
var error = event.detail.plyr.getContainer().error;
console.error("plyr error", error);
});
Got undefined
Players affected:
Hello,
I'm looking for a way to get the details of an error using the error event. I tried to look for an error object in the container but didn't find anything...
Thank you for your work and for your help!
i can't figure this out either. the readme says "The element's error attribute contains more information," but 1) it's not very clear what "the element" is, and 2) i can't find an error attribute on anything that might be "the element" (the error object, the player, etc.).
Sorry, I'll work on improving this.
Any progress on this? I'm not sure if I'm having the exact same issue as @vbourgeois, for me the event.detail is always undefined for any event I'm attaching to.
this.$video.on('play', (event) => {
console.debug(event); // event object has detail attribute object but it is undefined
});
See the other issue related to error handling for a more updated response. Sorry I鈥檓 on my phone so it鈥檚 hard to search.
Is it possible to link to the fix - i'm having a hell of time searching for the correct ticket. Sorry for being a bother.
any update on this? :D i would love to be able to check out the error event for debugging.
Most helpful comment
Sorry, I'll work on improving this.