Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

javascript use camera

<input type="file" accept="image/*;capture=camera">
Comment

how to open a camera using js?

<video autoplay></video>
<script>
  var onFailSoHard = function(e) {
    console.log('Reeeejected!', e);
  };

  // Not showing vendor prefixes.
  navigator.getUserMedia({video: true, audio: true}, function(localMediaStream) {
    var video = document.querySelector('video');
    video.src = window.URL.createObjectURL(localMediaStream);

    // Note: onloadedmetadata doesn't fire in Chrome when using it with getUserMedia.
    // See crbug.com/110938.
    video.onloadedmetadata = function(e) {
      // Ready to go. Do some stuff.
    };
  }, onFailSoHard);
</script>
Comment

PREVIOUS NEXT
Code Example
Javascript :: javascript clone array of objects 
Javascript :: get javascript min date 
Javascript :: how to create react native project at specific version 
Javascript :: aos js cdn 
Javascript :: nodemailer custom font 
Javascript :: js encode to & 
Javascript :: discount calculations javaScript 
Javascript :: encodeurl in javascript 
Javascript :: create angular app with routing and scss 
Javascript :: print json pretty linux 
Javascript :: nghide angular 10 
Javascript :: get caret position javascript 
Javascript :: for each python json 
Javascript :: define default no cache axios headers 
Javascript :: react open url with button 
Javascript :: toggle attribute jquery 
Javascript :: how to go to next page on button click js 
Javascript :: how create a delay for html js 
Javascript :: js transform 
Javascript :: bootstrap cdn for react 
Javascript :: check if file is empty javascript fs 
Javascript :: javascript clear interval 
Javascript :: convert timestamp to date javascript 
Javascript :: js code to take value from form and store it in a variable 
Javascript :: js is date 
Javascript :: read csv file in javascript 
Javascript :: jquery alert design 
Javascript :: react delete button onclick 
Javascript :: next js script tag 
Javascript :: how to get current date in react js 
ADD CONTENT
Topic
Content
Source link
Name
1+5 =