MCPcopy Create free account
hub / github.com/Vishal-raj-1/Awesome-JavaScript-Projects / setUpCamera

Function setUpCamera

assets/js/face_detector.js:6–13  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

4let ctx = canvas.getContext("2d");
5
6const setUpCamera = () => {
7 navigator.mediaDevices.getUserMedia({
8 video: { width: 600, height: 400 },
9 audio: false,
10 }).then(stream => {
11 video.srcObject = stream;
12 })
13}
14
15const detectFaces = async () => {
16 const prediction = await model.estimateFaces(video, false);

Callers 1

face_detector.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected