sachinchoolur / lightgallery.js

Full featured JavaScript image & video gallery. No dependencies
https://sachinchoolur.github.io/lightgallery.js/
Other
5.3k stars 596 forks source link

Issue with dynamic videos (isVideo function) #76

Closed denhaidash closed 4 years ago

denhaidash commented 7 years ago

Hi!

Could you please check your Plugin.prototype.isVideo function? It seems there is a logical error which doesn't allow me to create dynamic HTML5 video player.

You do the following check if(!src) { throw new Error("Make sure that slide " + index + " has an image/video src"); }

and then the second one which will never happen if there is no src due to the first check if (!src && html) { return { html5: true }; }

BTW, thanks for the cool library!

rkimaoui commented 6 years ago

for videos, i get this error too: Make sure that slide 0 has an image/video src

sachinchoolur commented 4 years ago

Fixed