Craft Theme: how to embed and auto-play video on homepage

Topic summary

Main issue: Embed and autoplay an MP4 video on the Shopify Craft theme homepage without using YouTube/Vimeo.

Solution provided and confirmed working:

  • Upload the MP4 to Shopify Files (Settings > Files).
  • In the theme editor, add a “Custom Liquid” section on the homepage.
  • Paste a custom code snippet in that section and replace the demo URL with the uploaded file URL. (Images illustrating the steps were shared; the exact code snippet is central but not included in this excerpt.)

Outcome: The original request was resolved; the video embeds and autoplays successfully.

New follow-up questions (unresolved):

  • How to scale down the video and center it on desktop to avoid edge-to-edge display.
  • How to hide video controls (play button, fullscreen, play bar).

Status: Core embedding/autoplay solution is done. Discussion remains open for styling (centering/sizing) and control visibility. Explanation notes: “Custom Liquid” is a section that allows adding custom HTML/Liquid code; “Shopify Files” is the store’s file library for hosting assets.

Summarized with AI on January 10. AI used: gpt-5.

Hello! I’d appreciate any help or guidance from all of you.

I created an mp4 video and uploaded this in settings already.

Can someone please guide on how to embed the video and autoplay in the homepage? I prefer not to use youtube or vimeo to host the video..

I’ve seen plenty of posts/discussion but not specifically for Craft Theme. Thank you

Hello @songhitsatbp_ph ,

I would like to give you some recommendations to support you:

  1. Upload the video to the Shopify File

  1. Open Theme Setting > Add section > Custom Liquid

  1. Add the below custom code to the Custom Liquid field (let’s add your video URL to replace my demo URL)

If you require any further information, feel free to contact me.
Best regards,
GemPages Support Team

3 Likes

OMG thank you so much, you’re a legend!!! It works perfectly and thanks for the help :blush:

1 Like

OMG this is super amazing, you’re a legend! Thank you, I’m sure this will help other Craft users as well :slightly_smiling_face:

1 Like

Hello @songhitsatbp_ph ,

I do appreciate your compliment!

Your kind words have just made my day.

Best regards,
GemPages Support Team

Hello, I’ve found this quite helpful as well, but I’m trying to also scale down my video because having it go all the way to the edges looks horrible on a pc, but doing that left justifies the video. Is there a way to center it?

thank you so much for this. so usefull!

can you please tell us how to hide video controls? like play button, full screen or play bar?

thanks in advance