- From: Michal via GitHub <sysbot+gh@w3.org>
- Date: Sun, 14 Jan 2018 20:24:27 +0000
- To: public-media-capture-logs@w3.org
This is what I ended up doing. It is actually a lot more performant. ``` }).then((stream) => { const video = document.createElement('video'); video.srcObject = stream; video.onloadedmetadata = () => { video.play(); setInterval(() => { const canvas = document.createElement('canvas'); canvas.getContext('2d').drawImage(video, 0, 0, 800, 800); canvas.toBlob(blob => { toBuffer(blob, function (err, buffer) { if (err) throw err; // do some magic with buffer }); }); }, 40); }; ``` -- GitHub Notification of comment by developer239 Please view or discuss this issue at https://github.com/w3c/mediacapture-image/issues/197#issuecomment-357539459 using your GitHub account
Received on Sunday, 14 January 2018 20:25:28 UTC