Vimeo video in popup sound keeps playing

Hi, looking for help with this:
I have a direct embed, no autoplay, Vimeo video in a popup on my site. But when I close the window the audio keeps playing, it only stops if I reopen the popup and pause the video. Same thing happening in Safari and Chrome. How can I fix this?

Please help it’s the last bug fix before the site goes live this week. :slight_smile: Everything else is working beautifully thank you Sparkle!

The only way i found to fix this is to have the pop-up be manually closed on a button.

Check out this page, open the “About Me” pop-up and then play the video. The only way to get the pop-up out is to either close via the X button or open another pop-up (which have all the same ID so one needs to close so the other can open).

If you allow to click outside the popup, the video will keep playing on the background

2 Likes

thanks that works! It’s a shame to lose the click outside usability, but glad this works.

I’m sorry but I couldn’t reproduce this issue. Would you mind setting up a simple project file with the two cases, one where the video stops correctly, the other where it doesn’t. Send it to feedback@sparkleapp.com.

We’ll look into it.

Hi Duncan, thanks! Here’s with the vimeo audio continuing to play:

Popup window ping Vimeo

I didn’t realize, before I tried unclicking the ‘Click outside’ my programmer had gone in and included some javascript to fix it, this works for the close button, but potentially if we use the popup window id, it would work for ‘click outside’ too:

<script>
window.addEventListener('load', function() {
  $(document).ready(function() {

    var videos = document.querySelectorAll('iframe');
    $("#video-1-close-button").on("click", function () {
        videos.forEach(i => {
            let source = i.src;
            i.src = '';
            i.src = source;
        });
        return false;
    });
  });
});
</script>

I see no difference in video playback when clicking outside or clicking with the button…

If you don’t press pause on the video and click away the audio keeps playing in both instances, but if I had the javascript in there it didn’t keep playing.