Liquid, JavaScript, themes, sales channels
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!
User | RANK |
---|---|
38 | |
29 | |
13 | |
12 | |
9 |
On our Shopify Expert Marketplace, you can find many trusted third party developers and fr...
By Arno Nov 27, 2023You've downloaded the Search & Discovery app from the Shopify App store, and as you're ...
By Skye Nov 8, 2023The year-end shopping season is just around the corner. Is a flash sale on your radar? Are...
By Jasonh Nov 6, 2023