How can I loop and unmute an autoplay video in Envy theme?

Hello,

I have been using the theme Envy. I added a video through the custom HTML option. I want to make this video autoplay (this works already) on loop and not muted. I have tried several codes, but nothing seems to work. This is what I am using at the moment :

.embed-container { position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden; max-width: 100%; } .embed-container iframe, .embed-container object, .embed-container embed { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }

Can anyone help?

Thank you.

@cherryblossom11 – I would advise you to include the video using the HTML-video-tag. Actually, ideally you could upload it to shopify and use the video_tag filter for you to take care of the heavy lifting. That would look something like this:

{{ media | video_tag: loop: true, autoplay: true, muted: true }}

Whatever way you do this – autoplay is getting harder and harder to achieve; in combination with not-muted, pretty much all modern browsers – definitely all mobile ones – will not play along with what you want. They will require user interaction to start the video (and rightfully so). Heres some more information on this topic: .

Hope this helps!
Mario

1 Like

I see, great thank you so much!

@cherryblossom11 – you’re welcome. I’m glad I could help!