Repository navigation
Shopify product video starts without a click? Use a controlled, non-autoplay player #52
vistabylara-dev
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
امنح الزائر تحكماً واضحاً بالفيديو بدلاً من تشغيله تلقائياً دون طلب.
Free Shopify code series · 49/50 · Reviewed 24 October 2026
The problem
For a custom secondary product-video component, a native player with controls can avoid unwanted autoplay and unnecessary eager video downloading.
Placement and precautions
Duplicate the theme and work in its unpublished preview. Save the original files and change one component at a time.
Use in a product-template section for the first Shopify-hosted product video, ideally below the initial viewport. Replace only your custom video component, not the whole gallery.
Bounded Liquid example — not a replacement for an entire theme file:
{% assign help_video = product.media | where: 'media_type', 'video' | first %} {% if help_video != blank %} {{ help_video | video_tag: controls: true, autoplay: false, loop: false, preload: 'none' }} {% endif %}Check in preview
Check a product with a hosted video and one without. Confirm playback starts on user action, controls work on mobile/keyboard, and existing scripts do not call play automatically.
Limits to understand
preload is a browser hint. This does not handle YouTube/Vimeo external_video objects. Provide accurate captions/transcripts where needed; this snippet does not create them or configure accessibility tracks.
Validation: This code passed Shopify's validation tool. This is static validation, not proof of rendering, accessibility, theme compatibility, indexing or improved sales. No live merchant store was changed or purchase performed.
Rollback
Restore the saved markup and styles if anything regresses. Remove any new calls before deleting their referenced files. Remove only unused locale keys introduced for this example. Keep the previous working theme available until the full affected journey has been checked.
Need this fixed in your store?
Send Dr Lara your store URL, theme name, affected page and what changed before the issue started. Start with free guidance and a free initial consultation. If you want implementation, we agree the scope and fee separately before work starts.
Explore Shopify repairs and development with Vista by Lara
WhatsApp Dr Lara about guide 49 or call +971 50 799 4292.
Free guidance. No commitment. Practical implementation is separately scoped.
Join the discussion
What result do you see, and what should happen instead? Share a short sanitized example. Remove passwords, tokens, customer details and private admin URLs.
Official references
Dr Lara · Vista by Lara · Dubai, UAE
All reactions