Skip to content

Instantly share code, notes, and snippets.

@mariotacke
Last active June 30, 2019 02:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mariotacke/afbbf4d5cffeae3ce345b75c7eec0260 to your computer and use it in GitHub Desktop.
Save mariotacke/afbbf4d5cffeae3ce345b75c7eec0260 to your computer and use it in GitHub Desktop.
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