JSPM

react-native-vision-camera

2.16.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 242162
  • Score
    100M100P100Q179867F
  • License MIT

The Camera library that sees the vision.

Package Exports

  • react-native-vision-camera
  • react-native-vision-camera/lib/commonjs/index.js
  • react-native-vision-camera/lib/module/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (react-native-vision-camera) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Vision Camera



📸 The Camera library that sees the vision.
npm i react-native-vision-camera@2
npx pod-install
Buy Me a Coffee at ko-fi.com



V2

This is the V2 branch of VisionCamera (2.x.x on npm). Since VisionCamera V3 (current main, 3.x.x on npm) features a full codebase rewrite on Android and a huge refactor on the iOS codebase, I will try to provide limited support for VisionCamera V2 for a while until V3 has been tested enough to be considered fully stable.

[!NOTE] The documentation hosted on https://react-native-vision-camera.com represents the documentation for V3. For V2, read the docs/ folder here.

VisionCamera V2 requires React Native 0.70+, iOS 11+, Android API 21+.

Documentation

Features

  • Photo, Video and Snapshot capture
  • Customizable devices and multi-cameras (smoothly zoom out to "fish-eye" camera)
  • Customizable FPS
  • Frame Processors (JS worklets to run QR-Code scanning, facial recognition, AI object detection, realtime video chats, ...)
  • Smooth zooming (Reanimated)
  • Fast pause and resume
  • HDR & Night modes

See the example app

Example

function App() {
  const devices = useCameraDevices('wide-angle-camera')
  const device = devices.back

  if (device == null) return <LoadingView />
  return (
    <Camera
      style={StyleSheet.absoluteFill}
      device={device}
      isActive={true}
    />
  )
}

Adopting at scale

This library helped you? Consider sponsoring!

VisionCamera is provided as is, I work on it in my free time.

If you're integrating VisionCamera in a production app, consider funding this project and contact me to receive premium enterprise support, help with issues, prioritize bugfixes, request features, help at integrating VisionCamera and/or Frame Processors, and more.


🚀 Get started by setting up permissions!