Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Safari media enhancements #1938

Merged
merged 2 commits into from
Mar 3, 2025
Merged

Conversation

Soxasora
Copy link
Member

@Soxasora Soxasora commented Mar 2, 2025

Description

Applies a workaround for Safari's poor handling of block: revert-layer by declaring a minimum width, acting as a fallback for size miscalculation during re-rendering.

Removes overflow: hidden from mediaContainer as Safari was probably calculating its area of effect based on wrong aspect-ratio during loading.

Reverts #1886 per above

Screenshots

Testing in production
L: response local override on prod
R: unmodified prod

fix: Video disappearing or not showing1

Screen.Recording.2025-03-02.at.18.52.30.mp4

fix: Image clipping or not showing

Screen.Recording.2025-03-02.at.19.05.46.mp4

Additional Context

Drafting a bit to test more, avoiding flukes

Even if next Safari versions will permanently fix problems related to object-fit: contain and block: revert-layer, which we use, a workaround is needed for the time being as adoption rate is historically really slow.

Checklist

Are your changes backwards compatible? Please answer below:
Yes

On a scale of 1-10 how well and how have you QA'd this change and any features it might affect? Please answer below:
6.5, tested for hours on prod, still testing

For frontend changes: Tested on mobile, light and dark mode? Please answer below:
n/a

Did you introduce any new environment variables? If so, call them out explicitly here:
n/a

Footnotes

  1. The black screen on full screen is related to my system performances in that moment

@Soxasora Soxasora marked this pull request as ready for review March 3, 2025 20:41
@huumn huumn merged commit 8baf725 into stackernews:master Mar 3, 2025
6 checks passed
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.

2 participants