-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
✨ De-couple use-cases (Allow photo-only capture without microphone permission, ..) #78
Comments
Hi! Sorry, that is currently not supported. The Camera is designed to be used with both Photo and Video capture always being ready. I will convert this to a feature request and pick this up in the future. |
It should be possible to capture video without audio permission, so this could be for example a prop like audio={false} like react native camera does |
Interesting to see demand for this.
I'm not going to do it this way, since that's going to be a bit ugly when there are multiple props (no video, video without audio, no photo, no frame processors, etc). return <Camera audio={true} photo={true} video={true} frameProcessor={true} /> See how that gets ugly quickly? Also it's not really meaningful and pretty hard to read. Also, I like to avoid props that are Instead I'm thinking about creating a config; return <Camera useCases={['photo', 'video-with-audio', 'frame-processor']} /> Only thing annoying me is memoization in this case. It's ugly to use I'll try to think of something fancy & easy to use soon. |
I mean that prop defaulting to true, so what could happen is
|
Exactly, that's something I don't really like. Props that default to true are added confusion, especially in this case since those are booleans and don't have a |
Ah okay, yeah I agree makes more sense to be a prop |
I'm also interested in this. |
With the newest version (2.1.0) you can just remove the |
Just in case if anyone needs this here is a patch to turn off the audio related errors and stuff
|
doesn't android crash when it doesn't have microphone permission in a video recording? |
Sorry, I didn't test that. |
Just added difference highlighting. Thanks, @G0retZ for this.
|
I've implemented this in #168. Try upgrading to 2.2.0 and make sure to check out the docs for the |
Great! Thank you! |
Hello,
I would like to know if there is a way that microphone permission is not requested to the user when we just want to take photo and not any movie.
I have tried to use the following camera props but the microphone access is still requesting to the users:
preset= "photo"
Many thanks for your help
The text was updated successfully, but these errors were encountered: