Video in modal window to stop playing...

User 2816828 Photo


Registered User
23 posts

I am building on Foundation in RSD2 and have a video that comes up using the reveal modal. If you close out of the video while it is still playing it keeps playing in the background and you can still hear the audio. Any one know a way for it to stop playing once the modal window is closed?

I uploaded an example to http://dev.lonegrainger.com/reveal-modal-video

If you play the video and then close out of the modal window by clicking on the background before the video is over the audio keeps playing in the background. Hoping to find a solution where once it is closed out of the video stops playing.
I've attached an example file if that helps as well.

Thanks!
Attachments:
User 244626 Photo


Registered User
811 posts

In Foundation Framer you will need the additional attribute data-reset-on-close="true" added in the reveal container.

http://foundation.zurb.com/sites/docs/reveal.html
Bootstrap 5 CSS Grid.
User 2816828 Photo


Registered User
23 posts

Thanks Twinstream!

Was totally searching everywhere on that docs page, not sure how I missed it.
Really appreciate you responding! Thought I was going to have to go about it in a super long round about way.

Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.