WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
245511
The size of a video track's settings is incorrect in the second MediaStream created when the 'aspectRatio' contraint is applied
https://bugs.webkit.org/show_bug.cgi?id=245511
Summary
The size of a video track's settings is incorrect in the second MediaStream c...
inanelit
Reported
2022-09-21 20:06:55 PDT
If a webcam video stream is attached to a video element that is not rendered in the DOM, and then we render a video element with the same media constraints, that video element will have incorrect videoHeight and videoWidth. This issue repros in Safari 16 on desktop and mobile. For an example, go to
https://codesandbox.io/s/blissful-snowflake-qdq6fo?file=/src/App.js
and click "Show Webcam" In this example, a useEffect hook creates an unrendered video element and attaches a media stream to it. Clicking show webcam causes a second video element to be rendered using the same video constraints (not the same video stream), along with a canvas that we are drawing from the video to every second. The captured frame drawn on the canvas is distorted because videoHeight and videoWidth are incorrect. Webcam used was built-in webcam for M1 Macbook Pro
Attachments
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2022-09-21 20:42:31 PDT
<
rdar://problem/100254156
>
Ahmad Saleem
Comment 2
2022-09-23 13:10:16 PDT
I am able to reproduce this bug in Safari 16 and Safari Technology Preview 154 and the second stream video is distorted and like crushed or squeezed. While I am not able to reproduce this in Chrome Canary 108 and Firefox Nightly 107. Just wanted to update latest testing results. Thanks!
Eric Carlson
Comment 3
2022-11-03 11:12:26 PDT
The bug is that the sections of the second video stream track are incorrect when the 'aspectRatio' constraint is used. The camera stream is captured at the correct size, but MediaTrackSettings.width and MediaTrackSettings.height have the values of the unconstrained width and height.
Eric Carlson
Comment 4
2022-11-03 11:29:45 PDT
Pull request:
https://github.com/WebKit/WebKit/pull/6093
EWS
Comment 5
2022-11-07 17:16:56 PST
Committed
256433@main
(fc20b78a56dc): <
https://commits.webkit.org/256433@main
> Reviewed commits have been landed. Closing PR #6093 and removing active labels.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug