How do i make my video autoplay homepage youtube dawn theme

I want my video to autoplay on people loading the site i have tried a lot of code and none have worked it is a youtube link and dawn theme

1 Like

This is Noah from PageFly - Shopify Page Builder App

To make the video autoplay, you can do the following:

Step 1: Online Stores > Themes > Edit code

Step 2: Choose file theme.liquid
Step 3: Add code above the tag


To apply to only 1 video, you need to add an id surrounding that video. Then use this code instead: document.querySelector(‘#myId video’);

Hope my solution will help you resolve the issue.

Best regards,

Noah | PageFly

Hi @d1dotzz ,

  1. In your Shopify Admin go to online store > themes > actions > edit code
  2. Find Layout > theme.liquid and paste this at the bottom of the file:

Do i have to change anything?