autovideo
Attribute
Auto-play videos only in viewport.
The script detects all videos on the page (Background Video
components & <video>
elements used in HTML Embeds
) and plays/pauses them based on if they are visible in the viewport.
CDN Import
<!-- [Attributes by Finsweet] CMS Display Values -->
<script defer src="https://cdn.jsdelivr.net/npm/@finsweet/attributes-autovideo@1/autovideo.js"></script>