How to autoplay an embeded YouTube video?

Topic summary

A user is trying to autoplay an embedded YouTube video on their Shopify homepage. They used code from embedresponsively.com but cannot get autoplay to work.

Solution provided:

  • Add autoplay parameters to the YouTube embed URL
  • Modify the iframe src to include ?autoplay=1&mute=1
  • The mute parameter is necessary because most browsers block unmuted autoplay videos

Additional resource:

  • A video tutorial was shared demonstrating how to implement YouTube autoplay with both YouTube-hosted and self-hosted videos

Note: The original code in the post appears corrupted or reversed, making exact implementation details difficult to verify.

Summarized with AI on November 11. AI used: claude-sonnet-4-5-20250929.

Hi friends,

I have a custom liquid section on my home page that only contains a YouTube video embedded responsively using https://embedresponsively.com/. I copied the code generated from ER to my Shopify.

The only issue I have is I can’t figure out how to play the video automatically. Code is below.

Thank you.

.embed-container { position: relative; padding-bottom: 45.25%; height: 0; overflow: hidden; max-width: 100%; } .embed-container iframe, .embed-container object, .embed-container embed { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }

Hi @amventures ,

Please change all code:


  <iframe src="https://www.youtube.com/embed//yOWdqxx4HeI?autoplay=1&mute=1" frameborder="0" allowfullscreen=""></iframe>

Hope it helps!

Check out this video tutorial. You can use both Youtube and Hosted vid with Autoplayhttps://youtu.be/HzlkFuKEO4w