perf(landing): stop eager 2.7MB video fetch on mobile (P0, split from #296)#299
Merged
Conversation
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
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This was referenced Jun 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What (P0 only — split from #296)
Mobile
VideoSectionno longer autoplays.autoPlaywas overridingpreload="none"(HTML spec), forcing eager download of the 2.7MBvoidpay-9x16-v2.mp4on 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)
Verification
P0 acceptance was validated by Iris on #296 (9/9 P0 criteria pass). This branch is the same VideoSection commit (987b866 → 633d288), cherry-picked clean onto develop.
🤖 Generated with Claude Code