Re: [mediacapture-image] Need to capture unique frames

This is what I ended up doing:

```
}).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/9#issuecomment-357539408 using your GitHub account

Received on Sunday, 14 January 2018 20:23:43 UTC