Shopify themes, liquid, logos, and UX
hey i want my video to autoplay in the slideshow of the prodcut page like this shopify website did it https://fragrancemilking.ca/products/jpg-le-beau-le-parfum?_pos=1&_psq=le+bea&_ss=e&_v=1.0
i have dawn theme, but i dont know if they added code or they did something else thanks in advance
This is Richard from PageFly - Shopify Page Builder App
Hi @perfumecartel Please add code here to fix it:
Step 1: Online Stores > Themes > Edit code
Step 2: Choose file theme.liquid
Step 3: Add code above the tag </body>
<script>
document.addEventListener("DOMContentLoaded", function() {
setTimeout(() => {
const videos = document.querySelectorAll('.product video');
videos.forEach(video => {
video.muted = true;
});
setTimeout(() => {
videos.forEach(video => {
video.play();
});
}, 1000);
}, 1000);
});
</script>
Hope my solution will help you resolve the issue.
Best regards,
Richard | PageFly
Please let me know if it works by giving it a Like or marking it as a solution!
➜ Optimize your Shopify store with PageFly Page Builder (Free plan available)
All features are available from Free plan. Live Chat Support is available 24/7.
You can add autoplay="autoplay" attribute on your video tag
To make your video autoplay, add the autoplay="autoplay" attribute to the video tag in the main-product.liquid file. This will require some coding.
Hey Community! As we jump into 2025, we want to give a big shout-out to all of you wh...
By JasonH Jan 7, 2025Hey Community! As the holiday season unfolds, we want to extend heartfelt thanks to a...
By JasonH Dec 6, 2024Dropshipping, a high-growth, $226 billion-dollar industry, remains a highly dynamic bus...
By JasonH Nov 27, 2024