Viewing 12 replies - 1 through 12 (of 12 total)
  • Plugin Author Daniel Iser

    (@danieliser)

    Sorry for the delay. Do you have a link i can look at? I have code in place that should already address this if using youtube or vimeo iframes. It sounds like your using a different method or source so i may need to add to our existing solution to cover an additional need.

    Thread Starter precizion

    (@precizion)

    Hi and thanks for the reply. I was using amazon to host the video. I was able to figure out how to hook the close button into the videojs pause though. All is good.

    Thanks again!

    Plugin Author Daniel Iser

    (@danieliser)

    Would you mind posting the solution for others to see? I may also include it in the plugin if its a general solution.

    Plugin Author Daniel Iser

    (@danieliser)

    Also please take a moment to rate and review the plugin and or support https://www.ads-software.com/support/view/plugin-reviews/easy-modal

    Thread Starter precizion

    (@precizion)

    No problem,

    jQuery('#eModal-1 .emodal-close').click(function (e){
        e.preventDefault();
      jQuery(".video-js")[0].player.pause();
        jQuery('#eModal-1').emodal('close');
    });

    I just slapped that into one of the JS files for my theme and magic happened.

    Plugin Author Daniel Iser

    (@danieliser)

    Hey precizion, you can actually simplify that a bit.

    v2 of easy modal includes tons of event triggers you can tap into.

    This would work more efficiently and allow further extending of the close button instead of overriding the default click simply add to it.

    jQuery('.emodal').on('emodalAfterClose', function (e) {
    	jQuery(".video-js", this).player.pause();
    })

    This may need tweaking as i changed jQuery(“.video-js”)[0] to select only inside the current modal, and preferably not just the first one but all inside the modal.

    But it will work for all modals after that, you wont have to change anything if you add another video.

    Thread Starter precizion

    (@precizion)

    Nice. Thank you

    Plugin Author Daniel Iser

    (@danieliser)

    NP be sure to rate and review the plugin to let others know about its usefulness.

    Works like a charm!

    Plugin Author Daniel Iser

    (@danieliser)

    Hey tsmulugeta,

    Do you have a link i can check out?

    Where are you adding your JS code, and can you paste the full code here?

    It works, it was my mistake. Thanks for your rapid response!

    Plugin Author Daniel Iser

    (@danieliser)

    Not a problem. Be sure to take a moment to rate and review the plugin and or support https://www.ads-software.com/support/view/plugin-reviews/easy-modal

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘Video keeps playing after closing the popup’ is closed to new replies.