Skip to content

Instantly share code, notes, and snippets.

View drlongnecker's full-sized avatar
🎯
Working on everything and anything.

David R. Longnecker drlongnecker

🎯
Working on everything and anything.
View GitHub Profile
@PaulKinlan
PaulKinlan / canvasrecord.js
Last active May 7, 2024 04:04
Screen recorder in JS
(function() {
let canvas = document.querySelector('canvas');
// Optional frames per second argument.
let stream = canvas.captureStream(25);
var options = {mimeType: 'video/webm; codecs=vp9'};
let recorder = new MediaRecorder(stream, options);
let blobs = [];
function download(blob) {
var url = window.URL.createObjectURL(blob);