spite / ccapture.js

A library to capture canvas-based animations at a fixed framerate
MIT License
3.55k stars 406 forks source link

Angular NPM WebMWriter not defined #135

Open miloadam99 opened 2 years ago

miloadam99 commented 2 years ago

I'm using angular 12 and have tried many different ways to include the webm-writer.

This error occurs when I do ccapture.capture(): WebMWriter is not defined at new CCWebMEncoder (CCapture.js:283) at new CCapture (CCapture.js:633) at visualizer.service.ts:149 at Generator.next () at asyncGeneratorStep (asyncToGenerator.js:3) at _next (asyncToGenerator.js:25) at asyncToGenerator.js:32 at new ZoneAwarePromise (zone.js:1387) at asyncToGenerator.js:21 at VisualizerService.exportVisuals (visualizer.service.ts:147)

let ccapturer = new CCapture({ verbose: true, display: true, framerate: framerate, motionBlurFrames: 0, quality: 100, format: "webm", timeLimit: this.audioPlayer.soundDuration?.value, frameLimit: 0, autoSaveTime: 0, });

"scripts": [ "node_modules/ccapture.js/build/CCapture.min.js", "node_modules/ccapture.js/src/webm-writer-0.2.0.js" ],

using package github:aceslowman/ccapture.js#npm-fix

Xyndra commented 1 year ago

same with astro/svelte

Quicksticks-oss commented 4 months ago

Did anyone find a solution?