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

Turn on/off camera #21

Open
drigos opened this issue May 11, 2020 · 5 comments
Open

Turn on/off camera #21

drigos opened this issue May 11, 2020 · 5 comments

Comments

@drigos
Copy link

drigos commented May 11, 2020

Is there a way to turn camera off and on?

@yeungma
Copy link

yeungma commented Sep 5, 2020

Same question - how to turn off/on camera?

@kybarg
Copy link
Owner

kybarg commented Nov 3, 2020

@drigos @yeungma What do you mean by that? Do you want to stops video stream? OR phyisycally turn camera off?

@yeungma
Copy link

yeungma commented Nov 5, 2020 via email

@piiok
Copy link

piiok commented Dec 2, 2020

The cam turn off when you unmount component

@kevin-ping
Copy link

kevin-ping commented Mar 20, 2021

this works for me in my react project

set a hook eg.
const [camera, setCamear] = useState(false);

assign a button to toggle this hook, then use this hook to control 《QrReader》 in the render section
{camera && 《QrReader》 }

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

5 participants