Autoplay Uploaded Product Videos Dawn Theme 9.0

Anviori
Tourist
6 0 0

Hello,

 

I've tried many suggestions from the community here and I cannot find something that works. I have two files associated with a product, one from youtube (via a link) the other is an MP4 I uploaded. What can I do ensure these videos autoplay when the page loads and that they don't show any controls (play button and slider). I want it to behave similar to how a GIF does.

 

I'm able to do this successfully using custom liquid but I want this to work for the product media automatically. 

Is this possible?

 

Thank you 

Replies 4 (4)

AliReviews
Shopify Partner
773 89 353

Hello @Anviori ,

 

You can try to follow these steps:

For Youtube video:

  1. Locate the YouTube video embed code in your Shopify store's theme files. This code may be found in the product template file or within a specific section related to the product page.
  2. Add the autoplay=1 parameter to the YouTube video URL. For example, modify the URL from https://www.youtube.com/watch?v=VIDEO_ID to https://www.youtube.com/watch?v=VIDEO_ID&autoplay=1.
  3. To remove the controls, add the controls=0 parameter to the YouTube video URL. The modified URL should now look like: https://www.youtube.com/watch?v=VIDEO_ID&autoplay=1&controls=0.

 

For Uploaded MP4 Video:

  1. Locate the HTML code for embedding the MP4 video in your Shopify store's theme files. This code may be found in the product template file or within a specific section related to the product page.
  2. Add the autoplay attribute to the <video> tag. For example: <video autoplay>...</video>.
  3. To remove the controls, add the controls attribute to the <video> tag and set it to false. The modified tag should now look like: <video autoplay controls="false">...</video>.

Hope this can help.

Ali Reviews team.

- Was my answer helpful? Please hit Like or Mark it as solution!
- Ali Reviews - The must-have Shopify app that empowers you to effortlessly collect, display, and manage product reviews.
- Start your FREE trial today!
Anviori
Tourist
6 0 0

Yes, I've tried doing this for custom liquid sections but this is not that. I unsure where to find the HTML for the uploaded videos.

Turbospacecat
Visitor
1 0 1

I also need an answer to this question as none of the suggestions seem to work. I have uploaded the video to the Shopify server and it displays correctly but trying to add any of the code mentioned into Custom CSS brings up errors. Would be awesome if Shopify could add a check box like they have for 'Play Video On Loop'.

Jack
topnewyork
Trailblazer
238 26 34

Hi Jack,

 

Checkout this video here. I implemented this on homepage and it works fine for me



Need a Shopify developer?
Hire us at topnewyorkwebdesign.com
For Shopify Design Changes | Shopify Custom Coding | Custom Modifications
Subscribe to our youtube channel