Skip to content

Conversation

@andrewvarga
Copy link
Contributor

Fixes #9182 on safari.

It's pretty weird, but very easily reproducible on Safari and object-fit: fill fixes it.
https://hacks.mozilla.org/2015/02/exploring-object-fit/#:~:text=Overriding%20a%20video%E2%80%99s%20aspect%20ratio%20with%20object%2Dfit%3A%20fill

I only apply to Safari because it makes the video stretch in Chrome during the resize (it's correct when the resizing stops, but it looks a bit weird in the interim).

Doing a bit more investigation to see if there is an alternative solution to this..

@andrewvarga andrewvarga requested a review from a team as a code owner December 30, 2025 21:43
@vercel
Copy link

vercel bot commented Dec 30, 2025

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

Project Deployment Review Updated (UTC)
modeling-app Ready Ready Preview, Comment Jan 1, 2026 11:36am

@andrewvarga andrewvarga marked this pull request as draft December 30, 2025 21:44
@andrewvarga andrewvarga changed the title #9182 fix video resize bug on safari by applying object-fit: fill #9182 Fix video resize bug on safari by applying object-fit: fill Jan 1, 2026
Copy link
Contributor

@pierremtb pierremtb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested in vercel and that fixes it. The stretch-on-resize looks weird but it's definitely an improvement since it doesn't break once the resize is done.

@andrewvarga
Copy link
Contributor Author

Tested in vercel and that fixes it. The stretch-on-resize looks weird but it's definitely an improvement since it doesn't break once the resize is done.

Thanks. I haven't really found a more elegant solution yet, so I'll merge this and we can replace it with something better if we find one. I don't feel like it's risky because its Safari specific and only improves the situation there.

@andrewvarga andrewvarga marked this pull request as ready for review January 5, 2026 17:18
@andrewvarga andrewvarga merged commit 89034bc into main Jan 5, 2026
56 checks passed
@andrewvarga andrewvarga deleted the andrewvarga/9182/safar-video-resize-bug branch January 5, 2026 17:18
@pierremtb
Copy link
Contributor

100%

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.

Stream resize is broken on Safari

3 participants