Shopify themes, liquid, logos, and UX
Hey,
How can I add a video banner or a video in the background (that will play and run automatically) in my store?
I'm running the Sense theme. This is my store: https://asade.co.il
Thanks guys
May I suggest to update code these steps:
1. Go to Store Online-> theme -> edit code
2. Layout/theme.liquid
3. Add code below to bottom of file and before </body> tag
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.1/jquery.min.js"></script>
<script>
$(document).ready(function(){
if($('button.deferred-media__poster').length > 0){
$("button.deferred-media__poster").click();
$(".product__media-item video").on("loadeddata", function() {
var video = $(".product__media-item video").get(0);
video.play();
});
}
});
</script>
<style>
.featured-product .global-media-settings:after {
display: none;
}
@media screen and (max-width: 749px){
.featured-product .product__modal-opener.product__modal-opener--video {
display: none!important;
}
.featured-product .deferred-media {
display: block!important;
width: 100%;
}
}
</style>
4. sections/video.liquid
5. Add code like the screenshot below
5.1 Youtube add param "&autoplay=1"
5.2 Vimeo add params "?autoplay=1&loop=1&autopause=0"
Thank you, but it is not working
June brought summer energy to our community. Members jumped in with solutions, clicked ...
By JasonH Jun 5, 2025Learn how to build powerful custom workflows in Shopify Flow with expert guidance from ...
By Jacqui May 7, 2025Did You Know? May is named after Maia, the Roman goddess of growth and flourishing! ...
By JasonH May 2, 2025