Autoplay

Autoplay

GabijaZ
Tourist
13 0 1

Hey, 

 

I'am trying to put autoplay video on my homepage, and it just doesn't seem to work. I use this code in custom liquid section

  1. <style>
  2.  
  3. video {
  4.  
  5. display: block;
  6. margin: 0 auto;
  7. width: 100%;
  8. height: 50%;
  9.  
  10. }
  11.  
  12. </style>
  13.  
  14.  
  15. <video autoplay loop playsinline muted>
  16. <source src="VIDEO URL HERE">
  17. </video>

But it doesn't work for me, video plays fine, but he is not  autoplay one, you need to press the button and then he plays just on loop. I tried to update my theme from dawn 5.0.0 to dawn 13.0.1 but version of the theme wasn't the issue. I really could use some help, thank you!! 

Replies 9 (9)

saim007
Shopify Partner
609 74 104

@GabijaZ Try below code in your output area and see it is working or not if working then replace the source url with your video url.

 

<video width="500" controls=0 autoplay playsinline muted loop>
  <source src="http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4" type="video/mp4">
</video>
Saim | Shopify Partner Expert

Was I helpful?

Buy me a Coffee

🙂
Hire me   to unlock the full potential of your e-commerce store 🙂
GabijaZ
Tourist
13 0 1

Unfortunately that didn't work either 😕

 

saim007
Shopify Partner
609 74 104

Can you please share the screenshot of the code where you placed? so i can get the idea where is the problem.

Saim | Shopify Partner Expert

Was I helpful?

Buy me a Coffee

🙂
Hire me   to unlock the full potential of your e-commerce store 🙂
GabijaZ
Tourist
13 0 1

Image.jpeg

 

I guess I'am doing something wrong, but it just creates another video below this one 

saim007
Shopify Partner
609 74 104

You are pasting code in the liquid section I suggest to put the code in html section block.

Saim | Shopify Partner Expert

Was I helpful?

Buy me a Coffee

🙂
Hire me   to unlock the full potential of your e-commerce store 🙂
GabijaZ
Tourist
13 0 1

Do you mean in custom CSS block below?

 

saim007
Shopify Partner
609 74 104

Without checking the store codes and other issues in depth I can't help you!

Saim | Shopify Partner Expert

Was I helpful?

Buy me a Coffee

🙂
Hire me   to unlock the full potential of your e-commerce store 🙂
GabijaZ
Tourist
13 0 1

Weird thing, I came back to this project after few days brake and out of nowhere it started working with no additional codes:DDD I guess nothing was wrong, somehow it just needed time to start working 

GabijaZ
Tourist
13 0 1

Actually it only works on chrome browser but not on safari...