Open arnowelzel opened 3 years ago
Hello Arno, do you have any plans to implement videos in the near future? I would really love to see this feature as I shot some short video clips which I would like to integrate in my blog together with the photos. The perfect/intuitive way would be to have an all-in-one solution.
I found that most video gallery / lightbox plugins require you to buy a pro-version to have video support, so having such a capability in an open source plugin would be a pretty unique and advanced feature!
About the mouse-click inside a video frame: I think it would be okay if the mouse click starts/stops the video and the full screen button could be used to trigger the lightbox. Do you think this is an option?
No, videos with a custom player for that are not planned anytime soon. PhotoSwipe does not support videos and adding this is not a simple task since this would involve to create a video player - and this alone is can be at least as complex as the whole PhotoSwipe library. Just adding the <video>
element with a few controls is not enough to cope with all special cases like mobile devices, different supported formats, HLS playback and so on.
One thing which may be possible in the future is to support certain types of oembed types like YouTube or Vimeo and embed the iframe of these oembeds as custom HTML slide to PhotoSwipe, similar to the Google Maps example at https://photoswipe.com/custom-content/.
However - at the moment I am really busy and don't have time for such a task. But as always - pull requests are welcome! Open Source is not primarily "you get software for free" but "contribute to it" - either with time working on it or money sponsoring the work. If you can't do it on your own, maybe you find people helping with that.
Also see https://wordpress.org/support/topic/is-it-possible-to-display-videos-youtube-in-the-lightbox/
According to https://photoswipe.com/documentation/custom-html-in-slides.html PhotoSwipe itself can also display HTML code and not just images so it would be possible to includes video elements on the page as well. However the frontend script only adds images to the gallery and videos would be a total different thing (different selector and additional handling to create the required HTML code for the video).
A problem which is not solved yet: how to open a lightbox for the video? When clicking inside a video frame, that click is sent to the server hosting the video and not any event handler of the frontend.