npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@meeeetup/camera-react-native

v0.9.0

Published

React Native SDK for meeeetup-cam — Vision Camera + native ML Kit frame processor

Readme

@meeeetup/camera-react-native

React Native face-capture SDK for the Meeeetup face-ID service. Face detection runs on the camera's worklet thread through a native Vision Camera frame processor (ML Kit), and the results feed the shared tracking and quality-selection pipeline.

BYOT (bring your own transport). The SDK makes no network request and holds no credential: it calls onBatchCapture with base64 JPEG data URLs and sending them is your code — any backend, any auth scheme, any retry strategy. No pairing UI.

You own the <Camera> element and its ref; the hook owns the pipeline.

Install

pnpm add @meeeetup/camera-react-native
pnpm add react-native-vision-camera react-native-vision-camera-face-detector
pnpm add react-native-worklets-core react-native-fs

@meeeetup/camera-core arrives as a dependency. For Expo, swap pnpm add for npx expo install on the four native packages.

| Peer | Range | Why | |---|---|---| | react | ^18 \|\| ^19 | Hook host | | react-native | >=0.73.0 | NativeModules / new-arch support | | react-native-vision-camera | >=4.0.0 | <Camera>, useFrameProcessor, runAtTargetFps | | react-native-vision-camera-face-detector | >=1.10.0 | Native ML Kit detector | | react-native-worklets-core | >=1.5.0 | Worklet → JS hop | | react-native-fs | >=2.20.0 | Reads the cached snapshot as base64 |

react-native-fs is not optional: without it the hook reports "react-native-fs is required as a peer dependency" through error and never caches a JPEG, so no face is ever committed.

Frame processors also need Vision Camera's worklets Babel plugin — follow react-native-vision-camera's frame-processor setup for react-native-worklets-core first.

Permissions: android.permission.CAMERA in AndroidManifest.xml, NSCameraUsageDescription in Info.plist.

Usage

import { useRef } from "react";
import { useWindowDimensions } from "react-native";
import { Camera, useCameraDevice } from "react-native-vision-camera";
import { useFaceCaptureSession } from "@meeeetup/camera-react-native";

function CaptureScreen({ captureKey }: { captureKey: string }) {
  const camera = useRef<Camera>(null);
  const device = useCameraDevice("front");
  const { width, height } = useWindowDimensions();

  const { ready, error, trackedCount, frameProcessor } = useFaceCaptureSession({
    cameraRef: camera,
    sessionType: "passive",
    // Preview size in px — makes the native detector emit window-space
    // coordinates, so detections line up with the preview.
    windowWidth: width,
    windowHeight: height,
    cameraFacing: "front",
    onBatchCapture: async (faces) => {
      const res = await fetch("https://api.example.com/capture", {
        method: "POST",
        headers: {
          Authorization: `Bearer ${captureKey}`,
          "Content-Type": "application/json",
        },
        body: JSON.stringify({
          images: faces.map((f) => ({
            image: f.dataUrl,
            capturedAt: new Date(f.createdAt).toISOString(),
          })),
        }),
      });
      // Throw to report failure. A missing status, <400 or >=500 is retried;
      // 4xx drops that batch.
      if (!res.ok) throw Object.assign(new Error("send failed"), { status: res.status });
    },
  });

  if (!device) return null;

  return (
    <Camera
      ref={camera}
      device={device}
      isActive
      photo
      frameProcessor={frameProcessor}
      style={{ flex: 1 }}
    />
  );
}

photo must stay enabled: the hook falls back to takePhoto() on cameras that do not expose takeSnapshot().

sessionType: "interactive" runs the same pipeline without the batch timer — call flushBatch() yourself. Either way, a flush only hands over faces whose track has settled for more than 5 s, so a still-improving track is never sent early.

Transport

onBatchCapture is the only output path. Rejecting (throwing) from the sink re-queues the batch; resolving marks it sent. There is no built-in HTTP client — pick your own stack (fetch, Axios, native HTTP, OkHttp bridge, whatever) and send the JPEG data URLs however your backend expects.

Exports

useFaceCaptureSession, RNFrameBuffer, facesToDetections, FaceCaptureSession, plus the Detection, FrameBuffer, SelectedFace, NoseLandmark, CameraLike, VisionCameraFace, UseFaceCaptureSessionOptions and UseFaceCaptureSessionReturn types.

Licence

Proprietary — see LICENSE. Use requires a current agreement with MeeeetUp1120.