Search…

X3 Photo Gallery Support Forums

Search…
 
User avatar
Dane
Experienced
Topic Author
Posts: 170
Joined: 04 Dec 2020, 15:05

Video in gallery

27 Oct 2024, 00:49

Hello,

I have just uploaded a video to a gallery and noticed a small difference in the display. The video contains a black frame, and has no distance to the photos in the gallery in the display. 
2024-10-27 05_45_30-Über mich.jpg
2024-10-27 05_45_30-Über mich.jpg (339.85 KiB) Viewed 1344 times
See here: https://www.linsenschuss.de/ueber-mich/

Can I somehow remove the black frame so that the video is displayed like the photos?

And can I have the same spacing for the video as for the photos?

And as a last question, can I optionally set the video to start automatically in this gallery and run in an endless loop?

I am aware that the gallery is not intended for videos, but I thought it costs nothing to ask. Perhaps there is a practical solution. 

Thanks!
 
User avatar
mjau-mjau
X3 Wizard
Posts: 14452
Joined: 30 Sep 2006, 03:37

Re: Video in gallery

27 Oct 2024, 03:18

This was a bit interesting, as I was surprised to see the video integrated into the gallery layout like that. Normally, videos will display separately (below or above the gallery), but it seems that with COLUMNS layout, the video has inherited the columns layout, although that isn't really the intended behavior. In this case, ok you could probably make some tweaks with CSS:

From page Settings > Page > Page CSS:
Code
.layout-columns .x3-style-frame {
  display: block;
  border: 0;
}
.layout-columns hr {
  display: none;
}
It might not align 100% correctly, but I think it should work. Just keep in mind, the video is really only displaying inside the columns layout because of a glitch, as this wasn't intended. The reason I don't add videos into gallery layouts, is because the video is embedded with play buttons and the other image items are clickable and open in popup. The videos won't display in the popup, because they aren't clickable. We can't really create thumbnails from video files, and therefore, we can't really display clickable video thumbnails either, like for images.
And as a last question, can I optionally set the video to start automatically in this gallery and run in an endless loop?
Only this video, or all videos? You could add a javascript snippet. However, one rule of thumb is that it's not possible to autoplay videos that contain audio, unless you mute the audio. This is a browser restriction, and makes sense if you think about it.
 
User avatar
Dane
Experienced
Topic Author
Posts: 170
Joined: 04 Dec 2020, 15:05

Re: Video in gallery

27 Oct 2024, 11:29

Hi Karl,

thank you for the input. I added your CSS code, and now it doesnt have the border. But the position doesent fit well.
2024-10-27 16_24_33-Über mich.jpg
2024-10-27 16_24_33-Über mich.jpg (198.68 KiB) Viewed 1336 times
I have also tried the other views, and the video is then displayed separately. However, it always comes directly first and is very large. I don't think that would be ideal either. 

I would only have wanted the endless loop for this one video, or for videos on this page only. The audio would be a good hint, but would not play a role for this example if the videos had no audio. But I think if the display could not be set up like the photos, I would just leave it alone.

It was just an idea if it was possible, but it wouldn't be important. I'll just take the video out. That's ok.
 
User avatar
mjau-mjau
X3 Wizard
Posts: 14452
Joined: 30 Sep 2006, 03:37

Re: Video in gallery

28 Oct 2024, 00:18

Dane wrote:But the position doesent fit well.
Yes, I can see that. The problem is that X3 uses the width/height attributes of images to calculate their position in the columns layout. Videos don't have a width/height, until after they are loaded into the interface, so this can't be calculated. Unfortunately, as it was never meant to work like this, that is what you will get.
Dane wrote:I have also tried the other views, and the video is then displayed separately.
Yes, and this is by design.
Dane wrote:However, it always comes directly first
Videos will always come either first or last (this is a setting). We can't inject videos INTO the middle of gallery layouts. This is exactly the point why they have to be separate, either before or after the gallery.
Dane wrote:and is very large. I don't think that would be ideal either.
By default, it will display the video as the width of the page where you have embedded it, as long as it does not exceed the pixel dimensions of the video. So essentially, this is correct. You can of course make some adjustments here, if you have some ideas about how you want videos to display.
Dane wrote:I would only have wanted the endless loop for this one video, or for videos on this page only. The audio would be a good hint, but would not play a role for this example if the videos had no audio. But I think if the display could not be set up like the photos, I would just leave it alone.
You can trigger looping for videos, with some simple Javascript, although as noted, it will not autoplay if there is audio. You would just set "mute" in the same javascript that autoplays it. So this would be possible, but the layout of the video(s) is limited, unless you accept the current layout flaw, or have ideas how to adjust the layout of separate videos.
Dane wrote: It was just an idea if it was possible, but it wouldn't be important. I'll just take the video out. That's ok.
In a future version, video will be implemented much better. I can't just make this happen easily with X3, because we need to support an external library FFMpeg that can create thumbnails from videos.
 
User avatar
Dane
Experienced
Topic Author
Posts: 170
Joined: 04 Dec 2020, 15:05

Re: Video in gallery

28 Oct 2024, 01:18

Thank you for the clarification!