Skip to content

perf(landing): stop eager 2.7MB video fetch on mobile (P0, split from #296)#299

Merged
ignromanov merged 1 commit into
developfrom
perf/landing-video-only
Jun 5, 2026
Merged

perf(landing): stop eager 2.7MB video fetch on mobile (P0, split from #296)#299
ignromanov merged 1 commit into
developfrom
perf/landing-video-only

Conversation

@ignromanov
Copy link
Copy Markdown
Owner

What (P0 only — split from #296)

Mobile VideoSection no longer autoplays. autoPlay was overriding preload="none" (HTML spec), forcing eager download of the 2.7MB voidpay-9x16-v2.mp4 on the critical path. Now: poster + tap-to-play via native controls; preload="none" actually defers the fetch. Desktop autoplay + reduced-motion paths preserved. IntersectionObserver skipped on mobile.

Why split

#296 bundled P0 (video) + P1 (RSC codec lift). Official PSI (mobile, 3× median) showed P1's RSC lift introduced an LCP/SI regression (pulls demo-invoice render into the critical path). P0 is a clean isolated win and ships on its own; P1 is being reworked separately.

Effect (P0 isolated)

  • 2.7MB MP4 removed from the landing initial network trace on mobile.
  • TBT / payload unaffected negatively; CLS stays 0.

Verification

P0 acceptance was validated by Iris on #296 (9/9 P0 criteria pass). This branch is the same VideoSection commit (987b866633d288), cherry-picked clean onto develop.

🤖 Generated with Claude Code

On mobile, autoPlay was set to !prefersReducedMotion which overrides
preload="none" per HTML spec, causing the full 2.7MB MP4 to download
on the critical path. Gate autoPlay on !isMobile && !prefersReducedMotion
so the deferred fetch actually defers on mobile.

- Show poster with native controls on mobile (tap-to-play)
- Skip IntersectionObserver autoplay resume on mobile
- Desktop behavior unchanged (autoplay when not reduced-motion)
- Add tests: mobile no-autoplay, mobile controls present
@vercel
Copy link
Copy Markdown

vercel Bot commented Jun 5, 2026

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

Project Deployment Actions Updated (UTC)
voidpay Ready Ready Preview, Comment Jun 5, 2026 5:08pm

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.

1 participant