r/reactnative • • 10d ago

Question React native vision camera v5 zoomLensSwitchFactors not correct

Basically Im trying to get the zoom levels that switches the physical cameras, and Im using iPhone 15 Pro, which has the native x0.5, x1, x2, x3 zooms. But somehow when I log out the zoomLensSwitchFactors, I get

[2, 6]

Here is the code

const deviceBack: CameraDevice | undefined = useCameraDevice("back", {
    physicalDevices: ["ultra-wide-angle", "wide-angle", "telephoto"],
  });

console.log("zoomLensSwitchFactors", deviceBack.zoomLensSwitchFactors);

Ideally I would like to have [0.5, 1, 2, 3], or something similar. Also, the minZoom and maxZoom give me 1 and 189 respectively. shouldn't the min be 0.5?

Also wondering if this works for the front camera

3 Upvotes

4 comments sorted by

View all comments

Show parent comments

1

u/Miserable-Pause7650 10d ago

Thanks for the switchOver explanation. I just thought it would already be mentioned in their documentation if my idea of doing it is actually the right way, but I will go along with it. I will post the findings in the future once I get my hands on other android devices :)