Button to open video

hello,
I would like to have a video open when pressing the “watch trailer” button. Here is an example of what I would like to achieve. https://drive.google.com/file/d/1deHbBbqPGLJ9vPkma3kwsb1de8VJz5_Z/view
Please advise on how to go about this. the curret url is: https://warriorsofstone.com/
Thank you

Hello @Jennine,

Thanks for writing to us.

In order to open a video on the button click I would suggest you please add a Modal element where you can insert the video element. In case you have not seen the doc of the video element and modal element please have a look at it to learn more about how to open a video on button click event.


Architecture-Portfolio-Page-Cornerstone

Hope it helps
Thanks

hello,
i have implemented the modal and the video element. i wold like it to be full screen as shown in this example.


As of now it looks like this: https://warriorsofstone.com/
I would also like it to auto play. Thank you for your help

Hello @Jennine,

In case you want the modal content to be full width I would suggest you please go to the Modal —>size—>you need to set the max-width as 100%. Please have a look at the given screenshot below.

Hope it helps
Thanks

Thank you. How can I get it to autoplay?

Hello @Jennine,

It seems that you have embedded the Youtube video, regretfully there is no option for autoplay on the element. To make it auto play you need to add these parameters in the iframe code autoplay=1

Please check the iframe code in the secure note.

<iframe width="560" height="315" src="https://www.youtube.com/embed/PSodvqiNEH4?rel=0;&autoplay=1&mute=0&loop=1&playlist=PSodvqiNEH4" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>

Hope it helps
Thanks

thank you that worked but when I press the close button the sound is still on.

Hey @Jennine,

Please add the following custom attribute data-rvt-offscreen-reset to your modal.

thank you that worked great

Hey @Jennine,

You’re welcome!

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