Skip to content

Instantly share code, notes, and snippets.

View bojandragojevic's full-sized avatar

Bojan Dragojevic bojandragojevic

View GitHub Profile
@bojandragojevic
bojandragojevic / canvasrecord.js
Created November 7, 2016 09:25 — forked from PaulKinlan/canvasrecord.js
Screen recorder in JS
(function() {
let canvas = document.querySelector('canvas');
// Optional frames per second argument.
let stream = canvas.captureStream(25);
let recorder = new MediaRecorder(stream, options);
let blobs = [];
function download(blob) {
var url = window.URL.createObjectURL(blob);
var a = document.createElement('a');