Why does my product video not resize correctly on mobile?

Topic summary

A user encountered an issue where a product video displayed correctly on desktop but failed to resize properly on mobile devices.

Solution provided:

  • Add specific code to the theme.liquid file (after the <head> element)
  • Initial code suggestion caused incorrect video height
  • Revised code successfully resolved the mobile resizing issue

Outcome:

  • Problem resolved after implementing the corrected code snippet
  • The video now displays at the appropriate size on mobile devices
Summarized with AI on November 14. AI used: claude-sonnet-4-5-20250929.

Hi everyone, I uploaded a video on the product detail page, everything works fine when I view the page on my computer, but when I view it on my mobile phone, the video doesn’t automatically zoom to the right size, here’s the link to the product, thanks for your help!

https://www.lilygo.cc/products/t-keyboard-s3

Open Online store > Themes > Edit code > open theme.liquid file, add this code below after element


Thank you for your help sir, I added but the height of the video changed

Change the code to this


Worked! thank you so much.