Created
July 3, 2019 06:17
-
-
Save falco694/f88366f7091607c3df6c0c86c7e2d126 to your computer and use it in GitHub Desktop.
ウェブカメラの映像と音声を出力します
This file contains 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
<video id="video" width="640" height="480" autoplay></video> | |
<script> | |
var video = document.getElementById("video"); | |
var media = navigator.mediaDevices.getUserMedia({ | |
video: true, | |
audio: true, | |
}); | |
media.then((stream) => { | |
video.srcObject = stream; | |
}); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment