Our pages are suffering from low Lighthouse scores because the Vimeo player uses WebXR
statico opened this issue · comments
Expected Behavior
Lighthouse scores should not penalize us for embedding the Vimeo player using the @vimeo/player
library:
player = new Player(`video-container-${videoId}`, {
id: videoId,
width: playerDimensions?.contentBox.width,
height: playerDimensions?.contentBox.height,
})
Actual Behavior
Running a Lighthouse performance test in Chrome complains about the Vimeo player:
Page prevented back/forward cache restoration
Pages that use WebXR are not currently eligible for back/forward cache.
The page has an unload handler in a sub frame.
Steps to Reproduce
- Visit https://vvqmnx.csb.app/ (Source: https://codesandbox.io/s/vimeo-player-lighthouse-test-vvqmnx?file=/src/index.html)
- Open Chrome dev tools -> Lighthouse -> "Analyze page load"
- See error
Hi @statico - I'm not able to run Lighthouse on the page provided (it's reporting an error), and when I run it on a raw player embed URL, I'm not seeing that specific issue. Is there anything different I need to do to reproduce?
@rkrishnan8594 Oops, here's an updated URL: https://statico-misc.s3.amazonaws.com/repro/vimeo-player.html
Interesting. I'm now seeing that result when running Lighthouse in Chrome's developer tools:
But I'm seeing different results when running Lighthouse via Chrome extension (top) and PageSpeed Insights (bottom):
Not sure why there are those discrepancies, and I'm not sure what specifically is causing that diagnostic for one of the reports. We include WebVR support in the player, so perhaps something in that code is triggering this. I'll file an internal ticket for us to explore dynamically loading said code when needed, but for now, this will be a low priority because of the lack of clarity surrounding the issue and the still good performance scores (99-100 despite this issue).