Skip to content

Smooth homepage carousel auto-advance for videos - #35

Draft
austinmrobinson wants to merge 7 commits into
mainfrom
austin/smooth-carousel-auto-advance-a02c
Draft

Smooth homepage carousel auto-advance for videos#35
austinmrobinson wants to merge 7 commits into
mainfrom
austin/smooth-carousel-auto-advance-a02c

Conversation

@austinmrobinson

@austinmrobinson austinmrobinson commented Sep 4, 2026

Copy link
Copy Markdown
Owner

Auto-advance on the homepage preview is worth keeping: it is how extra shots get seen, especially on Tesla’s longer set, and videos already have a natural end that should cue the next slide. The jank was the handoff, not the idea.

Videos were playing through to the native ended state. Browsers then seek back to frame 0 (the poster / first frame) for a beat, and only after that did the crossfade start. That is the loop-and-restart hitch.

This change:

  • Starts the next slide during the last ~600ms of the clip
  • Captures the current decoded frame and crossfades that still, so a browser reset of the live <video> cannot flash the first frame
  • Mounts and preloads the upcoming slide so video-to-video fades do not pop in as a poster
  • Leaves image auto-advance as-is (2.5s, still paused on hover / reduced motion / manual control)

Testing: hover Nominal and Paper Crowns through a video-to-video handoff; hover Tesla through the color-tool video into the next still. There should be no first-frame flash before the next slide.

Open in Web Open in Cursor 

cursoragent and others added 2 commits September 4, 2026 23:08
Videos were reaching the native ended state, which flashes the poster
(usually the first frame) before the crossfade. Start the next slide
during the last moments of the clip and freeze the outgoing frame so
the transition never shows a loop.

Co-authored-by: Austin Robinson <austinrobinsondesign@gmail.com>
Co-authored-by: Austin Robinson <austinrobinsondesign@gmail.com>
@vercel

vercel Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
dotcom Ready Ready Preview Sep 5, 2026 12:36am UTC

Request Review

Mount and fully preload the upcoming slide, then start playback in
useLayoutEffect so the incoming video is already moving when the
crossfade begins instead of appearing as a poster still.

Co-authored-by: Austin Robinson <austinrobinsondesign@gmail.com>
Pause on a late frame and drop the poster before play() on the incoming
video, so the browser cannot flash the first frame when the new clip starts.

Co-authored-by: Austin Robinson <austinrobinsondesign@gmail.com>
Keep preload stable and render the poster as an overlay image instead of
the video poster attribute. Changing those on a playing element was
seeking the outgoing clip back to frame 0 at the start of the fade.

Co-authored-by: Austin Robinson <austinrobinsondesign@gmail.com>
If the browser seeks back to 0 on ended, snap to a late frame in
useLayoutEffect so the crossfade never shows the poster restart.

Co-authored-by: Austin Robinson <austinrobinsondesign@gmail.com>
Browsers still seek outgoing clips to 0 at ended, which paints a poster
flash before React can restore the playhead. Rasterize the current frame
and crossfade that still so the handoff cannot show a restart.

Co-authored-by: Austin Robinson <austinrobinsondesign@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants