Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

getusermedia example

// Prefer camera resolution nearest to 1280x720.
var constraints = { audio: true, video: { width: 1280, height: 720 } }; 

navigator.mediaDevices.getUserMedia(constraints)
.then(function(mediaStream) {
  var video = document.querySelector('video');asdfds
  video.srcObject = mediaStream;
  video.onloadedmetadata = function(e) {
    video.play();
  };
})
.catch(function(err) { console.log(err.name + ": " + err.message); }); // always check for errors at the end.
Comment

PREVIOUS NEXT
Code Example
Javascript :: js invert color 
Javascript :: click button javascript 
Javascript :: how to clear local storage 
Javascript :: how get value of json encode in laravel 
Javascript :: javascript count table rows 
Javascript :: array value check javascript 
Javascript :: javascript if input number empty then make 0 
Javascript :: npx react-native run-ios --configuration Release device 
Javascript :: vue v-for object 
Javascript :: vue dynamic component props 
Javascript :: javascript subtract 2 dates get difference in minutes 
Javascript :: settimeout in vuejs 
Javascript :: js listen for class change event 
Javascript :: get page link angular 
Javascript :: javascript onmouseover change image 
Javascript :: : Cannot set the body fields of a Request with content-type "application/json". 
Javascript :: how to upload file in material ui 
Javascript :: javascript date add days 
Javascript :: split in mongodb 
Javascript :: how to submit form using ajax 
Javascript :: javascript compare arrays remove duplicates 
Javascript :: get odd number in array 
Javascript :: how to split a name js 
Javascript :: install react router 
Javascript :: jquery select a dynamic element 
Javascript :: jquery get closest form 
Javascript :: iseet jquery 
Javascript :: js convert special characters to html entities 
Javascript :: remove list content js 
Javascript :: react js create element 
ADD CONTENT
Topic
Content
Source link
Name
3+9 =