Bug 263036 - object-fit:fill doesn't work for a video element using a canvas stream srcObject
Summary: object-fit:fill doesn't work for a video element using a canvas stream srcObject
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Media (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: youenn fablet
URL: https://pingxingyun.github.io/lark_sr...
Keywords: BrowserCompat, InRadar
Depends on:
Blocks:
 
Reported: 2023-10-11 14:14 PDT by Ali Juma
Modified: 2023-10-20 09:21 PDT (History)
10 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ali Juma 2023-10-11 14:14:23 PDT
This was originally reported at crbug.com/1491624 for Chrome on iOS, but also reproduces in Safari 17.0 and STP 180 on macOS.

Steps to reproduce:
1. Create a video element with object-fit: fill
2. Create a canvas element
3. Set the video element's srcObject to canvas.captureStream

Expected outcome:
The video fills the video element

Actual outcome:
The video only takes up part of the video element

Visit https://pingxingyun.github.io/lark_sr_websdk_demos/test_object_fit/ and hit the play button to test this out.

In Gecko and Blink, the video element is entirely blue, but in WebKit only the center portion is blue.
Comment 1 Radar WebKit Bug Importer 2023-10-11 15:26:02 PDT
<rdar://problem/116832514>
Comment 2 Ahmad Saleem 2023-10-12 12:04:19 PDT
I am able to reproduce this bug on WebKit ToT as well.
Comment 3 fcx 2023-10-12 18:26:37 PDT
MediaStream from webrtc peerconnection ontrack callback have this problem too.
Comment 4 youenn fablet 2023-10-20 06:46:29 PDT
Pull request: https://github.com/WebKit/WebKit/pull/19339
Comment 5 EWS 2023-10-20 09:21:10 PDT
Committed 269568@main (45f8986d1196): <https://commits.webkit.org/269568@main>

Reviewed commits have been landed. Closing PR #19339 and removing active labels.