rodgomesc / vision-camera-face-detector

VisionCamera Frame Processor Plugin to detect faces using MLKit Vision Face Detector
MIT License
89 stars 65 forks source link

__scanFaces missing declaration #20

Closed SourceCipher closed 1 year ago

SourceCipher commented 1 year ago

I have been trying to implement it within the camera and I keep getting and error cant find variable __scanFaces. Once I had a look within the source code of this library, seems like you have no __scanFaces func defined but you return the frame value via this function.

https://github.com/rodgomesc/vision-camera-face-detector/blob/acbc0b866c05e8739ce58087bc66179adb225322/src/index.ts#L44

SourceCipher commented 1 year ago

I solved just now the issue by adding the globals to 'babel.config.js' file. This def needs to be in a readme file.

Add this as the last plugin to 'babel.config.js'

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