- Issue created by @w01f
- πΊπ¦Ukraine dinazaur
There is photoswipe-video-plugin which can be used for this. But I'm not sure if that's a good idea to include this module in this project, it may be better to implement separate module for this. Depending on ppl demand I can try to implement such a thing.
- π©πͺGermany Anybody Porta Westfalica
Thanks @dinazaur for pointing this out! I didn't know it yet.
Feel free to provide a submodule as MR or a separate module. We as maintainers won't invest much time here, instead the focus should be Photoshop 5: β¨ [5.x] PhotoSwipe 5 Branch Fixed
- π©πͺGermany Anybody Porta Westfalica
Let's tackle this in 5.x! :) I think video support would be really useful!
- π©πͺGermany Anybody Porta Westfalica
@thomas.frobieter: What do you think about the relevance of this feature for us? Would it help us a lot or possilby not very likely?
I don't think its really worth it (for us). The only thing this might be better then using a simple modal, is that its possible to create combined galleries, with images and videos. But I cant remember that we ever really had the need for this.
Furthermore relying on such a plugin is probably bug prone, if PSWP will ever have this feature baked in.. fine.
But thats just my 2 cent.. if you want to invest time, I wont hold you back ;)
- π©πͺGermany Grevil
Furthermore, relying on such a plugin is probably bug prone, if PSWP will ever have this feature baked in.. fine.
I doubt, that will be the case. Any extra features outside the basic photoswipe implementation is now a plugin (similiar to the photoswipe-dynamic-caption-plugin, which we already use as a submodule). And since the photoswipe-video-plugin is also by @dimsemenov (the creator of photoswipe), I'd say this is a feature we could definitely integrate if we ever need it!
- π©πͺGermany Anybody Porta Westfalica
So our team is not interested in implementing this, until we need it, but happy to review MR's! :)
This should be implemented as submodule to be optional. - π©πͺGermany Anybody Porta Westfalica
Especially with media, where "Video" is a valid media type, this would be nice. Still a feature request and nice to have, waiting for community MR's, if someone needs or sponsors it.
- Assigned to dinazaur
- π©πͺGermany Anybody Porta Westfalica
Cool @dinazaur! :) β¨ [5.x] Add support for the 'PhotoSwipe Tiled Deep Zoom Plugin' as submodule Active might be quite similar, I think.
Both should be provided as separate submodules, please.
- π¨πΎCyprus gregcy
I am interested to give this a try as I do need the combined image and video gallery functionality for a personal project.
What would be the best way of implementing this as a submodule? Should i provide new FieldFormatter options that extends the two current ones (Photoswipe & Photoswipe Reponsive) and allow for videos to also be added alongside the images?
If this approach required some adjustments to any of the PhotoSwipeFieldFormatter functions, would this be acceptable or does it have to be done without any code changes on the core module?
- Issue was unassigned.
- π©πͺGermany Anybody Porta Westfalica
Hey @gregcy, thank you, that sounds interesting!
I think we'll have to see and improve on the way. Try the most clean approach from your perspective. We should only change the existing formatters, if it really applies to both, otherwise it should be separated in the new classes.
Happy to see your implementation.
- π¨πΎCyprus gregcy
Thanks @anybody
Since the media items attached to a field can include both videos and images, and the FieldFormatter renders all items attached to the field at once, I suspect some adjustments will need to be made to PhotoSwipeFieldFormatter's viewElements method. Specifically, I think we will need to adjust it so it ignores non-image elements while still returning the render array for image items, allowing the extending FieldFormatter to call the parent viewElements to get the render array for image elements and then itself handling the rendering of video elements.
Anyway I will give this a shot and do it as cleanly as I can and we can take it from there.
- π¨πΎCyprus gregcy
I have made an initial push to the issue fork.
There are a number of issues and questions that I need answers to and would appreciate some input on them. What would be the best way to facilitate this discussion? Should i create a merge request and add my comments/questions there? Although the module does work I don't think it is ready to be merged into the main code yet.
Thanks
- Merge request !127Draft: Initial Attempt at at integrating the photoswipe-video-plugin to allow mp4 Media to be dispalyed in the photoswipe gallery β (Open) created by gregcy