Canvas-app-recorder
Module to record HTML Canvas and WebAudio based App.
Make sure this module is experimental, and could be drastically changed.
Prerequisites
- Browser should support captureStream/MediaStream and MediaRecorder API.
- Your canvas should not be tainted. (Don't use data loaded from another origin without CORS approval!)
Install and Usage
in-browser
// Instance of your appconst app = ; const canvasRecorder = app // the canvas element used in your app app // the webAudio context used in your app app // the webAudio gainNode // ,anotherGain // you can add more than one gain node; // open dialog after recording to save the result videocanvasRecorderdownloadAfterStop = true; // callback function after stoppingcanvasRecorder { const videoElement = document; documentbody; videoElementloop = true; videoElementsrc = windowURL; videoElement;} // start recordingappstart;canvasRecorderstart; // stop recording in some timing;
ES Modules
npm install canvas-app-recorder
; /* ... same as example above */
CDN
https://cdn.jsdelivr.net/npm/canvas-app-recorder@0.1.0/dist/canvas-app-recorder.min.js
License
MIT