Skip to content

Release 3.1.0

Compare
Choose a tag to compare
@mrousavy mrousavy released this 25 Sep 11:05
· 446 commits to main since this release

3.1.0 (2023-09-25)

VisionCamera 3.1.0 features a ton of changes including an all new devices API (useCameraDevice(..)), a new formats API (useCameraFormat(..)), USB Cameras support, resizeMode for the Preview, performance improvements, buffer compression, and an all new rewritten documentation!

I spent around 100 hours on this release, so if you appreciate my work please consider 💖 sponsoring me on GitHub or 🍪 buy me a Ko-Fi :)

The new documentation is live at react-native-vision-camera.com.

Warning: There are breaking changes to the device selection APIs. The new Device APIs look like this:

const device = useCameraDevice('back')
const format = useCameraFormat(device, [
  { fps: 60 },
  { videoResolution: 'max' }
])
return <Camera {...props} device={device} />

✨ Features

  • ✨ New JS API for useCameraDevice and useCameraFormat (#1784) (977b859) / (#1841) (2d96381)
  • Make getAvailableCameraDevices() synchronous (#1784) (977b859)
  • Add addCameraDevicesChanged(...) listener (#1784) (977b859)
  • Add resizeMode prop for Preview (cover/contain) (#1838) (3169444) / (#1817) (c0b80b3) with @blancham
  • Support 10-bit Video HDR (#1827) (9809075)
  • New useCameraPermission() and useMicrophonePermission() hooks (#1823) (327aade)
  • Add support for LiDAR, TrueDepth, External (USB) and Continuity Camera Devices (iOS 17) (#1824) (cf4882b)
  • Add support for Buffer Compression for a more efficient Video Pipeline (enableBufferCompression) (#1828) (fffefa9)
  • Add Templates API for choosing Camera Formats (#1844) (706341f)
  • New array-based useCameraFormats API (#1841) (2d96381)
  • Use C++ OpenGL GPU VideoPipeline again (#1836) (9add0eb), closes #1789

🐛 Bug Fixes

  • Fix Preview on Android being stretched/not centered (#1817) (c0b80b3) by @blancham
  • Also properly convert any[] -> List<Object> in FP Android (#1760) (b4b0e49)
  • Consider everything between 24mm and 43mm a wide-angle lense (#1782) (a4ace35)
  • Fix h264 videoCodec type for RecordVideoOptions (#1808) (18c7034) by @iketiunn
  • Fix exposing userPreferredCameraDevice on Android (aafffa6)
  • Fix incorrect RGB pixelFormat check (8864866)
  • Fix passing options to frame processors on iOS (#1750) (6dd1d41)
  • Fix potential bug in Photo Orientation (#1765) (eddb01f)
  • Log plugin name in assertion (#1786) (648c363)

💨 Performance Improvements

  • Optimize OpenGL Video Pipeline (#1789) (4e96eb7)
  • Automatically use compressed buffers for efficiency in Video Pipeline (#1828) (fffefa9)
  • Much faster Camera initialization time by making getAvailableCameraDevices() synchronous/instant (no more await!) (#1784) (977b859)

📚 Documentation