Hello,
I want to embed TikTok and Instagram Reel videos inside a number of Modal elements (V2). I inserted a Raw Content element in the modal and pasted an embed code in it. It shows up fine on the front-end. The problem is that if I open the modal and play a video, it will keep playing in the background if I close the modal. I want the embed to stop or be muted whenever the modal is closed by the user.
I tried using the now deprecated Content Area Modal element, since it has a “Load / reset on element toggle”. (as referred in this thread). The issue with this is that when I load the page, then open the modal, the “video” part of the embed isn’t loaded and instead I see a “View this post on Instagram” button.
This thread talks about giving the attribute data-rvt-offscreen-reset
to a Video element inside a Modal, which mimics the Dynamic Rendering option mentioned above. Is there any way to mimic this Dynamic Rendering option when embedding TikTok and Reels in a Modal?
I also tried to embed these in a slider, but I end up with the same issue - the videos keep playing when browsing the next slides.
Thanks in advance
Emile