Bug 257956

Summary: MediaStream from canvas (captureStream) cannot be rendered into a different canvas
Product: WebKit Reporter: Simon Leber <simon.leber>
Component: CanvasAssignee: youenn fablet <youennf>
Status: RESOLVED FIXED    
Severity: Normal CC: dino, eric.carlson, jer.noble, markericc02, roch.sebastien, simon.leber, webkit-bug-importer, youennf
Priority: P2 Keywords: InRadar
Version: Safari 16   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Reproduction none

Description Simon Leber 2023-06-12 08:02:40 PDT
The Mediastream returned from a canvas captureStream call can not be used to be rendered into another canvas using drawImage (2d context) or createImageBitmap/transferFromImageBitmap (bitmaprenderer context)
The following CodePen shows the problem in a short example.

https://codepen.io/sleb91/pen/bGQdPxq

I have tested on Safari on Mac (Version 16.5 (18615.2.9.11.4)) and latest IOS Safari (16.5)
Comment 1 Sébastien Roch 2023-06-12 08:40:42 PDT
Created attachment 466670 [details]
Reproduction

Attached reproduction as simple HTML file.
Comment 2 Radar WebKit Bug Importer 2023-06-13 01:33:37 PDT
<rdar://problem/110696945>
Comment 3 youenn fablet 2023-06-13 01:36:19 PDT
Pull request: https://github.com/WebKit/WebKit/pull/14910
Comment 4 EWS 2023-06-13 11:40:31 PDT
Committed 265128@main (e7326a948d62): <https://commits.webkit.org/265128@main>

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