ReactVision / viro

ViroReact: The AR and VR library for React Native 📳💙💛🤍💚
MIT License
1.3k stars 150 forks source link

How can we retrieve the details of the Camera? #189

Open felixchan opened 1 year ago

felixchan commented 1 year ago

For example, I'd like the field of view of the default camera.

skizzo commented 1 year ago

Try using react-native-vision-camera and fetch the device like this:

const devices = await Camera.getAvailableCameraDevices()
const devicesViro = devices
  .filter(d => d.position === "back")
  .filter(d => d.supportsParallelVideoProcessing)
// use Viro's view's measured dimensions to determine fieldOfView of used device's format