Last active
June 30, 2019 02:51
-
-
Save mariotacke/afbbf4d5cffeae3ce345b75c7eec0260 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
const constraints = { | |
video: { | |
width: 512, | |
height: 512, | |
}, | |
}; | |
navigator.getUserMedia(constraints, function (stream) { | |
video.srcObject = stream; | |
video.play(); | |
}, (err) => console.error(err)); | |
video.addEventListener('play', function () { | |
window.requestAnimationFrame(processFrame); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment