import { useEffect, useRef } from 'react' import clsx from 'clsx' /** * Looping screen-recording embed for docs pages. * * Recordings load lazily and play only while on screen: `preload="metadata"` * avoids buffering full files up front, and an IntersectionObserver starts * playback when the video scrolls into view and pauses it when it leaves. * Controls stay visible so the loop can be paused (WCAG 2.2.2), and autoplay * is skipped entirely for users who prefer reduced motion. * * Usage: *