Sorry, there was a typo mistake :
it is the same code but we wrap javascript code with a script tag.
A user encountered an issue where autoplaying videos in product descriptions stopped playing when customers selected product options (variants). The video used standard HTML5 autoplay attributes but was interrupted by partial page reloads triggered by variant selection.
Technical Cause:
Selecting product options triggered AJAX requests that caused partial page reloads, interrupting the video’s loop and autoplay functionality.
Solution Implemented:
A helper created a custom Liquid section called “video-2” that:
<script> tags to listen for variant selection changesOutcome:
The solution was tested in a theme preview, then published to the live store. The user confirmed the fix worked as intended and expressed gratitude for the assistance. The helper offered continued support via email if needed.
Sorry, there was a typo mistake :
it is the same code but we wrap javascript code with a script tag.