Bug 230624 - MediaStream canvas.captureStream() for Canvas element provides frames too late
Summary: MediaStream canvas.captureStream() for Canvas element provides frames too late
Status: REOPENED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebRTC (show other bugs)
Version: WebKit Local Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2021-09-22 06:28 PDT by Kimmo Kinnunen
Modified: 2021-10-01 03:25 PDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kimmo Kinnunen 2021-09-22 06:28:44 PDT
MediaStream canvas.captureStream() for Canvas element provides frames too late

To observe, obtain bug 230613 testcase mediastream-canvas-to-video.html

When canvas draws, the frame should go to the video.
Instead it doesn't go anywhere.
When the canvas draws a new frame, previous frame goes to video.
Comment 1 Radar WebKit Bug Importer 2021-09-29 06:29:18 PDT
<rdar://problem/83668648>
Comment 2 Kimmo Kinnunen 2021-10-01 02:56:43 PDT
Will be fixed by bug 231022

*** This bug has been marked as a duplicate of bug 231022 ***
Comment 3 Kimmo Kinnunen 2021-10-01 03:12:59 PDT
Scratch that, probably too risky. Should fix it separately
Comment 4 Kimmo Kinnunen 2021-10-01 03:25:32 PDT
The frame should be captured and provided to video element during canvas display buffer preparation. However, at that moment the tree is already laid out. Submitting a frame will cause needs-layout assertion.