@b8safe/react-native-safe
Version:
Package for native integration of B8Safe SDK
15 lines (11 loc) • 394 B
text/typescript
import type { Frame } from 'react-native-vision-camera';
import { VisionCameraProxy } from 'react-native-vision-camera';
const plugin = VisionCameraProxy.initFrameProcessorPlugin(
'b8SafeProcessor',
{}
);
export function b8SafeProcessor(frame: Frame): unknown {
'worklet';
if (plugin == null) throw new Error('Failed to load Frame Processor Plugin!');
return plugin.call(frame);
}