Stop a video when folding an accordion...Ideas?

Hello there !
I have almost finished my portfolio with blocs, very happy with this first website.
I have a last thing I want to fix : AutoStop a video when folding an accordion.
My website is composed of imbricated accordions, with videos inside, and during the navigation, the AutoStop/Fold action would definitely add smoothness to the navigation.
Obviously, I don’t code. Any idea/action/custom attributes to solve this ?

The website is already online :
www.davidhaddad.com

Thanks !

1 Like

Pretty sure you could do this using the collapse as an event trigger to reset the video.

hide.bs.collapse

See the bottom of this page.

There is a thread here doing the same thing with Modals when closed, the concept is the same.

1 Like

Hi @PeteSharp
Seems sweet, I´ll test that in a few days when I’ll get back at the office,
Thanks !

Hello @PeteSharp, really sorry for the delay, I was not able to work on it before…
I understand vaguely the logic, but I don’t see how to implant and apply it, sorry :confused:
I’ve searched for this Modal thread, I’ve found this : Video in modal overlay doesn't stop playing when closed - #8 by PeteSharp and this Video in modal - #26 by KBConcepts about stopping a Modal video.
I found this great website https://blocs.pt from @Pealco with a autostop scrolling video script.
I’ve tried, but nothing happened.
Although I don’t find any issue, the solution seems really close to all that.

Yes, I don’t understand nothing in code :stuck_out_tongue:

Thanks !

Hello @doud I think if you follow all the instructions in my website, the only issue is probably in export. Did you turn off the export option “Enable Lazy Loading”?
Try if not and let us know…

Here to help you if you need…