Make Video Section Autoplay/Looped, Muted and Non pausable when Hovering (Dawn)

Hello Community,

I would like to have a Video Section where the video is Autoplaying/Looped, Muted and not showing buttons like pause, resume, volume etc. when hovering over the video.

Just like this store: https://crissbellini.com/

I am using Dawn theme by the way.

All help would be appreciated :slightly_smiling_face:

Thank you!

@made4Uo @LitCommerce

1 Like

Hi @KC14 ,

I see the video is already loop, autoplay and muted. To remove the banner on front please use the code below

  1. From your Admin Page, click Online Store > Themes >Actions > Edit code
  2. In the Asset folder, open the theme.css
  3. Paste the code below at the very bottom of the file.
#Slidefda75e75-7587-43ce-a4fa-94b026c76235 > div.Slideshow__Content.Slideshow__Content--bottomCenter.bg_overlay {
display: none
}

Hi @made4Uo ,

I notice that I don’t have a theme.css file :thinking:

Okay I get it, do you also know how to make the video not showing buttons like pause, resume, volume etc. when hovering over the video? Like you have with a YouTube video.

Thank you for helping me!

Hi @KC14 ,

With youtube video you can just add autoplay to it, if you want please change the code of video.liquid file

{{ 'video-section.css' | asset_url | stylesheet_tag }}
{{ 'component-deferred-media.css' | asset_url | stylesheet_tag }}

{%- style -%}
.section-{{ section.id }}-padding {
padding-top: {{ section.settings.padding_top | times: 0.75 | round: 0 }}px;
padding-bottom: {{ section.settings.padding_bottom | times: 0.75 | round: 0 }}px;
}

@media screen and (min-width: 750px) {
.section-{{ section.id }}-padding {
padding-top: {{ section.settings.padding_top }}px;
padding-bottom: {{ section.settings.padding_bottom }}px;
}
}
{%- endstyle -%}

{% if section.settings.button != blank %}

{{ section.settings.button }}

{% endif %}

{% schema %}
{
"name": "t:sections.video.name",
"tag": "section",
"class": "section",
"settings": [
{
"type": "text",
"id": "heading",
"default": "Video",
"label": "t:sections.video.settings.heading.label"
},
{
"type": "select",
"id": "heading_size",
"options": [
{
"value": "h2",
"label": "t:sections.all.heading_size.options__1.label"
},
{
"value": "h1",
"label": "t:sections.all.heading_size.options__2.label"
},
{
"value": "h0",
"label": "t:sections.all.heading_size.options__3.label"
}
],
"default": "h1",
"label": "t:sections.all.heading_size.label"
},
{
"type": "image_picker",
"id": "cover_image",
"label": "t:sections.video.settings.cover_image.label"
},
{
"type": "video_url",
"id": "video_url",
"accept": [
"youtube",
"vimeo"
],
"default": "https://www.youtube.com/watch?v=_9VUPq3SxOc",
"label": "t:sections.video.settings.video_url.label",
"placeholder": "t:sections.video.settings.video_url.placeholder",
"info": "t:sections.video.settings.video_url.info"
},
{
"type": "text",
"id": "description",
"label": "t:sections.video.settings.description.label",
"info": "t:sections.video.settings.description.info"
},
{
"type": "checkbox",
"id": "full_width",
"label": "t:sections.video.settings.full_width.label",
"default": false
},
{
"type": "select",
"id": "color_scheme",
"options": [
{
"value": "accent-1",
"label": "t:sections.all.colors.accent_1.label"
},
{
"value": "accent-2",
"label": "t:sections.all.colors.accent_2.label"
},
{
"value": "background-1",
"label": "t:sections.all.colors.background_1.label"
},
{
"value": "background-2",
"label": "t:sections.all.colors.background_2.label"
},
{
"value": "inverse",
"label": "t:sections.all.colors.inverse.label"
}
],
"default": "background-1",
"label": "t:sections.all.colors.label"
},
{
"type": "header",
"content": "t:sections.all.padding.section_padding_heading"
},
{
"type": "text",
"id": "button",
"label": "Button text",
"default": "Shop Now"
},
{
"type": "url",
"id": "button_link",
"label": "Button link"
},
{
"type": "range",
"id": "padding_top",
"min": 0,
"max": 100,
"step": 4,
"unit": "px",
"label": "t:sections.all.padding.padding_top",
"default": 36
},
{
"type": "range",
"id": "padding_bottom",
"min": 0,
"max": 100,
"step": 4,
"unit": "px",
"label": "t:sections.all.padding.padding_bottom",
"default": 36
}
],
"presets": [
{
"name": "t:sections.video.presets.name"
}
]
}
{% endschema %}

Hope it helps!

Hi @LitCommerce ,

It didn’t work unfortuntely. You still have to click the video yourself to play it and replay it. It won’t auto replay / loop. Plus all the YouTube buttons are still appearing when hovering over the video.

Let me know if you know another way to fix it! :slightly_smiling_face:

Thank you

Hi @KC14 ,

Please find ‘youtube’ and change code here:

You can edit the features yourself according to the instructions of youtube: https://developers.google.com/youtube/player_parameters

Hope it helps!