Pause Wistia video when custom modal closes

Hi, everyone!

I’ve seen other posts about this, but they always assume the use of Webflow’s video element. That’s not my case, I’m using a custom embed to call a Wistia iframe.

You can see it by clicking on the African continent once you access my link.

What I wished was for the video to stop or pause once I close the modal. By the way, I have two triggers to open and to close the modal, which got me confused when trying some other custom solutions.

I tried various solutions with no success so far. :frowning: So any help is much appreciated!


Here is my site Read-Only: [LINK]
(how to share your site Read-Only link)

Wistia has a JavaScript API that you can use to control the player.

You would need to add an eventListener on the button or element that closes the modal. See => EventListener - Web APIs | MDN

1 Like