Search code examples
iosmobileyoutubefancyboxlightbox

fancybox3 image button iframe youtube video


My client's site usesfancybox to load a lightbox for an embedded YouTube video. Clicking on the "play" image button in the middle of the video launches an embedded YouTube video.

This works fine on desktop, but will not work on my iPhone X (iOS 12). It will sometimes work for other iphone users after 3-4 clicks on the play button, but I cannot load it at all.

What should I be looking at to fix this on iOS? This is driving me crazy!

Page in question: https://www.maternlawgroup.com/


Solution

  • First, fancybox works fine, you can clearly see on the homepage or any other demo.

    Secondly, in situations like this, you should start by checking output of browser console. There are a lots of JS errors on your page (not related to fancybox) and any JS issue can prevent further execution of the code. So, start by fixing them.

    And last, I could not find fancybox on your page. It looks like you are using buggy custom JS code.