• Resolved vespino

    (@vespino)


    I have activated the YouTube option and seeing the following code, but YouTube links are not opened in a Fancybox but instead the user is sent directly to the link.

    <a href="https://www.youtube.com/watch?v=YPwLycYJ3yg" class="fancybox-youtube"> <img data-original="https://www.ernstbobbie.nl/wp-content/uploads/bfi_thumb/Geklungel-website-plaatje-o8ti003xjdwe9mvgwzvuz4y701nj7h2j0ou8o0knrc.jpg" alt="" class="lazy" src="https://www.ernstbobbie.nl/wp-content/uploads/bfi_thumb/Geklungel-website-plaatje-o8ti003xjdwe9mvgwzvuz4y701nj7h2j0ou8o0knrc.jpg"></a>

    I’m testing with the following link: https://www.youtube.com/watch?v=YPwLycYJ3yg

    How can I troubleshoot?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hi, are you using a stats plugin with outbound click tracking enabled? That might be interfering. If you can share a link to the web page where you are having trouble, I can take a look…

    Thread Starter vespino

    (@vespino)

    Thanks for the tip, that is indeed the case. Any work around? This is my test page: https://www.ernstbobbie.nl/youtube-fancybox/. When disabling outbound tracking the Fancybox works perfectly.

    Thread Starter vespino

    (@vespino)

    Nevermind… I added a check to the tracking jQuery that checks if a link has a class called “fancybox-youtube”. If it does, not tracking. Boom.

    But better solutions are of course more than welcome.

    A suggestion: the YouTube popup size is pixel based. Could this be made to percentage based?

    • This reply was modified 5 years, 3 months ago by vespino.

    But better solutions are of course more than welcome.

    No, no better solution than what you found yourself.

    the YouTube popup size is pixel based. Could this be made to percentage based?

    Percentage based would make the window aspect ratio dependent on the visitor browser window. This is usually not suitable for video.

    But as long as the option “Scale large content down to fit in the browser viewport” is checked, the popup will always be scaled down for smaller devices. So you can safely set a high popup size like 1500×844 (keeping the desired aspect ratio, 1500 is max width) for Youtube videos ??

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘YouTube video not opening in Fancybox’ is closed to new replies.