Uh oh!
There was an error while loading. Please reload this page.
perf: optimize hero media using WebM/WebP and reduce asset size - #2221
Conversation
✅ Deploy Preview for expressjscom-preview ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
bjohansebas
left a comment
There was a problem hiding this comment.
Does anyone have the Safari browser so they can test this for me? It seems to be the only browser that doesn’t fully support the WebM format.
ShubhamOulkar
commented
Mar 28, 2026
macOS 11.3+ and iOS/iPadOS 14.1+ or newer supports the WebM container format for VP8/VP9 video codecs. Current video are vp9. can you enable preview url so that we can test? |
krzysdz
commented
Mar 28, 2026
I have old macOS installed (today I booted it for the first time in 3 years) - Ventura 13.4.1 with Safari 16.5.1 and the videos work. VID_20260328_213435-muted.mp4 |
ShubhamOulkar
commented
Mar 29, 2026
Thank you @krzysdz 🤗 for manual tests |
bjohansebas
commented
Mar 31, 2026
@ShubhamOulkar rebase please |
6267e7c to
f6170ecComparebjohansebas
commented
Mar 31, 2026
@ShubhamOulkar keep this PR simple, it distracts from the objective of this and makes it harder for me to review |
…r already loaded video
97407c3 to
72a7a81Compare
I am just lazy to open PR for these were minimal changes logically independent of hero. OK I will not add more commits.🤗 |
ShubhamOulkar
commented
Apr 2, 2026
@bjohansebas should I merge this? I need some of the changes from here. |
Uh oh!
There was an error while loading. Please reload this page.
Refactor hero background video logic to improve reliability, theme switching, and performance.
Changes
display: noneusage for videos/posters and switched toopacityfor smoother transitions and to prevent flickerreadyState(HAVE_FUTURE_DATA)canplayevents on theme switchgetAssets()to remove duplicationvideo.srcchecks (unreliable) in favor ofreadyStategetComputedStylehack) 🚀🚀🚀prefers-reduced-motionResult