Hello, I insert my own video in the product page.
But the video doesn’t automatically start in the product page. There is a black tumbnail with play button.
What is the problem? How could
A user embedded a custom video on their Shopify product page but it displayed a black thumbnail with a play button instead of auto-playing.
Initial Solution:
autoplay="true" attribute to the <video> tagMobile Autoplay Issue:
Working Solution:
autoplay and muted attributes to the video tagplaysinline attribute<video muted autoplay playsinline loop>Key Technical Detail:
Browser autoplay policies require videos to be muted for autoplay to function, particularly on mobile devices. A reference to Chrome’s autoplay policy documentation was provided for additional context.
Hello, I insert my own video in the product page.
But the video doesn’t automatically start in the product page. There is a black tumbnail with play button.
What is the problem? How could
Hello @Kremena_Sarieva , in order to play the video automatically, you’ll need to add autoplay property to true in tag.
Simply add autoplay=“true” in your video tag.
If you’re using the liquid tag. Please use it as below.
{{ section.settings.video_1 | video_tag, autoplay: true}}
Thank you for the reply. Where should I add exactly?
Thank you very much! I’m happy. On desktop version is OK, but on mobile version does not play automatically. Is there anything to add for mobile?
Please confirm if you add autoplay to the video tag used for mobile.
I don’t know where is the tag for mobile.
hi @Kremena_Sarieva ,
Chrome does not allow autoplay if the video is not muted.
So to autoplay video you need to set both autoplay and muted attribute.
Here is the link for more details related to mobile
https://developer.chrome.com/blog/autoplay-2/
Here is the sample:
Here’s what worked for me:
video { width: 100%; height: auto; display: block; margin: 0 auto; autoplay: true; }