first commit
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
const webcamElement = document.getElementById('webcam');
|
||||
const canvasElement = document.getElementById('canvas');
|
||||
const snapSoundElement = document.getElementById('snapSound');
|
||||
if(webcamElement && canvasElement && snapSoundElement){
|
||||
const webcam = new Webcam(
|
||||
webcamElement,
|
||||
'user',
|
||||
canvasElement,
|
||||
snapSoundElement,
|
||||
);
|
||||
|
||||
webcam
|
||||
.start()
|
||||
.then((result) => {
|
||||
console.log('webcam started');
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log(err);
|
||||
});
|
||||
|
||||
var picture = webcam.snap();
|
||||
}
|
||||
Reference in New Issue
Block a user