How do I enable autoplay in iframe?

You can have an embedded video from YouTube on your website play automatically when a visitor gets on your page by just adding a simple parameter to the embedded URL. This is very useful for pages such as How it Works or About Us, where the user expects to see some rich content.

Embedded videos which have autoplay enabled will not increase the number of views. Also, be careful when deciding where to autoplay your videos. Auto Played videos sometimes tend to distract and annoy the user and end up causing more harm than good.

Enabling Autoplay Embedded YouTube Videos

Heres how to autoplay an embedded YouTube video. You require very basic code editing skills for this.

  1. Go to YouTube and open the video you want to embed.
  2. Click on Share and then select the Embed
  3. Copy the HTML code from the box and paste it into the page into the HTML code you would like to add the video to.
  4. Add ?autoplay=1 right after the video ID. That is, if the embedded URL was:, adding ?autoplay=1 should look like

  5. Update or Save your changes before exiting and then refresh the page to test if the video indeed plays automatically.

Video liên quan

Chủ Đề