fancybox pro with mp4 videos and autoplay

Home Forums Easy FancyBox Pro fancybox pro with mp4 videos and autoplay

This topic contains 5 replies, has 3 voices, and was last updated by  RavanH 1 month ago.

  • Author
    Posts
  • #11860

    Mona Reilly
    Participant

    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?

  • #11862

    Pharéo
    Participant

    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…

  • #11865

    Mona Reilly
    Participant

    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?

  • #11950

    RavanH
    Keymaster

    Hi Mona, sorry for our late response. We are currently working on a way to keep aspect ratio for video / iframe. We hope to have something soon…

  • #12020

    RavanH
    Keymaster

    Hi Mona, if you update Easy FancyBox to version 1.7 from your site admin, you should get reduced frame size on small screens with respect of original aspect ratio, and resizing on screen rotation.

    Let me know how it works out 🙂

  • #12021

    RavanH
    Keymaster

    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 🙂

You must be logged in to reply to this topic.

Site by Pharéo | Hosted on The Permanently Moving Network