Modal Close X button should close Video in the Video Div Block

Hello there,

I have separate models containing video and project summary information. When we close the modal, the video keeps playing in the background. I don’t want to use the embed code because the video link is from the CMS collection. I am new to Webflow, please help.

Regards,
Shayan

Maybe set the video pause/play button at the same place as the close button, so that when you close the video automatically stops.

The Vimeo link is set to each video block. I want to stop the video on closing the modal.

Here you go.

Can you tell how I use this code. I have close X button on Modal class name is “Modal Close button.”?

Please help if somebody has a solution.