Skip to content

Instantly share code, notes, and snippets.

@ggarber
Created June 4, 2018 20:51
Show Gist options
  • Save ggarber/0402c73c1367eb686fd43be3c1151510 to your computer and use it in GitHub Desktop.
Save ggarber/0402c73c1367eb686fd43be3c1151510 to your computer and use it in GitHub Desktop.
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<style>
video {
margin: 2px;
border-radius: 200px;
object-fit: cover;
border-width: 0ps;
}
</style>
</head>
<body style="-webkit-app-region: drag">
<video id="video0" width="80" height="80" autoplay></video>
<video id="video1" width="80" height="80" autoplay></video>
<video id="video2" width="80" height="80" autoplay></video>
<script>
navigator.mediaDevices.getUserMedia({ video: true })
.then(stream => {
document.getElementById("video0").srcObject = stream;
document.getElementById("video1").srcObject = stream;
document.getElementById("video2").srcObject = stream;
});
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment