Skip to content

Instantly share code, notes, and snippets.

@sb2702
Last active February 26, 2021 18:59
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 sb2702/9d1ebbfdef025268757e798bf3ad85c0 to your computer and use it in GitHub Desktop.
Save sb2702/9d1ebbfdef025268757e798bf3ad85c0 to your computer and use it in GitHub Desktop.
<head>
<script src="upscaler.js"></script>
</head>
<body>
<div id="container" style="width: 960px; height: 720px;">
<video autoplay="" width="320" height="240" crossorigin="anonymous">
</div>
<script>
const constraints = {
video: { width:320, height: 240 },
};
const video = document.querySelector("video");
navigator.mediaDevices.getUserMedia(constraints).then((stream) => {
video.srcObject = stream;
});
const upscaler = new vectoryUpscaler(video, {width: 320, height: 240});
</script>
</body></html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment