Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

web cam light is still on, when I click the close camera button #39

Open
shreyshreyansh opened this issue Jun 27, 2021 · 1 comment
Open

Comments

@shreyshreyansh
Copy link

No description provided.

@devjs1000
Copy link

devjs1000 commented Jan 12, 2022

#39

for starting the web cam

function startRecording(){
 navigator.mediaDevices
      .getUserMedia({ video: { height: 300, width: 300 } })
      .then((stream) => {
  window.localStream = stream;
 }
}

for stoping the webcam

function stopRecording(){
localStream.getVideoTracks()[0].stop();
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants