Hello I am currently having trouble with Video Image.
When customers are scrolling right to see more of the photos my videos aren’t automatically playing , they play when they press them from tab under that.
Site:getprivateview.com
You can check on mobile how the videos are playing only when you press them from thumbnail below. How could I fix that
This happens because your theme only triggers video playback when a thumbnail is clicked. So you’ll need to enable autoplay in your theme settings or update the product gallary code to play the video on active slide change.
I checked on mobile and it looks like the videos only play when their thumbnail is selected. This is often how the theme’s product gallery is configured by default.
Which Shopify theme are you using? That will help determine whether it’s a setting that can be changed or if the gallery code needs a small customization.
Hi @Kiwart ,
The issue: mobile browsers block video autoplay unless the video is muted + playsinline (that’s why it only plays when tapped). Also, most themes only play the active slide, not on swipe.
Step 1: In your product template → media block, turn on “Autoplay video.” Make sure the video is muted.
Step 2: To play videos as customers swipe to them, add this before </body> in theme.liquid (back up first):
The only problem with this code is that Dawn family themes do not output any <video> tags until “Play” button is clicked and use the <deferred-media> custom elements.
Therefore videos array in the code above would be empty and the code will do nothing.
It’s very easy – go to “Edit theme”, navigate to product page, add a “Custom liquid” section in template area or “Custom liquid” block to “Product Information” section and paste the code available via link above.