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!

Need help implementing a tutorial in your site or want to hire me for custom work?

HIRE ME

Find the article helpful and wish to donate?

DONATE

Comments

You need to be logged in to view and post comments.
Not a member yet? Join here.
magnifiercross
>
linkedin facebook pinterest youtube rss twitter instagram facebook-blank rss-blank linkedin-blank pinterest youtube twitter instagram
%d bloggers like this: