dimsemenov / Magnific-Popup

Light and responsive lightbox script with focus on performance.
http://dimsemenov.com/plugins/magnific-popup/
MIT License
11.39k stars 3.48k forks source link

Click on MP4 Video Closes Popup and Video Keep Playing #1016

Open cyberwani opened 7 years ago

cyberwani commented 7 years ago

Hi, I am using MediaElement.js and Magnific popup for video in popup. After opening popup when click on play button, video starts playing but content get hide. Check below screenshots.

image image

I am using below code.

$('.my-video-popup').magnificPopup({
    type: 'inline',
    midClick: true,
    callbacks: {
        open: function() {
            $($(this.items).find('video')[0]).each(function(){this.player.load()});
        },
        close: function() {
            $($(this.items).find('video')[0]).each(function(){this.player.pause()});
        },
    }
});

Can you check what is missing in the code.

It's also displaying error when closing popup. TypeError: template.find is not a function

manish-in-java commented 7 years ago

Can you post a fiddle with the offending code?