margelo / margelo/react-native-vision-camera
Neutral zoom?
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 9.6k
- Forks
- 1.4k
- Avg merge
- 1d 28m
- Merged PRs (30d)
- 4
Description
Prerequisites
- I have searched existing issues for a similar request.
What problem are you trying to solve?
This isn't a feature request, but it didn't fit the bug template. Not sure whether this is a bug, a docs issue, or user error.
On an iOS device with an ultra-wide-angle camera:
const device = useCameraDevice('back', { physicalDevices: ['ultra-wide-angle', 'wide-angle', 'telephoto'] })
console.log(device.minZoom)
console.log(device.zoomLensSwitchFactors)
Proposed API / solution
The docs on zooming say:
If a virtual Camera contains an 'ultra-wide-angle' Camera (the "0.5x Camera"), the user may zoom out to less than 1 (here 0.5) instead.
minZoom <= 1 (e.g. 0.5x)
natural zoom = 1
maxZoom >= 1 (e.g. 3x)
And the section on zoomLensSwitchFactors says:
const camera = ... // Triple-Camera (0.5x, 1x, 3x)
camera.zoomLensSwitchFactors // [1, 3]
But the actual output is:
console.log(device.minZoom) // 1
console.log(device.zoomLensSwitchFactors) // [2, 8]
Is this the expected output?
In vision camera v4, there was a neutralZoom property, but that doesn't exist in v5. If minZoom is correctly returned as 1, how is the application meant to determine that neutralZoom should be 2?
Alternatives considered
No response
Platforms this should target
iOS
Would you be willing to contribute this?
No, I'm requesting only.
Additional context
No response
Submission
- I described the problem, not just the solution.
- I wrote this request in my own words. I did not paste AI-generated proposals.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the linked zooming documentation and CameraDevice API entries, then reproduce the reported iOS values for minZoom and zoomLensSwitchFactors. Compare them with the documented 0.5x/1x/3x behavior and the v4 neutralZoom reference; done means the expected neutral zoom behavior and API documentation are clarified.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ios, react-native, typescript
- Domain
- api, documentation, mobile
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100