Shopify themes, liquid, logos, and UX
Hey everyone, is it possible to add a video banner with autoplay to my Shopify store? If so, how can I do it?
Solved! Go to the solution
This is an accepted solution.
Hey @Wanigajameson
Here there is auto play video section for the banner. In this section you can add YouTube embed video URL.
.video-banner-wrapper {
position: relative;
width: 100%;
height: 0;
padding-bottom: 56.25%; /* 16:9 aspect ratio */
overflow: hidden;
background: #000;
}
.video-container {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
#video-banner {
width: 100%;
height: 100%;
position: absolute;
top: 0;
left: 0;
pointer-events: none;
}
<div class="video-banner-wrapper">
<div class="video-container">
<iframe
id="video-banner"
src="{{ section.settings.video_url | replace: 'watch?v=', 'embed/' }}"
frameborder="0"
allow="autoplay; encrypted-media"
allowfullscreen>
</iframe>
</div>
</div>
{% schema %}
{
"name": "Video Banner",
"settings": [
{
"type": "text",
"id": "video_url",
"label": "Video URL",
"default": "https://www.youtube.com/embed/dQw4w9WgXcQ"
},
{
"type": "checkbox",
"id": "mute_video",
"label": "Mute Video",
"default": true
}
]
}
{% endschema %}
This is an accepted solution.
Hi @Wanigajameson , kindly check out the below given video.
If my reply is helpful, kindly click like and mark it as an accepted solution.
Thanks!
This is an accepted solution.
Hey @Wanigajameson
Here there is auto play video section for the banner. In this section you can add YouTube embed video URL.
.video-banner-wrapper {
position: relative;
width: 100%;
height: 0;
padding-bottom: 56.25%; /* 16:9 aspect ratio */
overflow: hidden;
background: #000;
}
.video-container {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
#video-banner {
width: 100%;
height: 100%;
position: absolute;
top: 0;
left: 0;
pointer-events: none;
}
<div class="video-banner-wrapper">
<div class="video-container">
<iframe
id="video-banner"
src="{{ section.settings.video_url | replace: 'watch?v=', 'embed/' }}"
frameborder="0"
allow="autoplay; encrypted-media"
allowfullscreen>
</iframe>
</div>
</div>
{% schema %}
{
"name": "Video Banner",
"settings": [
{
"type": "text",
"id": "video_url",
"label": "Video URL",
"default": "https://www.youtube.com/embed/dQw4w9WgXcQ"
},
{
"type": "checkbox",
"id": "mute_video",
"label": "Mute Video",
"default": true
}
]
}
{% endschema %}
This is an accepted solution.
Hi @Wanigajameson , kindly check out the below given video.
If my reply is helpful, kindly click like and mark it as an accepted solution.
Thanks!
Hi @Wanigajameson,
You can follow the instructions below, it will display fine
Shopify and our financial partners regularly review and update verification requiremen...
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