Hi all,
I run Flixxy.com, a family-friendly curated video site with ~9,000 pages embedding YouTube videos via the IFrame Player API and lite-youtube. Our mobile CrUX p75 CLS has been stuck at 0.27–0.30 since November 2025 despite resolving every CLS source our parent-frame PerformanceObserver can see (GA4 now reports near-zero parent-frame CLS on fixed pages).
I finally connected a Pixel via USB remote debugging today and captured the attached DevTools trace. It shows a 0.1529 layout shift at t=19.08s during playback, with the tooltip identifying the culprit as video.video-stream.html5-main-video 392 × 220 - an element inside the cross-origin YouTube iframe. The Insights panel says "Could not detect any layout shift culprits," which I understand to mean the heuristic can't introspect the cross-origin frame, even though the shift itself is clearly visible in the filmstrip (the video area collapses and content below jumps up).
A few questions I'm hoping someone can help with:
- Is CrUX counting these cross-origin iframe shifts in my site's p75 CLS? My understanding is yes, via the Subframe Weighting Factor per the Layout Instability spec, but I'd like to confirm. This would explain why GA4 (parent-frame only) shows CLS ≈ 0 while CrUX shows 0.27.
- Is the "video.video-stream.html5-main-video" shift a known pattern? It seems to correlate with pre-roll-ad-to-main-video transitions or video state changes. Has Google's YouTube Embed team or the Web Vitals team published guidance for publishers embedding YouTube at scale?
- Mitigation options that actually work? I've considered:
- Adding sandbox="allow-same-origin allow-scripts" to the iframe?
- Click-to-play poster pattern so user tap provides hadRecentInput forgiveness for all subsequent shifts
- Locking iframe height via aspect-ratio CSS (already done — doesn't prevent internal shifts)
Has anyone measured real-world CrUX improvements from any of these approaches?
- Is there a way to signal to Chrome that a cross-origin iframe's shifts shouldn't count against the host page? Something analogous to how iframes with loading=lazy don't affect parent LCP? I understand the security/UX rationale for counting them, but publishers have zero control over third-party embed internals.
Happy to share additional traces, GA4 custom-dimension data, or CrUX history if useful. Screenshot of the DevTools trace attached.
Thanks,
Hubert Heller
Flixxy.com