Shopify themes, liquid, logos, and UX
id like for the home screen to auto play the video without the consumer having to press play.
is this possible on dawn theme?
Solved! Go to the solution
This is an accepted solution.
Updtade this on live 106 in video section
{{
section.settings.video
| video_tag:
image_size: '1100x',
autoplay: true,
loop: section.settings.enable_video_looping,
controls: true,
muted: true
}}
This is an accepted solution.
To remove controls paste this instead:
{{
section.settings.video
| video_tag:
image_size: '1100x',
autoplay: true,
loop: section.settings.enable_video_looping,
controls: false,
muted: true
}}
Also to remove play button, on top of section on first line add this:
<style>
span.deferred-media__poster-button.motion-reduce {
display: none !important;
}
</style>
Hi Andia,
You can do it like this:
<video autoplay muted>
<source src="movie.mp4" type="video/mp4">
</video>
where does it go?
it has been added here.
Hi @Andia
You can try to add this code to your theme.liquid file, before </body> to check
<script>
document.addEventListener("DOMContentLoaded", function() {
// Wait for the entire page to load
window.onload = function() {
// Find the button by ID
var button = document.getElementById('Deferred-Poster-Modal-39126588358970');
// Check if the button exists
if (button) {
// Click the button
button.click();
}
};
});
</script>
- Helpful? Like and Accept solution! Or Support me: Buy Coffees
- Reton: Loyalty & Rewards - Earn points through tasks, redeem for discounts, and enjoy exclusive VIP rewards!
- Ryviu - Reviews & QA app: Collect product reviews, import reviews from AliExpress, Amazon, Etsy, Walmart, Shopee, Dhgate and CSV.
- Lookfy Gallery: Lookbook Image: Easy and fast to create Photo Gallery, Lookbook, Shop The Look.
- Reelfy‑Shoppable Videos+Reels: Create shoppable videos to engage customers and drive more sales.
- Enjoy 1 month of Shopify for $1. Sign up now.
This is an accepted solution.
Updtade this on live 106 in video section
{{
section.settings.video
| video_tag:
image_size: '1100x',
autoplay: true,
loop: section.settings.enable_video_looping,
controls: true,
muted: true
}}
doesnt seem to work here
No, You need to go in themes codes, under sections you need to find video and under line 106 change code.
oh amazing!! is there a way i can remove this
It doesn't work on Chrome but it works on Firefox and Safari 😞
- Helpful? Like and Accept solution! Or Support me: Buy Coffees
- Reton: Loyalty & Rewards - Earn points through tasks, redeem for discounts, and enjoy exclusive VIP rewards!
- Ryviu - Reviews & QA app: Collect product reviews, import reviews from AliExpress, Amazon, Etsy, Walmart, Shopee, Dhgate and CSV.
- Lookfy Gallery: Lookbook Image: Easy and fast to create Photo Gallery, Lookbook, Shop The Look.
- Reelfy‑Shoppable Videos+Reels: Create shoppable videos to engage customers and drive more sales.
- Enjoy 1 month of Shopify for $1. Sign up now.
not working
Hi @Andia ,
May I suggest to update code these steps:
1. Go to Store Online-> theme -> edit code
2. sections/video.liquid
3. Add code below to top of file
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.1/jquery.min.js"></script>
<script>
$(document).ready(function(){
if($('.video-section__poster').length > 0){
$(".video-section__poster").click();
$(".video-section video").on("loadeddata", function() {
var video = $(" .video-section video").get(0);
video.play();
});
}
});
</script>
how can i remove this:
i also want to hide the controls on hover
This is an accepted solution.
To remove controls paste this instead:
{{
section.settings.video
| video_tag:
image_size: '1100x',
autoplay: true,
loop: section.settings.enable_video_looping,
controls: false,
muted: true
}}
Also to remove play button, on top of section on first line add this:
<style>
span.deferred-media__poster-button.motion-reduce {
display: none !important;
}
</style>
thank you!!
where I need to put this code?
As 2024 wraps up, the dropshipping landscape is already shifting towards 2025's trends....
By JasonH Nov 27, 2024Hey Community! It’s time to share some appreciation and celebrate what we have accomplis...
By JasonH Nov 14, 2024In today’s interview, we sat down with @BSS-Commerce to discuss practical strategies f...
By JasonH Nov 13, 2024