Bind an action to the easy fancybox closing

Forums Easy FancyBox Pro Bind an action to the easy fancybox closing

Viewing 1 reply thread
  • Author
    Posts
    • #8068
      Jean-Pascal Cauchon
      Participant

      Hello,

      Is there a way to bind an action (in my case the starting of a video) to the closing of an easy fancybox ? On the home page of my website, I have video that is masked by an auto openned easy fancybox. I want this video to start when the fancybox is closed.

      Thanks,

      JP

    • #8070
      Pharéo
      Keymaster

      Hi Jean-Pascal, in theory this could be possible but in practice it will be very difficult to implement. You’ll need to integrate both the light box and the video player into your theme manually, without plugins.

      Also, you need a video player API. For example, if using the Youtube player (embedding Youtube videos) you can read how the player API should be implemented on https://developers.google.com/youtube/iframe_api_reference … as you can see, not easy. And once done correctly, you’d not even be ready.

      You’d then need to make the light box script talk to the api on its close action. Relatively easy but still, not possible with the plugin. Only when integrating the light box manually.

Viewing 1 reply thread
  • You must be logged in to reply to this topic.