[Webkit-unassigned] [Bug 245511] New: Attaching a stream to a video element not in the DOM causes incorrect video dimensions to be reported in a second video element that is actually rendered to the DOM

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Sep 21 20:06:55 PDT 2022


https://bugs.webkit.org/show_bug.cgi?id=245511

            Bug ID: 245511
           Summary: Attaching a stream to a video element not in the DOM
                    causes incorrect video dimensions to be reported in a
                    second video element that is actually rendered to the
                    DOM
           Product: WebKit
           Version: Safari 16
          Hardware: All
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: WebRTC
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: inanelit at gmail.com
                CC: youennf at gmail.com

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

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20220922/e8a03658/attachment.htm>


More information about the webkit-unassigned mailing list