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

Error and camera stays on when unmounting before camera starts #127

Closed
SethThoburn opened this issue Sep 22, 2022 · 1 comment · Fixed by #128
Closed

Error and camera stays on when unmounting before camera starts #127

SethThoburn opened this issue Sep 22, 2022 · 1 comment · Fixed by #128

Comments

@SethThoburn
Copy link
Contributor

If the camera is unmounted before it finishes starting, there are two issues.
First, a setState call is made which puts an error in the console about setting
state on unmounted components. Second, the media stream is not stopped, so the
user's camera stays on.

SethThoburn added a commit to SethThoburn/react-html5-camera-photo that referenced this issue Sep 22, 2022
If the camera was unmounted before it had finished starting, there were two
issues. First, a setState call was made which put an error in the console about
setting state on unmounted components. Second, the media stream was not stopped,
so the user's camera would stay on. This commit fixes that problem.

Fixes MABelanger#127.
SethThoburn added a commit to SethThoburn/react-html5-camera-photo that referenced this issue Sep 22, 2022
If the camera was unmounted before it had finished starting, there were two
issues. First, a setState call was made which put an error in the console about
setting state on unmounted components. Second, the media stream was not stopped,
so the user's camera would stay on. This commit fixes that problem.

Fixes MABelanger#127.
@Jimbart
Copy link

Jimbart commented Oct 11, 2022

I'm also encountering the same issue. I hope the PR gets approved/merged.

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

Successfully merging a pull request may close this issue.

2 participants