Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
https://snkr-up.myshopify.com/ this is my website and my code works fine, i got it from chat gpt but the square as u can see it not 100% on the whole store, u can still see the white color on the sides
this is the code i got that i also use on booster theme
<video autoplay="" loop="" muted="" playsinline="" style="width: 100%;">
<source src="https://cdn.shopify.com/videos/c/o/v/91eea6e01b284003a0ca10d3a50859f6.mov">
</video>
<script>
document.addEventListener("DOMContentLoaded", function(event) {
var video = document.querySelector("video");
video.play();
});
</script>
Solved! Go to the solution
This is an accepted solution.
Hello @Radu114
You can update the code like this
<video autoplay="" loop="" muted="" playsinline="" style="width: 100vw; position: relative; left: 50%; transform: translateX(-50%);">
<source src="https://cdn.shopify.com/videos/c/o/v/91eea6e01b284003a0ca10d3a50859f6.mov">
</video>
<script>
document.addEventListener("DOMContentLoaded", function(event) {
var video = document.querySelector("video");
video.play();
});
</script>
The result
This is an accepted solution.
Hello @Radu114
You can update the code like this
<video autoplay="" loop="" muted="" playsinline="" style="width: 100vw; position: relative; left: 50%; transform: translateX(-50%);">
<source src="https://cdn.shopify.com/videos/c/o/v/91eea6e01b284003a0ca10d3a50859f6.mov">
</video>
<script>
document.addEventListener("DOMContentLoaded", function(event) {
var video = document.querySelector("video");
video.play();
});
</script>
The result
It worked!!!! Thank u!!!!
You are welcome. Hope you the best!
In Canada, payment processors, like those that provide payment processing services t...
By Jacqui Mar 14, 2025Unlock the potential of marketing on your business growth with Shopify Academy's late...
By Shopify Mar 12, 2025Learn how to increase conversion rates in every stage of the customer journey by enroll...
By Shopify Mar 5, 2025