Archived topic
Embed Videos
12 replies · Started by Leon on July 16, 2017
Hi Tom
I like your videos on the generatepress home page. I noticed that they are actually pictures and when I click it, videos will popup.
May I ask if you are using a plugin or embed code from Vimeo or?
I tried to embed videos from youtube using iframe, or popup plugins. But they all load the video when the page loads, which is not what I want. Because youtube is blocked in China and because I want it to load only when user clicks so it doesn't influence the page load speed too much.
Would you mind to share? :))
Thank you!
Leon
Hi there,
Looks like it's just a normal link with a picture: https://s13.postimg.org/sbr7uyjgn/genvideo.png
Hi Leo,
If i insert a normal link on the picture, when I click it it'll go to the video page, not a lightbox that plays the video.
Anywhere I made it wrong?
Thanks
Leon
Ahh I think Tom is using something like this: http://sorgalla.com/lity/
Hi Leo,
It's too complicated for me to get the lity to work. But thank you for your time!
Leon
A plugin like this might simplify things a bit: https://en-ca.wordpress.org/plugins/wp-featherlight/
Thanks Tom. I installed this plugin. I believe it's getting close even though it's still not working yet.
Here is what I did.
I inserted a picture to a page. added a link to that picture. added the data-featherlight="iframe" as I learned from the doc.
"Featherlight generates an iframe with the 'iframe' keyword and a given url
Open example.com in an iframe
Options iframeWidth, iframeMinWidth, etc. or their corresponding data attributes data-featherlight-iframe-width, data-featherlight-iframe-min-width are used as CSS when present.
$.featherlight({iframe: 'editor.html', iframeMaxWidth: '80%', iframeWidth: 500,
iframeHeight: 300});"
But this is what I got if you can help check my page: https://interpreterdatabase.com/test
I didn't do anything about the the below code:
$.featherlight({iframe: 'editor.html', iframeMaxWidth: '80%', iframeWidth: 500,
iframeHeight: 300});"
Do I also need to put those code somewhere to get it work? If so, where should I put those code please?
Thank you
Leon
Hmm they must make it more simple than that to display videos - have you asked the developer? If you're going to do all that, you might as well go with Lity.
Hi Tom,
Thank you for helping me. It might be a good idea for me to come back and add this function to my website at a later stage. Both of them are too complicated for me right now.
Thank you for taking time.
Leon
No problem, if you want to tackle it just let me know and I'll be happy to help :)
Thanks Tom. You are great.
Hi Tom,
I'm just coming back to say thank you again. I just made Feather Light to work well. And that's your suggestion for me from the very beginning.
Thank you.
Leon
Great to hear! You're welcome :)