Bug 264727

Summary: CSS attribute `object-fit` broken for videos since iOS17.1.1
Product: WebKit Reporter: Gilad Bar <giladbar6>
Component: MediaAssignee: Nobody <webkit-unassigned>
Status: RESOLVED DUPLICATE    
Severity: Major CC: jer.noble, rt12148, simon.fraser, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: Safari 17   
Hardware: iPhone / iPad   
OS: iOS 17   
See Also: https://bugs.webkit.org/show_bug.cgi?id=264293
Attachments:
Description Flags
Broken behavior on Facebook Reels, TikTok, YouTube shorts none

Description Gilad Bar 2023-11-13 01:04:01 PST
Created attachment 468576 [details]
Broken behavior on Facebook Reels, TikTok, YouTube shorts

Ever since I've upgraded to iOS17.1.1, I'm getting a broken behavior for `object-fit` in Safari on my iPhone:

- `object-fit: contain` - the video starts either zoomed-in or out for a moment, then goes back to normal (sometimes it stays zoomed)
- `object-fit: cover` - the video starts with a black flashing, then goes back to normal

In the attached video, you can see the 2 behaviors on different apps:
- Facebook Reels - `object-fit: contain` - the video starts zoomed-in, then goes back to normal
- TikTok - `object-fit: contain` - the video starts zoomed-in/out, then goes back to normal
- TikTok - `object-fit: cover` - TikTok tried fixing the bug, so instead of being zoomed, the video starts with a black flickering
- YouTube shorts - `object-fit: cover` - the video starts with a black flickering
Comment 1 Radar WebKit Bug Importer 2023-11-17 20:11:11 PST
<rdar://problem/118590756>
Comment 2 Simon Fraser (smfr) 2024-01-11 15:50:44 PST
Should be fixed by https://commits.webkit.org/271859@main
Comment 3 rt12148 2024-02-13 09:26:45 PST
@smfr when will this land in safari? is it already released?
Comment 4 Alexey Proskuryakov 2024-02-13 10:53:29 PST
This should be fixed in iOS 17.4 beta. Please let us know if it's not, or if you are observing any other issues.

*** This bug has been marked as a duplicate of bug 264293 ***
Comment 5 rt12148 2024-02-13 21:53:56 PST
The issue seems to be resolved in Safari Technology preview(17.4). Is there any alternative fix we can apply until the safari release from our end?
Comment 6 rt12148 2024-02-13 21:55:24 PST
The issue is also happening in MacOS safari. not just iOS in 17.3.1