Setting to add in image-banner.liquid schema:
{
"type": "checkbox",
"id": "video_background",
"default": false,
"label": "Has Video Background"
},
Video tag code to add in image-banner.liquid:
{%- if section.settings.video_background -%}
<div class="banner__media media video-background">
<video autoplay muted loop id="myVideo">
<source src="https://cdn.shopify.com/s/files/1/0582/5000/2628/files/happy-dog-outdoor.mp4?v=1646765486" type="video/mp4">
Your browser does not support HTML5 video.
</video>
</div>
{%- endif -%}
Dynamic class code to add in image-banner.liquid:
{% if section.settings.video_background %} video-background{% endif %}
Code to hide placeholder image in image-banner.liquid:
and section.settings.video_background == false
CSS code to add in section-image-banner.css:
.media.video-background>*:not(.zoom):not(.deferred-media__poster-button) {
height: auto;
}
@media screen and (max-width: 749px) {
.banner--large.video-background:not(.banner--mobile-bottom):not(.banner--adapt) .banner__content {
min-height: 27rem;
}
}
@media screen and (min-width: 750px) {
.banner--large.video-background:not(.banner--adapt) {
min-height: 39rem;
}
}
@media screen and (min-width: 990px) {
.banner--large.video-background:not(.banner--adapt) {
min-height: 52rem;
}
}
@media screen and (min-width: 1320px) {
.banner--large.video-background:not(.banner--adapt) {
min-height: 62rem;
}
}
Hello, i want to remove default theme from that video. Please, help me as soon as possible.
