This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(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); |