test camera
This commit is contained in:
parent
ac1e49dc80
commit
8e8d317da3
|
@ -80,13 +80,7 @@ const Home = () => {
|
|||
startWebcam();
|
||||
|
||||
return () => {
|
||||
if (videoRef.current) {
|
||||
(videoRef.current.srcObject as MediaStream)
|
||||
?.getTracks()
|
||||
.forEach((track) => {
|
||||
track.stop();
|
||||
});
|
||||
}
|
||||
|
||||
};
|
||||
}, []);
|
||||
|
||||
|
|
Loading…
Reference in New Issue