Hello, I’m trying to add a video on the top of my home page as a banner, it should loop (autoplay) and it can be from my files on Shopify or through a youtube link.
Things I’ve tried:
I used a banner section and uploaded a gif but it doesn’t look right.
I’ve also used a custom code that I found somewhere and while it worked for pc, it didn’t for Mobile.
I tried using the “video” section that comes with the template but it’s just not commerce friendly (no autoplay, clickable, and doesn’t cover the screen correctly)
All I’m trying to do is add a simple looping video that is mobile-friendly as a banner.
When you say theme editor, do you mean Theme > Edit code > Layout > ??? i dont see theme as a folder for code.
Or do you mean Theme > Edit code > Sections > Create new section (Custom liquid) ? – Im going to try this theory.
EDIT 1: I was wrong with my assumptions and what you meant finally clicked. its
From the main pannle, Themes > Customize > Add section > Custom liquid.
Many browsers, particularly the most recent versions, automatically block videos from automatically playing, particularly ones with audio.
Most mobile devices, including iPhones, iPads, and many Android devices do not support the video autoplay feature so your video will not play automatically if a visitor is on one of these devices.
Also, most mobile devices do not support videos playing behind other elements, so when the user taps the play button, the video will “take over” the entire screen.
You can place text above the video, but users will not be able to interact with it, so on mobile devices where the video won’t autoplay, they will not be able to watch it. The same goes for the link question.
this is an amazing solution!!! super simple too. but i have one question
is there a way to have this video played on just on the homepage? when i use the code and instructions you provided, the video banner shows up on every page. is there a way to have it ONLY on the homepage? thank youuuu
I was having the same issue, however the solution i found is a bit complex and does require some tweaking, Solution Please let me know if you found a different solution that is easier to work with as i am still playing with this and it is not perfect