Home Forums Porto Template Popup-YouTube in Lightbox

This topic contains 2 replies, has 2 voices, and was last updated by  TonyA 3 months, 2 weeks ago. This post has been viewed 258 times

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #10025077

    TonyA
    Participant

    Hi, I am testing a video in the Lightbox using the open-youtube class on the hyperlink, as you have it on the website url, but I want to remove the relative and assiciated videos that display at the end of the video, when it’s finished playing. I tried adding &showinfo=0&rel=0 to the link but they still display. How can I remove those related videos?

    (In a normal youtube embed link using those parameter values will remove the related videos)

    Thanks for any help!

    http://preview.oklerthemes.com/porto/5.7.2/shortcodes-lightboxes.html


    #10025080

    Support
    Keymaster

    Hello, please try this:

    HTML:

    <a class="popup-youtube-2 mfp-iframe" href="https://www.youtube.com/watch?v=83UHRghhars">Click here</a>

    JS:

    $('.popup-youtube-2').magnificPopup({
    	iframe: {
    	  markup: '<div class="mfp-iframe-scaler">'+
    		'<div class="mfp-close"></div>'+
    		'<iframe class="mfp-iframe" frameborder="0" allowfullscreen></iframe>'+
    		'</div>',
    	  patterns: {
    		youtube: {
    		  index: 'youtube.com/',
    		  id: 'v=',
    		  src: '//www.youtube.com/embed/%id%?autoplay=1&rel=0&showinfo=0'
    		}
    	  }
    	}
    });

    Best Regards,

    Jonas


    #10025087

    TonyA
    Participant

    Awesome! That worked great, thanks.


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