Viewing 1 replies (of 1 total)
  • Plugin Author Arno Welzel

    (@awelzel)

    No, this will not happen soon.

    Images in the HTML output will be recognized by scanning the HTML code and using all links which link to an image. This sounds quite simple – but still the code for everything is nearly 500 lines of code to take care of all the special cases created by different kind of galleries and page builders to determine the captions and meta data properly.

    Also see https://github.com/arnowelzel/lightbox-photoswipe/blob/main/assets/ps5/frontend.js

    Yes, PhotoSwipe can use HTML elements instead of images in the collection – this is what I have done to support SVG images. But with videos it is another story – for SVG I just created one simple HTML template which can always be used in the same way.

    Videos are not just simple link elements but iframe elements which have to be parsed to determine if that is a video at all (and not another type of oembed element) and how the embed works. Also the video plugin (https://github.com/dimsemenov/photoswipe-video-plugin) can not be used since YouTube does not provide a simple video source but uses its own HTML code with an iframe element. That element needs be resized as well inside the lightbox.

    So overall I assume to make this possible at least a number of days of work and not just a simple script extensions.

    But as always: pull requests are welcome and will be credited of course!

    • This reply was modified 1 year, 12 months ago by Arno Welzel. Reason: Correct link to frontend script
Viewing 1 replies (of 1 total)
  • The topic ‘Youtube videos in the gallery’ is closed to new replies.