@meeeetup/camera-react-native 0.5.0 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/llms.txt +39 -0
- package/package.json +7 -6
package/llms.txt
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# @meeeetup/camera-react-native
|
|
2
|
+
|
|
3
|
+
> React Native half of the Meeeetup camera SDK: a Vision Camera frame processor backed by native ML Kit, feeding `@meeeetup/camera-core`. Detection runs on the native thread — no JS inference, no per-frame JPEG encode.
|
|
4
|
+
|
|
5
|
+
Install: `pnpm add @meeeetup/camera-react-native`
|
|
6
|
+
|
|
7
|
+
## Docs
|
|
8
|
+
|
|
9
|
+
- [React Native guide](https://id.meeeetup.com/en/docs/react-native): peer dependencies, the hook, native-only options and the Android build notes.
|
|
10
|
+
- [Configuration](https://id.meeeetup.com/en/docs/configuration): the capture gates, shared with the web SDK.
|
|
11
|
+
- [Types and schema](https://id.meeeetup.com/en/docs/types): hook options and return, plus the core types underneath.
|
|
12
|
+
- [Everything in one file](https://id.meeeetup.com/llms-full.txt)
|
|
13
|
+
|
|
14
|
+
## Shape
|
|
15
|
+
|
|
16
|
+
```tsx
|
|
17
|
+
import { useFaceCaptureSession } from "@meeeetup/camera-react-native";
|
|
18
|
+
|
|
19
|
+
const camera = useRef<Camera>(null);
|
|
20
|
+
const { frameProcessor, trackedCount } = useFaceCaptureSession({
|
|
21
|
+
cameraRef: camera,
|
|
22
|
+
sessionType: "passive",
|
|
23
|
+
minFaceHeight: 0.18,
|
|
24
|
+
captureWindowMs: 2_000,
|
|
25
|
+
windowWidth: width, // enables autoMode: landmarks in window space
|
|
26
|
+
windowHeight: height,
|
|
27
|
+
cameraFacing: "front",
|
|
28
|
+
onBatchCapture: async (faces) => { await upload(faces); },
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
<Camera ref={camera} device={device} isActive photo frameProcessor={frameProcessor} />
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## Notes
|
|
35
|
+
|
|
36
|
+
- Peer deps: `react-native-vision-camera` >= 4, `react-native-vision-camera-face-detector` >= 1.10, `react-native-worklets-core` >= 1.5, `react-native-fs` >= 2.20.
|
|
37
|
+
- Pass `windowWidth` / `windowHeight`, or coordinates stay in raw sensor space and overlays will not line up with the preview.
|
|
38
|
+
- `noseLandmark` is omitted on purpose: the hook pins it to `"noseBase"` because ML Kit has no nose tip, keeping scores comparable with MediaPipe on web.
|
|
39
|
+
- `takeSnapshot` is Android-only in Vision Camera 4; iOS falls back to `takePhoto()`, so raise `photoCadenceMs` there if frames drop.
|
package/package.json
CHANGED
|
@@ -1,37 +1,38 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@meeeetup/camera-react-native",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.0",
|
|
4
4
|
"description": "React Native SDK for meeeetup-cam — Vision Camera + native ML Kit frame processor",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
7
7
|
"files": [
|
|
8
8
|
"dist",
|
|
9
9
|
"README.md",
|
|
10
|
-
"LICENSE"
|
|
10
|
+
"LICENSE",
|
|
11
|
+
"llms.txt"
|
|
11
12
|
],
|
|
12
13
|
"publishConfig": {
|
|
13
14
|
"registry": "https://registry.npmjs.org",
|
|
14
15
|
"access": "public"
|
|
15
16
|
},
|
|
16
17
|
"dependencies": {
|
|
17
|
-
"@meeeetup/camera-core": "0.
|
|
18
|
+
"@meeeetup/camera-core": "0.7.0"
|
|
18
19
|
},
|
|
19
20
|
"peerDependencies": {
|
|
20
21
|
"react": "^18 || ^19",
|
|
21
22
|
"react-native": ">=0.73.0",
|
|
23
|
+
"react-native-fs": ">=2.20.0",
|
|
22
24
|
"react-native-vision-camera": ">=4.0.0",
|
|
23
25
|
"react-native-vision-camera-face-detector": ">=1.10.0",
|
|
24
|
-
"react-native-worklets-core": ">=1.5.0"
|
|
25
|
-
"react-native-fs": ">=2.20.0"
|
|
26
|
+
"react-native-worklets-core": ">=1.5.0"
|
|
26
27
|
},
|
|
27
28
|
"devDependencies": {
|
|
28
29
|
"@types/react": "^19.0.0",
|
|
29
30
|
"react": "^19.0.0",
|
|
30
31
|
"react-native": "^0.86.0",
|
|
32
|
+
"react-native-fs": "^2.20.0",
|
|
31
33
|
"react-native-vision-camera": "^4.0.0",
|
|
32
34
|
"react-native-vision-camera-face-detector": "^1.10.2",
|
|
33
35
|
"react-native-worklets-core": "^1.6.3",
|
|
34
|
-
"react-native-fs": "^2.20.0",
|
|
35
36
|
"typescript": "^5.7.2"
|
|
36
37
|
},
|
|
37
38
|
"license": "SEE LICENSE IN LICENSE",
|