Hover Video Preview

Thumbnails that come alive the moment you touch them

0:24

Create hover video previews. A thumbnail card (video item, course, portfolio piece) that starts playing a muted preview the moment the cursor lands on it, like YouTube's hover previews. Implementation: the card holds a poster image and a <video> (muted, loop, playsinline, preload='metadata'). On mouse enter: call video.play(), scale the media slightly (1.15 pan feels cinematic), fade the dark overlay from ~45% to ~12%, and shrink/fade the play button away (300ms each). On leave: pause the video, optionally reset currentTime to 0, and restore poster, overlay, and button. Details: add a ~200ms hover-intent delay before playing so skimming the grid doesn't trigger every card; never play audio on hover; on touch devices tap toggles the preview (first tap previews, second navigates, or skip previews entirely); a small duration badge ('0:24') flips to 'PREVIEW' while playing. Limit simultaneous playing videos to the one hovered. Under prefers-reduced-motion, keep the static poster and skip the auto-play entirely. Build the component, not this demo of it. - Ambient motion that IS the component may loop: a drifting background, a marquee, a spinner while something is genuinely loading. - Do not add any timer, interval, loop or script that performs a person's action by itself. No auto-hover, no auto-click, no cycling through states, no pretend submitting, no replaying the interaction on a schedule. - Every state that answers a person waits for a real event from that person. - Placeholder copy and sample content are welcome. Simulated behaviour is not.

Rate it
0
0

We'd like to measure how the site gets used, with Google Analytics. It sets cookies. Everything the site needs to work runs either way. How we handle data