Unlock Autoplay: Fix Shopify Product Videos Not Playing on Mobile Swipe (Dawn Theme Guide!)
Hey fellow store owners! I recently dove into a really common and frustrating issue that popped up in the Shopify community, and it\'s one I know many of you have probably faced: product videos that just won\'t autoplay on mobile when customers swipe through your product gallery. It\'s a real conversion killer when your beautiful video content gets stuck behind a tap!
The Mobile Video Autoplay Conundrum
The discussion kicked off with Kiwart, who was using the popular Dawn theme and experiencing exactly this problem on their site, getprivateview.com. Customers could scroll right through the product photos, but the videos only played if they specifically tapped the thumbnail below. On mobile, this is a huge friction point.
As Rhea6 and Joeemmie_Donz pointed out, this behavior is pretty typical. Themes often configure product galleries to only trigger video playback when a thumbnail is actively selected or clicked, not when a user simply swipes past it. And then there\'s the added layer of mobile browsers, which have their own strict rules about autoplaying media.
Why Your Videos Aren't Autoplaying on Mobile
It boils down to two main culprits, as the community insights clarified:
- Mobile Browser Restrictions: Most mobile browsers block video autoplay unless the video is muted and has the
playsinlineattribute. This is to prevent unwanted data usage and a jarring user experience. - Theme Default Behavior: Many Shopify themes, including Dawn, are designed to only play the active slide in the product gallery. They don\'t inherently detect when a video slides into view via a swipe and automatically start playing it. Plus, Dawn themes specifically use
custom elements, meaning the actualtags aren\'t output until a play button is clicked. This makes direct targeting ofelements a bit tricky, as tim_tairli wisely noted.
So, how do we get around this and give our mobile shoppers the seamless video experience they deserve?
The Community-Approved Fix: Autoplay on Swipe for Dawn Theme
After sifting through the suggestions, a comprehensive solution emerged, largely thanks to oscprofessional\'s detailed steps. This approach addresses both the mobile browser requirements and the theme\'s gallery behavior, especially for Dawn theme users.
Step 1: Check Your Theme Settings
First things first, let\'s make sure your basic theme settings are configured correctly. This is often an overlooked but crucial step.
- Go to your Shopify Admin > Online Store > Themes.
- Find your current theme (Dawn, in Kiwart\'s case) and click Customize.
- Navigate to a Product page template.
- In the sections sidebar, find your Product media block.
- Look for a setting to "Autoplay video" and make sure it\'s turned on.
- Crucially: Ensure your product videos themselves are muted. Mobile browsers are much more likely to autoplay muted videos. If your videos aren\'t muted, they likely won\'t autoplay regardless of other settings.
Step 2: Add Custom JavaScript to theme.liquid
This is where we add the magic code that tells your videos to play when they come into view, even on swipe.
⚠️ IMPORTANT: Always back up your theme before making code changes! You can do this by going to Online Store > Themes > Actions > Duplicate.
Here\'s how to implement the code:
- From your Shopify Admin, go to Online Store > Themes.
- Find your current theme and click Actions > Edit code.
- In the left sidebar, under the Layout directory, click on
theme.liquid. - Scroll all the way down in the
theme.liquidfile until you find the closing
