Socket
Book a DemoInstallSign in
Socket

vision-camera-plugin-capture

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vision-camera-plugin-capture

A VisionCamera Frame Processor Plugin to capture video frame

0.1.3
latest
Source
npmnpm
Version published
Maintainers
1
Created
Source

vision-camera-plugin-capture

A tiny VisionCamera Frame Processor Plugin to capture a video frame.

  • JPEG/PNG format
  • Currently, supports iOS only

Installation

npm install vision-camera-plugin-capture

Setup

Frame Processors require react-native-reanimated 2.2.0 or higher. Also make sure to add

import 'react-native-reanimated';

to the top of the file when using useFrameProcessor.

Add this to your babel.config.js.

[
  'react-native-reanimated/plugin',
  {
    globals: ['__captureVideoFrame'],
  },
];

Usage

import 'react-native-reanimated';
import { useFrameProcessor } from 'react-native-vision-camera';
import { captureVideoFrame } from 'vision-camera-plugin-capture';

// ...

const frameProcessor = useFrameProcessor((frame) => {
  'worklet';
  const value = captureVideoFrame(frame, {
    format: 'JPEG',
  });

  if (value) {
    console.log(value.base64);
  }
}, []);

License

MIT

Keywords

react-native

FAQs

Package last updated on 18 Jun 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.