1.0.1 • Published 1 year ago

@perry-rylance/node-canvas-video-recorder v1.0.1

Weekly downloads
-
License
-
Repository
github
Last release
1 year ago

Node Canvas Video Recorder

Drop in package for recording video from a canvas element.

Installation

  • npm install @perry-rylance/node-canvas-video-recorder.
  • In your projects package.json add "capture": "npx ts-node-esm ./node_modules/@perry-rylance/node-canvas-video-recorder/src/server.ts".
  • In your projects package.jsonadd a capture object, this needs to specify url, output, width and height.

Usage

  • You need a server serving up a page with your canvas on at the URL you previously specified in package.json's capture.
  • The page must have a canvas element.
  • The page must add a method render to the window, which receives playhead (0.0 - 1.0).
  • Your render function should manipulate the canvas.
  • Run npm run capture to generate output.mp4
1.0.1

1 year ago

1.0.0

1 year ago