-
Video in Lightbox
I want to put some thumbnail images on my site that represent videos, and then have the videos open (playing from Youtube) in Lightboxes when they are clicked. I can see how to make popup photos but can't find a way to use this with videos. Any ideas how I can do it? I've done some searching and have found a couple of paid tools, but I'm ideally looking for a free solution. I'm happy with some coding if necessary.
-
Re: Video in Lightbox
Maybe this THREAD is similar to your requirement?
-
Re: Video in Lightbox
Many thanks for this, Siran. I don't think I'll be able to make this work, for two reasons. First, because my website has variants, and pop up layers do not work properly in variants when the site is viewed with Safari on iOS devices (Xara confirmed a bug following a report from me earlier this week). But also, the links to the videos will be near the bottom of my page, rather than at the top, so I need to set the popups to appear in the centre of the viewport, rather than at a specific location on the page. That's why I'm thinking I need a lightbox solution, unless you can think of a way to centre a pop-up layer?
-
1 Attachment(s)
Re: Video in Lightbox
Did a quick example with a jQury plugin. See license information and plugin address in the example file.
-
Re: Video in Lightbox
-
Re: Video in Lightbox
Thanks Egg, but in the meantime I recognized it is quite limited. Hard coded sizes and such. :( Maybe if there is some time available I'll try to get some flexibility ouf of it...
-
Re: Video in Lightbox
Siran
That is very good. Would have to play around with a variant to see how it would work but I really like this.
Thanks for posting.
Ray
-
Re: Video in Lightbox
Thank you very much for this, Siran. It's excellent and works in just the way I need. I'd like to make the border a bit narrower, and have a line of caption text below the video in the lightbox, but I can play around to create that.
One thing I'm not sure about though: how can I make this work in a website that has multiple variants? I'm thinking that the dimensions of the lightbox might need to be defined as percentages, but not sure how I'd go about that!
-
1 Attachment(s)
Re: Video in Lightbox
Here is a starting point to play with.
It is a widget that you have to drag to your document (one for each video, but you can copy and paste it once you have made your basic settings).
Enable the re-generate placehoder option to see the changes made to the button.
The button and its mouse over state are groups, you should use right click and open group to edit them. Same with the close button.
The caption is displayed as an H1 element, so you should be able to style it using CSS. (Set caption height to 0 to not create one.)
Seems to work with variants, but the video keeps playing when you resize and a different variant is displayed.
Beware, this is only partly tested!
Hope it is useful anyway. ;)
-
Re: Video in Lightbox
Siran,
This type of coding is not something that I do with Xara. So I am trying to take a look and learn how it is done and I am missing something.
I looked on the website you referenced but I can not find the code it lists anywhere in the Xara file. Can you explain where this code is living at? Looking at the original file I see where you gave the names but I can not find where anything calls any code.
Thank you
Ray