Web features explorer

captureStream() for <canvas>

Widely available
Tags: api Groups: Canvas

The captureStream() method for <canvas> elements returns a MediaStream which includes a CanvasCaptureMediaStreamTrack representing real-time video of the canvas image. You can use this to record the canvas, or send it elsewhere, such as another canvas or WebRTC connection. To learn more, see CanvasCaptureMediaStreamTrack, CanvasCaptureMediaStreamTrack: canvas property, CanvasCaptureMediaStreamTrack: requestFrame() method, HTMLCanvasElement: captureStream() method at MDN.

Compatibility