fancybox pro with mp4 videos and autoplay
Your Account / Forums / Easy FancyBox Pro / fancybox pro with mp4 videos and autoplay
- This topic has 5 replies, 3 voices, and was last updated 8 years, 7 months ago by
RavanH.
-
AuthorPosts
-
-
March 14, 2018 at 8:39 pm #11860
Hello, I have 2 different size mp4 videos, I would like them to open at the right size on a button click and autoplay, and be responsive. Can this be accomplished?
-
Hi Mona, welcome on these forums!
To have similar media links open in different sizes, you can do the following:
1. On Settings > Media activate the option to include the jQuery Metadata extension
2. Then go back to the page where your media links are and add size data to the link class like this example:<a href="//ulr.of/my.mp4" class="button fancybox-iframe {width:480,height:360}">watch my movie</a>Autoplay is not possible unless supported as a GET parameter by the browser like for example href=”//ulr.of/my.mp4?autoplay=true” but I’d be surprised if at all widely supported…
-
March 15, 2018 at 5:07 pm #11865
Thank you so much, I did manage to get this far, the only trouble was that it didnt seem responsive. The window height will not change when the window becomes smaller, since its pre-defined by the iframe. Any way to avoid that?
-
I forgot: it is needed to manually add the (new) option
{keepRatio:true}to the iframe class metadata.This means as per the example from Pharéo above, it would look like this:
<a class="button fancybox-iframe {keepRatio:true,width:480,height:360}" href="//ulr.of/my.mp4">watch my movie</a>In a future version, this will be added as a checkbox option 🙂
-
-
AuthorPosts
- You must be logged in to reply to this topic.
