-
AuthorPosts
-
February 22, 2017 at 1:47 am #750220
I’ve read through the dozens of threads over the years about opening a Youtube video in a lightbox with a review thumbnail generated by Youtube.
It seems this is impossible unless I create an image of that links to the Youtube video? But that means manually generating a thumnail? Is there another way to do this?
It would be so nice if the video element had a lightbox option. Right now the video element produces a huge sized video (full screen) unless you put it in a layout element, but then if you do that the video is very small.
I have also seen this option in Enfold support forums:
Click me to open a videoBut that does not generate a thumbnail / picture for the user to click on… just a “click me” text.
It seems counter-intuitive to use the image element to display a video element, but is that the current workaround, or is there something I’ve missed? And any way to auto-generate the Youtube thumbnail ?
Thanks
February 22, 2017 at 3:17 am #750230PS Based on another thread I saw from Yigit, I made sure the url is full length and still lightbox only opens in mobile, not in desktop:
Thanks!!!!
February 22, 2017 at 9:51 pm #750696Here’s where I am now… but it took me all morning for something that should be really simple….
http://www.thomashenthorne.com/marin-luxury-homes-sizzle-reel/
I ended up pulling the thumbnail from Youtube, then going into Photoshop and creating an image with the red “play” button graphic, then merging those two, then saving as an image, then linking the image on the page to the Youtube video but with the special format Yigit suggested in different thread to different user, then I had to create “only_desktop” css class because on mobile this version doesn’t work (have to hit two clicks) whereas the normal insert video element works great on mobile (e.g. launches Lightbox).
The video element on desktop should also by default launch a lightbox… this is a lot to go through just to have a Youtube video launch in lightbox, yes?
Help…..
Thanks!!!!!!!!!!
RobFebruary 22, 2017 at 9:57 pm #750701Hi,
Please feel free to request – or vote if already requested – such feature on Enfold feature request form.
Alternatively, you can try using this plugin – http://tubepress.com/. As far as i know, it generates thumbnails automatically. If you would consider this plugin, please contact plugin authors and ask them if they had any experience with Enfold. I remember a user was using it on Enfold but i am not sure if they are still compatible :)
Best regards,
YigitFebruary 22, 2017 at 10:01 pm #750702Thanks for your response as always, Yigit!
I was afraid that was going to be the case, that launching a video in lightbox in desktop is an enhancement even though in mobile that’s already the behavior. I think this is something between a bug and an enhancement but I won’t debate…. :)
The issue I run into and the reason I’m using Lightbox for the video is that if I just use the video element, it’s HUGE on the page…. and if I put it inside a layout element (1/5 + 3/5 + 1/5) then it looks too small (Goldilocks…)
Is there a different way to get at the goal, which is to have a nice centered video that is larger than the 3/5 above but smaller than the full screen that the video element produces?
Thanks!!!!!!!!
February 22, 2017 at 10:12 pm #750711Hey!
Could you please try adding your video element inside a color section element with a unique ID – http://kriesi.at/documentation/enfold/wp-content/uploads/sites/2/2013/12/color-section-ID.png and add following code to Quick CSS to control the width? :)
#your-unique-id .container { max-width: 900px !important; }
Cheers!
YigitFebruary 22, 2017 at 10:16 pm #750715That is a very good idea… I will try that and let you know how it goes!
February 22, 2017 at 10:20 pm #750717Hi!
Great! We will keep the thread open and wait to hear from you :)
Best regards,
YigitSeptember 20, 2019 at 6:20 am #1140118I am going to bump my own thread from a couple years back…. has the ability to launch Youtube videos in lightbox been added to Enfold yet? As I recall, this capability used to exist?
Thanks,
RobSeptember 21, 2019 at 7:42 am #1140408Hi,
The lightbox can be set to open any page content.
If you like to open a youtube video when a thumbnail image is clicked please add “?iframe=true” to the end of the video link in the image element.
For more info please check the below link
Best regards,
VinaySeptember 21, 2019 at 4:56 pm #1140485I have seen the iframe=true recommendation in other threads and feedback from users is that it no longer works.
I tried it in this format:and there was no change in behavior. Same if I get rid of the rel=0 parameter.
It appears from this Youtube developer URL that there is a way for Enfold to include this capability:
https://developers.google.com/youtube/player_parameters“Embed a player using an <iframe> tag
Define an <iframe> tag in your application in which the src URL specifies the content that the player will load as well as any other player parameters you want to set. The <iframe> tag’s height and width parameters specify the dimensions of the player.If you create the <iframe> element yourself (rather than using the IFrame Player API to create it), you can append player parameters directly to the end of the URL. The URL has the following format:
https://youtube.com/watch?v=VIDEO_ID
The <iframe> tag below would load a 640x360px player that would play the YouTube video M7lc1UVf-VE. Since the URL sets the autoplay parameter to 1, the video would play automatically once the player has loaded.
<iframe id=”ytplayer” type=”text/html” width=”640″ height=”360″
src=”https://www.youtube.com/embed/M7lc1UVf-VE?autoplay=1&origin=http://example.com”
frameborder=”0″></iframe>”I tried adding the above code to a code block on a dummy page and it does not launch lightbox either… are you sure Enfold is set up to do lightboxes for Youtube? Maybe Gunter can add a checkbox option to the video media element?
Thanks!
RobSeptember 25, 2019 at 2:07 am #1141646Hi,
Thank you for the update.
You don’t need to add the iframe parameter as long as you’re using the correct URL format. Add an image element, set the link manually and put the youtube URL. You can also use a text link if you want.
https://www.youtube.com/watch?v=HwKzLYeeOMs
The lightbox script will be automatically activated because the URL contains the string “youtube.com/watch”.
Best regards,
IsmaelSeptember 25, 2019 at 2:44 am #1141651Ismael,
That’s interesting – thanks… so we use an image element and then use a Youtube link. That does work – but I’m curious, why doesn’t this work on the video element?This seems like an odd workaround? Is there a way to get the “play” button to appear the entire time vs. just on hover… when people see the image they may not realize it’s a video.
And then on mobile, it just looks like a photo and you can’t tell it’s a video if you click.. what do you recommend? Use photo element with link for desktop and use video element with link for mobile? It would be so wonderful if video element would just do this… ;) Or is there another solution?
Thanks!!!
RobSeptember 25, 2019 at 3:06 pm #1141833Hi!
Thank you for the update.
You can create an image with a custom “play” button in it — usually contained in a dark transparent background. That should be sufficient to tell the users that there is a video element in the page.
Regards,
IsmaelSeptember 25, 2019 at 6:28 pm #1141911That’s a lot of work just to get a lightbox… but thanks, I have taken this approach in the past and had forgotten it.
You have to:
1. Create image with play button
2. Insert via photo element with custom link
3. Code as display on desktop only
then
1. Insert video element
2. Code as mobile onlyGlad to hear from another thread that Gunter has added this to the future workflow…. given how pervasive video is now I would hope we can have an easier solution soon. Thanks for reminding me of this approach! OK to close thread.
Best,
RobSeptember 26, 2019 at 1:45 pm #1142264Hi,
I cannot reproduce on my android phone that a youtube video opens in lightbox – using video element (see link in private content). The link below opens in the lightbox.
Seems to be OS depending ?Best regards,
GünterSeptember 26, 2019 at 5:00 pm #1142400Hi Günter,
Perhaps it is… I have iPhone, and the video element launches perfectly in a lightbox.
Please let me know if I can be of any assistance.Best regards,
RobSeptember 30, 2019 at 3:01 am #1143189Hi,
Looks like @Guenter is starting to implement the script, which will allow the video element to directly open inside a lightbox. It will probably be included in the next release.
Thank you for your patience.
Best regards,
IsmaelOctober 1, 2019 at 5:16 pm #1143848Hi Hi Günte & Ismael,
I was excited to download and install the new Enfold version which allows desktop lightboxes! Thank you!
I learned it is definitely important to use the specific video url format Ismael listed above. I did notice that the rel=0 parameter, which causes Youtube to only show related videos from your own channel when user pauses or ends video, is not working. Is that being passed to Youtube?
format: https://www.youtube.com/watch?v=HwKzLYeeOMs?rel=0Thanks,
RobOctober 1, 2019 at 5:29 pm #1143856Bad news… when I push this from staging (no caching) to production (WP Engine server side caching) the video does not play… when you click ‘play’ it does not launch the lightbox.
Here’s a page I created for you where you can see behavior and any console errors if that helps:
https://www.thomashenthorne.com/for-gunter-and-ismael/
Thanks,
RobOctober 1, 2019 at 5:38 pm #1143857Hi Rob!
Hope you are doing well :)
I checked your page but it loaded fine on my end. I attached a screenshot in private content field. Could you please flushing browser cache and check once again?
Best regards,
YigitOctober 1, 2019 at 5:59 pm #1143861i use for the links only images – take what ever you like – and on that image i paste in a youtube link
i wrote a little jQuery script to get the image from youtube itself – but i take for it always the mqdefault.jpg from youtube.
Not all videos got hd preview images.
they are all at:https://img.youtube.com/vi/'+ ID +'/mqdefault.jpg
if you like to change it to :
default.jpg (default size)
mqdefault.jpg (Medium Quality Version)
hqdefault.jpg (High Quality Version)
maxresdefault.jpg (Maximum resolution)so see the script-file and in use on : https://webers-testseite.de/youtube-videotestseite/
on top there is a masonry gallery with custom (youtube) links : all with watch?v=
on the bottom there are images with custom (youtube) links – dito all with watch?v=PS: the code on that page is only for that page-id : you had to get rid of that if you like to use it globaly
and: that code field has on top right a copy buttonOctober 1, 2019 at 7:08 pm #1143891Yigit! Good to hear from you again!
Thanks much – you are right, I flushed browser and it works! I can’t believe after all these years that still trips me up haha. :)
Any ideas on the rel=0 (related videos only for your own channel)?
Thanks!!
RobOctober 1, 2019 at 7:11 pm #1143893Thanks 007…. I don’t think my abilities are there yet…. hoping that I can just get the new video element working… so far the new one is great, just hoping I can get the rel=0 to work.
Thanks!
RobOctober 1, 2019 at 7:22 pm #1143896if you have an account on yourtube and the videos are yours – you can setup this in your youtube settings.
Then only related videos are shown from your channel.October 1, 2019 at 7:31 pm #1143901Hi 007, my channel is set up this way and rel=0 works fine without lightbox element enabled. I am guessing it’s something with the coding where rel=0 isn’t being handed off to the Youtube API.
Thanks
October 3, 2019 at 10:44 am #1144429Hi,
You need to use ampersand before the rel parameter because the URL query string already started when we define the video id (v).
https://www.youtube.com/watch?v=HwKzLYeeOMs&rel=0
Best regards,
IsmaelOctober 3, 2019 at 4:30 pm #1144533Thank you so much!! Lightbox now works perfectly on desktop and mobile. Thank you!!
Excellent support is the main reason I have been using Enfold for so many years now. You’re all invited to the next premiere party!
OK to close ticket.
Thanks and best,
Rob -
AuthorPosts
- The topic ‘Open Youtube Video in Lightbox’ is closed to new replies.