i have a webcam script but it doesnt seem to work i also dont get any console errors can some one please help me to see what m i doing wrong
Photo.js
(function(){
var video = document.getElementById('video'),
vendorURL = window.URL || window.webkitURL;
navigator.getMedia = navigator.getUserMedia ||
navigator.WebKitGetUserMedia||
navigator.msGetUserMedia;
navigator.getMedia({
video:true,
audio:false
}, function(stream) {
video.src = vendorURL.createObjectURL(stream);
video.play();
}, function(error) {
//an error occured
//error.code
});
});
index.html
<div class="booth">
<video id="video" width="400" height="300"></video>
</div><!-- end booth -->
and here is a fiddle Fiddle
This tutorial is script is taken from https://youtu.be/gA_HJMd7uvQ?t=456