WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
257016
Media recorder produces empty chunks
https://bugs.webkit.org/show_bug.cgi?id=257016
Summary
Media recorder produces empty chunks
Jozef
Reported
2023-05-19 03:01:39 PDT
Created
attachment 466413
[details]
canvas-bug-mwe When attaching MediaStream before context in canvas is created then MediaRecorder produces only empty chunks. Steps to replicate: 1. Open the provided html file 2. Click the button 3. You will see only empty chunks in console 4. Uncomment the line #14 and comment code on line #17 5. Click the button again 6. You will see one non-empty chunk in console
Attachments
canvas-bug-mwe
(1.01 KB, text/html)
2023-05-19 03:01 PDT
,
Jozef
no flags
Details
View All
Add attachment
proposed patch, testcase, etc.
youenn fablet
Comment 1
2023-05-23 02:34:29 PDT
I reproduced the issue. The difference seems to be that HTMLDocument is made observer of the canvas when it works and not when it works. It follows that Document::canvasChanged is called which triggers preparation of canvas, which triggers a video frame in the stream.
Radar WebKit Bug Importer
Comment 2
2023-05-23 02:34:47 PDT
<
rdar://problem/109705910
>
youenn fablet
Comment 3
2023-05-23 02:36:54 PDT
In the failing case, CanvasCaptureMediaStreamTrack::Source::canvasChanged returns early because the rendering context needsPreparationForDisplay returns true. But the document is not observing the canvas so ends up not triggering the code path of HTMLCanvasElement::prepareForDisplay.
youenn fablet
Comment 4
2023-05-23 03:48:59 PDT
Pull request:
https://github.com/WebKit/WebKit/pull/14236
EWS
Comment 5
2023-05-24 09:19:36 PDT
Committed
264478@main
(712b8a916d0d): <
https://commits.webkit.org/264478@main
> Reviewed commits have been landed. Closing PR #14236 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