How can I adjust video background size and autoplay on mobile?

OscarSolano
Visitor
2 0 1

Hi!
I added some background videos to my store using the following custom liquid code and they look grear, but when changing into mobile the size is too small for the screen. Also the autoplay doesn't work on mobile as well 😞

Can anyone help me to set the code to resize and autoplay when using mobile?

This is the code that I used:

<style>

video {

display: block;

margin: 0 auto;

width: 100%;

height: 50%;

}

</style>

<video autoplay loop playsinline muted>

<source src="VIDEO URL HERE">

</video>


This is my store
https://doufoods.com/
password: douweb

Perfect size for desktop

Captura de Pantalla 2023-02-10 a la(s) 13.48.36.png

Way too small for mobile and no autoplay

IMG_3728.PNG

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Thank you in advance!

 

Replies 2 (2)

KetanKumar
Shopify Partner
36904 3641 11986

@OscarSolano 

Thank you for reaching out and posting this question!
Sorry you are facing this issue, it would be my pleasure to help you.

Welcome to the Shopify community!😊
Thanks for your good question.

Please share your site URL,
I will check out the issue and provide you a solution here.

 

If helpful then please Like and Accept Solution.
Want to modify or custom changes on store Hire me.
- Feel free to contact me on bamaniyaketan.sky@gmail.com regarding any help
Shopify Partner | Skype : bamaniya.sky
PSD to Shopify | Shopify Design Changes | Shopify Custom Theme Development and Desing | Custom Modifications In to Shopify Theme | SEO & Digital Marketing
OscarSolano
Visitor
2 0 1

Thank you in advance @KetanKumar!

This is my site
https://doufoods.com/
password: douweb