Bug 240786 - Video does not respect object-fit:contain when beginning to play
Summary: Video does not respect object-fit:contain when beginning to play
Status: RESOLVED DUPLICATE of bug 240604
Alias: None
Product: WebKit
Classification: Unclassified
Component: Media (show other bugs)
Version: Safari 15
Hardware: All All
: P2 Major
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-05-22 23:37 PDT by Johannes Odland
Modified: 2022-05-28 17:46 PDT (History)
2 users (show)

See Also:


Attachments
Screen recording showing video not respecting object fit the first frames after clicking play. (4.27 MB, video/quicktime)
2022-05-22 23:37 PDT, Johannes Odland
no flags Details
Screen recording showing the issue on Reddit /r/popular (6.38 MB, video/mp4)
2022-05-24 13:23 PDT, Johannes Odland
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Johannes Odland 2022-05-22 23:37:26 PDT
Created attachment 459663 [details]
Screen recording showing video not respecting object fit the first frames after clicking play.

See test example at https://cdpn.io/pen/debug/yLvoEob?authentication_hash=yYryLVaNDLyM


Steps to reproduce:
1. Create a video element with a set width and height and object-fit:cover
2. Set intrinsic dimensions with width and height attributes on the video element. 

Poster respects object-fit:contain.

3. Click play

Current result
The first few frames the video is shown as if object-fit was set to contain. After a few frames rendering is fixed, and the video is shown correctly.
The user experience is jarring. 

Expected result
Both the poster and the video respects object-fit: cover at all times. The poster and the video
Comment 1 Alexey Proskuryakov 2022-05-23 20:14:48 PDT
Is this the same as bug 240604?
Comment 2 Johannes Odland 2022-05-24 02:10:37 PDT
(In reply to Alexey Proskuryakov from comment #1)
> Is this the same as bug 240604?

Yes. This seems to be the same bug.
Comment 3 Johannes Odland 2022-05-24 13:23:56 PDT
Created attachment 459731 [details]
Screen recording showing the issue on Reddit /r/popular

It seems like the issue affects reddit too, as seen in the attachment.

The reddit video element has 'object-fit: contain' set on it.
Comment 4 Alexey Proskuryakov 2022-05-28 17:46:03 PDT
Thank you for confirming!

*** This bug has been marked as a duplicate of bug 240604 ***