dbrekalo / simpleLightbox

SimpleLightbox is lightweight and responsive lightbox library with no dependencies. Display images, galleries, videos or custom content and control your lightbox with easy to use api.
http://dbrekalo.github.io/simpleLightbox/
MIT License
263 stars 76 forks source link

youtube-nocookie.com not working #26

Closed sander-lameco closed 1 year ago

sander-lameco commented 1 year ago

It seems like it only picks up youtube.com embed URLs and not youtube-nocookie.com embed URLs. It just keeps showing Loading....

Example:

# Does work
https://www.youtube-nocookie.com/embed/7PIji8OubXU?feature=oembed&autoplay=1&playsinline=1&dnt=1

# Does not work
https://www.youtube.com/embed/7PIji8OubXU?feature=oembed&autoplay=1&playsinline=1&dnt=1

Maybe it is a detection thing in the code that is preventing it?

sander-lameco commented 1 year ago

Sorry I missed the videoRegex options, so I updated it to: videoRegex: new RegExp(/youtube.com|vimeo.com|youtube-nocookie.com/i)