viro icon indicating copy to clipboard operation
viro copied to clipboard

How can we retrieve the details of the Camera?

Open felixchan opened this issue 3 years ago • 1 comments

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

felixchan avatar Jan 04 '23 07:01 felixchan

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

skizzo avatar May 31 '23 08:05 skizzo