1
How can I handle errors like 404 in the Html5 video tag? I took a look at all the available events and the only one who was supposed to serve in this case was the onerror, however, when I define it by means of an attribute in the tag it can never find my function and in the example of the link there, when the 404, it does not call the function.
Does anyone know how to get around 404 errors?
Here is an example from jsfiddle. To test the first function is only by "onerror=test()" in the video tag
onerror
is not valid for tagvideo
. Maybe addeventlistener will. Look at this similar question in the OS: http://stackoverflow.com/questions/5573461/html5-video-error-handling– Oralista de Sistemas
Yes, adding a Istener works, however, we still can not say that the error was actually 404 or was for something else. It seems that he simply returns error just to inform that something went wrong, but does not say what went wrong
– Paulo Gustavo