This tutorial provides the steps to autoplay a YouTube video in a modal in Oxygen.
Step 1
In Oxygen editor, add a Modal component.
Add a Video component inside the Modal.
Tick “Manually Paste Iframe Code”.
Paste the YouTube video embed code.
Ex.:
<iframe width="560" height="315" src="https://www.youtube.com/embed/d0tU18Ybcvk" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
Add `?autoplay=1` after the video URL.
Ex.:
<iframe width="560" height="315" src="https://www.youtube.com/embed/d0tU18Ybcvk?autoplay=1" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
Make sure you set the Trigger for the modal.
That’s it!