12% off of LTD using this coupon: TWELVEPERCENTOFF. Promo ends on 2 Dec midnight UTC.
Published on Jun 9, 2019

How to autoplay a YouTube video in Oxygen’s modal

Sridhar Katakam

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!

tagschevron-leftchevron-rightchainangle-rightangle-upangle-downfolder-omagnifiercrossmenuchevron-downarrow-right