Stop Playing Video when Modal is Closed

Hello Webflow Community!

I’m trying to figure out a way to pause/stop a video from playing if the modal is closed because currently the audio still plays if a user closes the modal while video is playing. I saw a couple of things on the subject but nothing seems to work.
Here’s my view only project, the pop up video is under “section-1”:
https://preview.webflow.com/preview/iness-portfolio-a761c8-16ce8bc0425a10ea?utm_medium=preview_link&utm_source=designer&utm_content=iness-portfolio-a761c8-16ce8bc0425a10ea&preview=a8b9815bded4ea402a8481f1d83193e7&workflow=preview

Thanks!!


Here is my site Read-Only: LINK

Advanced video behaviours most often require that you use Youtube or Vimeo API in order to control playback.

You can explore two other ways:

Webflow will take care of stopping a video if you use the Lightbox component. And it’s kinda making your popin too. You can try to hack the lightbox with custom CSS to make it look like a popin.

@Finsweet Attributes allow for playback control of a video when it’s in view or not, if it’s a bg video or an html embed video, NOT a YT or Vimeo video Attributes by Finsweet

Oh yeah! That’s so easy haha. Much easier than what I did. Lightbox does all the work. Thanks!!

1 Like

I’ve been hacking this lightbox from Monday to Sunday just because it handles video playback :smiley:

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.