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

Viewing 6 replies - 1 through 6 (of 6 total)
  • Hi, if you are using the (hidden) Inline Content method, then yes the video will keep playing as it remains inline even when hidden. If you use iFrame for video content then the player will stop on close.

    Where are your videos hosted? Youtube or similar video platform or on the same hosting space as your website?

    Thread Starter palombarda

    (@palombarda)

    Hello, thanks for your fast answer.

    My video is on the same hosting space as my website

    OK, so I suppose you are currently using the Inline Content method then?

    The simplest solution would be to host it with a cloud provider like Youtube, Vimeo or Dailymotion which will allow you to activate and use the supported platform in the FancyBox settings. Other advantages are that (1) streaming the video will not cost you bandwidth that should be reserved for your website and (2) the best cross-device compatibility is guaranteed by the platforms own video player.

    But if you wish to keep the video(s) on your own platform, then it depends on how you are currently embedding the video. Are you using the same player embed plugin as mentioned on https://wordpress.org/support/topic/video-continue-playing-after-closing-fancybox/?

    Thread Starter palombarda

    (@palombarda)

    Hello,
    Yes, I’m using the inline method. I can’t upload these videos to youtube or similar, so I have to keep it on my server.I’m not using any plugin, I’m just using the HTML5 video tag.

    Thank you

    Try this in your theme footer.php file after the wp_footer() call:

    
    <script type="text/javascript">
    jQuery(document).on('fancybox-cleanup', function(){
    jQuery('video,audio').trigger('pause');
    });
    </script>
    
    Thread Starter palombarda

    (@palombarda)

    Thank you very much!! It works perfect!! 🙂

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