Pausing video on modal close

Hi everyone,

I created a modal to show on a button click — this modal contains a video.

On hiding the modal I want the video to automatically pause.

The interaction I used is to open/close the modal is; show/hide as I’ve found that to be the easiest.

After looking through the forums, there are a few of these but the fixes are done through custom-built models and I can’t figure out how to get it working on mine.

Does anyone know of a quick hack/custom code that I can use?

Here is my public share link: