Lightbox with embedded (iframe) YouTube video

Home Forums Tucson – Responsive HTML5 Template Lightbox with embedded (iframe) YouTube video

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #10010507
    siengtom
    Participant

    Hello! Is there any way for me to use the “Lightbox” code, listed on your Tuscon Shortcodes page to pop open an imbedded YouTube video (iframe) instead of an image? I love how it darkens the whole page and displays the image, but I would like to display a YouTube imbed video instead. I’ve seen your suggested code which takes the browser to YouTube but that’s not what I would like to do. Thank you.


    #10010513
    Support
    Keymaster

    Hello, sure, please try this:

    <a class="popup-youtube" href="http://www.youtube.com/watch?v=0O2aH4XLbto">Open YouTube video</a>

    (js/custom.js)

    $(document).ready(function() {
    	$('.popup-youtube, .popup-vimeo, .popup-gmaps').magnificPopup({
    		disableOn: 700,
    		type: 'iframe',
    		mainClass: 'mfp-fade',
    		removalDelay: 160,
    		preloader: false,
    
    		fixedContentPos: false
    	});
    });

    Kind Regards,

    Jonas


    #10010520
    siengtom
    Participant

    PERFECT Jonas. Just one more thing please Sir, running this script on the iPad will not AutoPlay. Is there a way to enable autoplay so all browsers and devices with auto start? THANK YOU!!!


    #10010521
    Support
    Keymaster

    Hi, autoplay cannot be enable to work on iOS devices (iPhone, iPad, iPod touch) and Android.

    “To prevent unsolicited downloads over mobile networks at the user’s expense, embedded media cannot be played automatically”.

    Kind Regards,

    Jonas


    #10010522
    siengtom
    Participant

    Thank You Jonas. You are THE BEST!
    Warmest regards,
    Tom


Viewing 5 posts - 1 through 5 (of 5 total)

This topic is marked as "RESOLVED" and can not rceive new replies.