codepo8 / slide-show

A full screen slide show for images and videos
https://codepo8.github.io/slide-show/slideshow.html
31 stars 15 forks source link

If the image URL returns an HTTP error code, it does not go the next one #3

Closed mossroy closed 2 years ago

mossroy commented 2 years ago

A new i Image object is created, and it's necessary that loaded() is called for the next image/video to be loaded.

But loaded() is only called in i.onload function, and there is no i.onerror function

I managed to solve that by adding an i.onerror function, that display an error message in the wrapper, and calls loaded()

I can make a PR if you want