Support » Plugin: Easy FancyBox » Video continue playing after closing Fancybox

  • Resolved adcdao



    I’m using Easy Fancybox to display video from Amazon S3. For this I use an another plugin Secure HTML5 Video player (I’m in process to replace it with S3 Maestro). The problem with these plugin is when I close the Fancybox the video continue to play.

    Anybody have a solution about this problem?



Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author RavanH


    Hi, I suppose you are using the Inline Content mode? In this case, the video keeps on playing because it does actually remain inline (embedded), even though it is hidden again after closing the light box…

    There are two ways to prevent this:
    1. Not embed the video but link to it (and leave it up to browsers to play the file) or a wrapper HTML page (with a media player) and use iFrame mode by adding class="fancybox-iframe" attribute to the link. This will cause the light box content to be completely removed after closing, similar to what is done with Youtube videos.
    2. Issue a “stop playing” command to the player when FancyBox is closed. What that command is and how to send it, depends on the player. FancyBox offers a javascript event called fancybox-cleanup that you could use to hook onto and issue such a close command…

    Both options are not simple to implement, I’m afraid.

    Thank you Ravan for your answer. Here’s the script that solve my problem:

    jQuery(document).ready(function() {
    jQuery(document).on(‘fancybox-cleanup’, function(){



    Plugin Author RavanH


    Excellent! Thanks for sharing 🙂

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Video continue playing after closing Fancybox’ is closed to new replies.