Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript video feed

<video autoplay="true" id="video"><video>
<script>
  video = document.getElementById("video");
  if (navigator.mediaDevices.getUserMedia) {
     navigator.mediaDevices
     .getUserMedia({ video: true })
     .then(function(stream) {
         video.srcObject = stream;
     })
     .catch(function(error) {
          console.log("Something went wrong!");
     });
  }
<script>
 
PREVIOUS NEXT
Tagged: #javascript #video #feed
ADD COMMENT
Topic
Name
3+1 =