Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for videos #60

Open
arnowelzel opened this issue Sep 21, 2020 · 2 comments
Open

Add support for videos #60

arnowelzel opened this issue Sep 21, 2020 · 2 comments
Labels
enhancement New feature or request

Comments

@arnowelzel
Copy link
Owner

arnowelzel commented Sep 21, 2020

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.

@arnowelzel arnowelzel added the enhancement New feature or request label Sep 21, 2020
@ArneVoss
Copy link

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?

@arnowelzel
Copy link
Owner Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants