react-native-vision-camera
react-native-vision-camera copied to clipboard
❓ How to set the zoom without any gesture?
Question
How to set the zoom without any gesture?
What I tried
I checked the example of vision camera, but it doesn't demonstrate the way to use zoom API, instead it uses gesture to zoom in & out, I just wanted to know how to zoom in & out whenever the user clicks the zoom options. Please check the attachment. As you can see, there are 3 options - 0.5x, 1x, 3x.
So there are 2 questions here:
- Is there any method to zoom in & out without using gesture? If so, what's the method? and pls provide me the example.
- Is it possible to zoom out as 0.5x? if so, how to do?
VisionCamera Version
^2.14.1
Additional information
- [ ] I am using Expo
- [X] I have read the Troubleshooting Guide
- [X] I agree to follow this project's Code of Conduct
- [X] I searched for similar questions in the issues page as well as in the discussions page and found none.
Did you try to play with zoom field? Try to change that number (honestly didn't try it before, but I guess it should work)
@adembacajmemmo I don't see any zoom field on doc.

There is zoom, you can also find documentation for it here: https://mrousavy.com/react-native-vision-camera/docs/guides/zooming
Except animation zoom, you can change that field by yourself
Closing as this is a stale issue - this might have been fixed with the full rewrite in VisionCamera V3 (🥳) - if not, please create a new issue.
If your issue has been fixed, consider sponsoring me on GitHub to say thanks 💖