Skip to main content
100%

canvas recorder (use theRecorder.stop() to stop and save as .webm video)

✓ Published0🌍 Public
TTBD
Last edited Feb 3, 2021
Created on Feb 3, 2021

This example records the live drawing on a canvas element to a WebM video file. It uses the `captureStream()` method on a canvas with the class `drawingArea` and a custom `MediaRecorder` object to capture the stream. The recorder collects data chunks via `ondataavailable` and, upon stopping, stops the video track and saves the recorded chunks as `test.webm` using a Blob and object URL. The source code relies on the canvas-recorder library from GitHub.

AI-generated description

Similar vizzes