Automattic / Automattic/node-canvas

Add `captureStream()` method

Open
#1,698 6 comments 26 reactions 0 assignees View on GitHub
Feature
Dominant language
JavaScript
Stars
10.7k
Forks
1.2k
Avg merge
4d 8h
Merged PRs (30d)
1

Description

Add missing [captureStream](https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement/captureStream) Canvas method. It returns a `MediaStream` object, where on each canvas change a new frame is being added with the actual canvas contest. This is similar to using `node-webrtc` [RTCVideoSource](https://github.com/node-webrtc/node-webrtc/blob/develop/docs/nonstandard-apis.md#rtcvideosource) class and calling to its `onFrame()` method, so probably some code could be reused between both projects. A polyfill can also be created to add that feature, but it would need first to have merged my changes to [notify paint operations](https://github.com/Automattic/node-canvas/pull/1543).

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.