Pop up interaction with CMS


I have created a video so I can explain and show my screen !

Thank you in advance

Hi Sheena,

This cloneable has the technique you need.

1 Like

This is perfect ! Thank you !!

This was so helpful!

1 Like

This worked perfect. I want the modal video to auto play when opened and close when the modal closes. Can you help me with this ?

I changed my structure from modal to using lightbox and then adding “&autoplay=1?rel=0&showinfo=0” to the end of the video URL but for some reason they are playing continuously when I scroll the page only on the designer ! Not when I view it after publishing on the custom domain :frowning:

Hi Sheena,

I’m glad you got your CMS modals working. Interesting technique, eh?

Regarding video autoplay and autopause, I could build it for you, but it’s unfortunately not as simple as a config settings.

Autoplay on modal open generally won’t work because the browser doesn’t know anything about the modal as a UX state. It would try to autoplay as soon as the page loads while the video is still hidden. And there, it will reject an autoplay request unless your video is also muted.

Autopause on modal closed is similar, the browser and the video player have no idea what’s happening with the modal.

The solution to both is custom coding. Rather than autoplay, we’d trigger play when the modal appears, and we’d trigger paus when the modal disappears, both would occur with a JS mutationobserver.

Aside from that description I can point you towards a code excerpt you can adapt if you’re a developer, but otherwise feel free to message me if you’d like me to build this out for you.