react-native-vision-camera/README.md

75 lines
2.0 KiB
Markdown
Raw Normal View History

2021-02-19 08:08:26 -07:00
<table>
<tr>
2021-02-23 01:39:52 -07:00
<th>README</th>
<th><a href="./docs/DEVICES.md">DEVICES</a></th>
<th><a href="./docs/FORMATS.md">FORMATS</a></th>
<th><a href="./docs/FRAME_PROCESSORS.md">FRAME_PROCESSORS</a></th>
<th><a href="./docs/ANIMATED.md">ANIMATED</a></th>
<th><a href="./docs/ERRORS.md">ERRORS</a></th>
2021-02-19 08:08:26 -07:00
</tr>
</table>
2021-02-23 01:36:50 -07:00
<br/>
<br/>
<h1 align="center">Camera</h1>
2021-02-19 08:08:26 -07:00
<div align="center">
<img src="img/11.png" width="55%">
<br />
<br />
2021-02-20 08:45:10 -07:00
<blockquote><h4>📸 The Camera library that sees the vision.</h4></blockquote>
2021-02-19 08:08:26 -07:00
<br />
<a href='https://ko-fi.com/F1F8CLXG' target='_blank'><img height='36' style='border:0px;height:36px;' src='https://az743702.vo.msecnd.net/cdn/kofi2.png?v=0' border='0' alt='Buy Me a Coffee at ko-fi.com' /></a>
<br />
<a href="https://www.npmjs.com/package/react-native-vision-camera"><img src="https://img.shields.io/npm/v/react-native-vision-camera?color=%239ba298"</a>
<br />
<a href="https://www.npmjs.com/package/react-native-vision-camera"><img src="https://img.shields.io/npm/dt/react-native-vision-camera?color=%239ba298"</a>
<br />
<a href="https://github.com/mrousavy?tab=followers"><img src="https://img.shields.io/github/followers/mrousavy?label=Follow%20%40mrousavy&style=social"></a>
<br />
<a href="https://twitter.com/mrousavy"><img src="https://img.shields.io/twitter/follow/mrousavy?label=Follow%20%40mrousavy&style=social"></a>
</div>
<br/>
<br/>
2021-02-20 08:45:10 -07:00
<div>
<img align="right" width="35%" src="./img/example.png">
</div>
2021-02-19 08:08:26 -07:00
### Install
2021-02-19 08:07:53 -07:00
```sh
2021-02-19 08:08:26 -07:00
npm i react-native-vision-camera
npx pod-install
2021-02-19 08:07:53 -07:00
```
2021-02-20 08:45:10 -07:00
2021-02-20 08:48:32 -07:00
### Features
* Photo and Video capture
* Customizable device (`ultra-wide-angle`, `wide-angle`, `telephoto` and virtual multi-cameras)
2021-02-20 08:51:13 -07:00
* Customizable FPS
2021-02-20 08:48:32 -07:00
* JS worklet frame processors powered by JSI and Reanimated
* Reanimated zooming
* HDR & Night modes
2021-02-20 08:49:13 -07:00
> See the [example](./example/) app
2021-02-20 08:45:10 -07:00
### Example
```tsx
function App() {
2021-02-22 01:43:47 -07:00
const devices = useCameraDevices('wide-angle-camera')
const device = devices.back
2021-02-20 08:45:10 -07:00
return (
<Camera
style={StyleSheet.absoluteFill}
device={device}
/>
)
}
```