Difference between revisions of "Test LiveFeed"
(Created page with "=LiveFeed Test= <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta content="stuff, to, help, search, engines, not" name="keywords"> <meta content="What this page is ab...") |
|||
| Line 31: | Line 31: | ||
</div> | </div> | ||
<script> | <script> | ||
| + | var video = document.querySelector("#videoElement"); | ||
| + | if (navigator.mediaDevices.getUserMedia) { | ||
| + | navigator.mediaDevices.getUserMedia({video: true}) | ||
| + | .then(function(stream) { | ||
| + | video.srcObject = stream; | ||
| + | }) | ||
| + | .catch(function(err0r) { | ||
| + | console.log("Something went wrong!"); | ||
| + | }); | ||
| + | } | ||
</script> | </script> | ||
</body> | </body> | ||
</html> | </html> | ||
Revision as of 18:15, 4 September 2018
LiveFeed Test
<!DOCTYPE html>