@arfuhad/react-native-smart-camera 0.1.2 → 0.1.5

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.
Files changed (265) hide show
  1. package/CHANGELOG.md +75 -3
  2. package/README.md +259 -206
  3. package/android/build.gradle +14 -39
  4. package/android/src/main/java/com/smartcamera/FaceDetectorFrameProcessorPlugin.kt +324 -0
  5. package/android/src/main/java/com/smartcamera/SmartCameraPackage.kt +28 -0
  6. package/build/detection/blinkProcessor.js +2 -1
  7. package/build/detection/blinkProcessor.js.map +1 -1
  8. package/build/detection/faceDetector.d.ts +4 -4
  9. package/build/detection/faceDetector.d.ts.map +1 -1
  10. package/build/detection/faceDetector.js +31 -11
  11. package/build/detection/faceDetector.js.map +1 -1
  12. package/build/detection/index.d.ts +1 -1
  13. package/build/detection/index.d.ts.map +1 -1
  14. package/build/detection/index.js +1 -1
  15. package/build/detection/index.js.map +1 -1
  16. package/build/detection/staticImageDetector.d.ts +11 -11
  17. package/build/detection/staticImageDetector.d.ts.map +1 -1
  18. package/build/detection/staticImageDetector.js +19 -23
  19. package/build/detection/staticImageDetector.js.map +1 -1
  20. package/build/hooks/index.d.ts +6 -0
  21. package/build/hooks/index.d.ts.map +1 -1
  22. package/build/hooks/index.js +8 -0
  23. package/build/hooks/index.js.map +1 -1
  24. package/build/hooks/useBlinkDetection.d.ts +27 -16
  25. package/build/hooks/useBlinkDetection.d.ts.map +1 -1
  26. package/build/hooks/useBlinkDetection.js +63 -37
  27. package/build/hooks/useBlinkDetection.js.map +1 -1
  28. package/build/hooks/useFaceDetection.js +3 -2
  29. package/build/hooks/useFaceDetection.js.map +1 -1
  30. package/build/hooks/useFaceDetector.d.ts +123 -0
  31. package/build/hooks/useFaceDetector.d.ts.map +1 -0
  32. package/build/hooks/useFaceDetector.js +133 -0
  33. package/build/hooks/useFaceDetector.js.map +1 -0
  34. package/build/hooks/useSmartCamera.js.map +1 -1
  35. package/build/hooks/useSmartCameraWebRTC.d.ts +3 -5
  36. package/build/hooks/useSmartCameraWebRTC.d.ts.map +1 -1
  37. package/build/hooks/useSmartCameraWebRTC.js +19 -87
  38. package/build/hooks/useSmartCameraWebRTC.js.map +1 -1
  39. package/build/hooks/useWebRTC.d.ts +88 -0
  40. package/build/hooks/useWebRTC.d.ts.map +1 -0
  41. package/build/hooks/useWebRTC.js +394 -0
  42. package/build/hooks/useWebRTC.js.map +1 -0
  43. package/build/hooks/useWebRTCWithDetection.d.ts +89 -0
  44. package/build/hooks/useWebRTCWithDetection.d.ts.map +1 -0
  45. package/build/hooks/useWebRTCWithDetection.js +131 -0
  46. package/build/hooks/useWebRTCWithDetection.js.map +1 -0
  47. package/build/index.d.ts +24 -10
  48. package/build/index.d.ts.map +1 -1
  49. package/build/index.js +38 -13
  50. package/build/index.js.map +1 -1
  51. package/build/types.d.ts +28 -12
  52. package/build/types.d.ts.map +1 -1
  53. package/build/types.js.map +1 -1
  54. package/build/utils/index.js.map +1 -1
  55. package/build/webrtc/WebRTCBridge.d.ts +3 -0
  56. package/build/webrtc/WebRTCBridge.d.ts.map +1 -1
  57. package/build/webrtc/WebRTCBridge.js +12 -15
  58. package/build/webrtc/WebRTCBridge.js.map +1 -1
  59. package/build/webrtc/WebRTCManager.d.ts +148 -0
  60. package/build/webrtc/WebRTCManager.d.ts.map +1 -0
  61. package/build/webrtc/WebRTCManager.js +383 -0
  62. package/build/webrtc/WebRTCManager.js.map +1 -0
  63. package/build/webrtc/index.d.ts +3 -1
  64. package/build/webrtc/index.d.ts.map +1 -1
  65. package/build/webrtc/index.js +5 -0
  66. package/build/webrtc/index.js.map +1 -1
  67. package/build/webrtc/types.d.ts +212 -4
  68. package/build/webrtc/types.d.ts.map +1 -1
  69. package/build/webrtc/types.js +34 -1
  70. package/build/webrtc/types.js.map +1 -1
  71. package/ios/FaceDetectorFrameProcessorPlugin.m +11 -0
  72. package/ios/FaceDetectorFrameProcessorPlugin.swift +304 -0
  73. package/package.json +11 -11
  74. package/react-native-smart-camera.podspec +32 -0
  75. package/src/detection/blinkProcessor.ts +127 -0
  76. package/src/detection/faceDetector.ts +78 -0
  77. package/src/detection/index.ts +3 -0
  78. package/src/detection/staticImageDetector.ts +53 -0
  79. package/src/hooks/index.ts +26 -0
  80. package/src/hooks/useBlinkDetection.ts +127 -0
  81. package/src/hooks/useFaceDetection.ts +105 -0
  82. package/src/hooks/useFaceDetector.ts +191 -0
  83. package/src/hooks/useSmartCamera.ts +83 -0
  84. package/src/hooks/useSmartCameraWebRTC.ts +120 -0
  85. package/src/hooks/useWebRTC.ts +453 -0
  86. package/src/hooks/useWebRTCWithDetection.ts +181 -0
  87. package/src/index.ts +170 -0
  88. package/src/types.ts +636 -0
  89. package/src/utils/index.ts +355 -0
  90. package/src/webrtc/WebRTCBridge.ts +127 -0
  91. package/src/webrtc/WebRTCManager.ts +453 -0
  92. package/src/webrtc/index.ts +50 -0
  93. package/src/webrtc/types.ts +361 -0
  94. package/android/build/.transforms/e0a0b120a9ccc3a8de4f5784bc36b161/results.bin +0 -1
  95. package/android/build/.transforms/e0a0b120a9ccc3a8de4f5784bc36b161/transformed/classes/classes_dex/classes.dex +0 -0
  96. package/android/build/generated/source/buildConfig/debug/expo/modules/smartcamera/BuildConfig.java +0 -10
  97. package/android/build/intermediates/aapt_friendly_merged_manifests/debug/aapt/AndroidManifest.xml +0 -7
  98. package/android/build/intermediates/aapt_friendly_merged_manifests/debug/aapt/output-metadata.json +0 -18
  99. package/android/build/intermediates/aar_metadata/debug/aar-metadata.properties +0 -6
  100. package/android/build/intermediates/annotation_processor_list/debug/annotationProcessors.json +0 -1
  101. package/android/build/intermediates/compile_library_classes_jar/debug/classes.jar +0 -0
  102. package/android/build/intermediates/compile_r_class_jar/debug/R.jar +0 -0
  103. package/android/build/intermediates/compile_symbol_list/debug/R.txt +0 -0
  104. package/android/build/intermediates/incremental/debug/packageDebugResources/compile-file-map.properties +0 -1
  105. package/android/build/intermediates/incremental/debug/packageDebugResources/merger.xml +0 -2
  106. package/android/build/intermediates/java_res/debug/out/META-INF/arfuhad-react-native-smart-camera_debug.kotlin_module +0 -0
  107. package/android/build/intermediates/javac/debug/classes/expo/modules/smartcamera/BuildConfig.class +0 -0
  108. package/android/build/intermediates/local_only_symbol_list/debug/R-def.txt +0 -2
  109. package/android/build/intermediates/manifest_merge_blame_file/debug/manifest-merger-blame-debug-report.txt +0 -7
  110. package/android/build/intermediates/merged_manifest/debug/AndroidManifest.xml +0 -7
  111. package/android/build/intermediates/navigation_json/debug/navigation.json +0 -1
  112. package/android/build/intermediates/runtime_library_classes_jar/debug/classes.jar +0 -0
  113. package/android/build/intermediates/symbol_list_with_package_name/debug/package-aware-r.txt +0 -1
  114. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab +0 -0
  115. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.keystream +0 -0
  116. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.keystream.len +0 -0
  117. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.len +0 -0
  118. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.values.at +0 -0
  119. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab_i +0 -0
  120. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab_i.len +0 -0
  121. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab +0 -0
  122. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.keystream +0 -0
  123. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.keystream.len +0 -0
  124. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.len +0 -0
  125. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.values.at +0 -0
  126. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab_i +0 -0
  127. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab_i.len +0 -0
  128. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab +0 -0
  129. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.keystream +0 -0
  130. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.keystream.len +0 -0
  131. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.len +0 -0
  132. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.values.at +0 -0
  133. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab_i +0 -0
  134. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab_i.len +0 -0
  135. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab +0 -0
  136. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.keystream +0 -0
  137. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.keystream.len +0 -0
  138. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.len +0 -0
  139. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.values.at +0 -0
  140. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab_i +0 -0
  141. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab_i.len +0 -0
  142. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/package-parts.tab +0 -0
  143. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/package-parts.tab.keystream +0 -0
  144. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/package-parts.tab.keystream.len +0 -0
  145. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/package-parts.tab.len +0 -0
  146. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/package-parts.tab.values.at +0 -0
  147. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/package-parts.tab_i +0 -0
  148. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/package-parts.tab_i.len +0 -0
  149. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab +0 -0
  150. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.keystream +0 -0
  151. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.keystream.len +0 -0
  152. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.len +0 -0
  153. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.values.at +0 -0
  154. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab_i +0 -0
  155. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab_i.len +0 -0
  156. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab +0 -0
  157. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.keystream +0 -0
  158. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.keystream.len +0 -0
  159. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.len +0 -0
  160. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.values.at +0 -0
  161. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab_i +0 -0
  162. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab_i.len +0 -0
  163. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab +0 -0
  164. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.keystream +0 -0
  165. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.keystream.len +0 -0
  166. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.len +0 -0
  167. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.values.at +0 -0
  168. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab_i +0 -0
  169. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab_i.len +0 -0
  170. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab +0 -0
  171. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.keystream +0 -0
  172. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.keystream.len +0 -0
  173. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.len +0 -0
  174. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.values.at +0 -0
  175. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab_i +0 -0
  176. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab_i.len +0 -0
  177. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/counters.tab +0 -2
  178. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab +0 -0
  179. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.keystream +0 -0
  180. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.keystream.len +0 -0
  181. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.len +0 -0
  182. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.values.at +0 -0
  183. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab_i +0 -0
  184. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab_i.len +0 -0
  185. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab +0 -0
  186. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.keystream +0 -0
  187. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.keystream.len +0 -0
  188. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.len +0 -0
  189. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.values.at +0 -0
  190. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab_i +0 -0
  191. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab_i.len +0 -0
  192. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab +0 -0
  193. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.keystream +0 -0
  194. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.keystream.len +0 -0
  195. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.len +0 -0
  196. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.values.at +0 -0
  197. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab_i +0 -0
  198. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab_i.len +0 -0
  199. package/android/build/kotlin/compileDebugKotlin/cacheable/last-build.bin +0 -0
  200. package/android/build/kotlin/compileDebugKotlin/classpath-snapshot/shrunk-classpath-snapshot.bin +0 -0
  201. package/android/build/kotlin/compileDebugKotlin/local-state/build-history.bin +0 -0
  202. package/android/build/outputs/logs/manifest-merger-debug-report.txt +0 -16
  203. package/android/build/tmp/compileDebugJavaWithJavac/previous-compilation-data.bin +0 -0
  204. package/android/build/tmp/kotlin-classes/debug/META-INF/arfuhad-react-native-smart-camera_debug.kotlin_module +0 -0
  205. package/android/build/tmp/kotlin-classes/debug/expo/modules/smartcamera/DetectedFace.class +0 -0
  206. package/android/build/tmp/kotlin-classes/debug/expo/modules/smartcamera/FaceBounds.class +0 -0
  207. package/android/build/tmp/kotlin-classes/debug/expo/modules/smartcamera/FaceContoursData.class +0 -0
  208. package/android/build/tmp/kotlin-classes/debug/expo/modules/smartcamera/FaceDetectionOptions.class +0 -0
  209. package/android/build/tmp/kotlin-classes/debug/expo/modules/smartcamera/FaceLandmarksData.class +0 -0
  210. package/android/build/tmp/kotlin-classes/debug/expo/modules/smartcamera/ImageLoader$Companion.class +0 -0
  211. package/android/build/tmp/kotlin-classes/debug/expo/modules/smartcamera/ImageLoader$loadImage$2.class +0 -0
  212. package/android/build/tmp/kotlin-classes/debug/expo/modules/smartcamera/ImageLoader.class +0 -0
  213. package/android/build/tmp/kotlin-classes/debug/expo/modules/smartcamera/MLKitFaceDetector$detectFaces$2$1.class +0 -0
  214. package/android/build/tmp/kotlin-classes/debug/expo/modules/smartcamera/MLKitFaceDetector$detectFaces$2$2.class +0 -0
  215. package/android/build/tmp/kotlin-classes/debug/expo/modules/smartcamera/MLKitFaceDetector.class +0 -0
  216. package/android/build/tmp/kotlin-classes/debug/expo/modules/smartcamera/MLKitFaceDetectorKt$sam$com_google_android_gms_tasks_OnSuccessListener$0.class +0 -0
  217. package/android/build/tmp/kotlin-classes/debug/expo/modules/smartcamera/MLKitFaceDetectorKt.class +0 -0
  218. package/android/build/tmp/kotlin-classes/debug/expo/modules/smartcamera/PointData.class +0 -0
  219. package/android/build/tmp/kotlin-classes/debug/expo/modules/smartcamera/SmartCameraModule$Companion.class +0 -0
  220. package/android/build/tmp/kotlin-classes/debug/expo/modules/smartcamera/SmartCameraModule$definition$1$1$1.class +0 -0
  221. package/android/build/tmp/kotlin-classes/debug/expo/modules/smartcamera/SmartCameraModule$definition$1$3$1.class +0 -0
  222. package/android/build/tmp/kotlin-classes/debug/expo/modules/smartcamera/SmartCameraModule$definition$1$4$1.class +0 -0
  223. package/android/build/tmp/kotlin-classes/debug/expo/modules/smartcamera/SmartCameraModule$definition$lambda$10$$inlined$AsyncFunction$1.class +0 -0
  224. package/android/build/tmp/kotlin-classes/debug/expo/modules/smartcamera/SmartCameraModule$definition$lambda$10$$inlined$AsyncFunction$2.class +0 -0
  225. package/android/build/tmp/kotlin-classes/debug/expo/modules/smartcamera/SmartCameraModule$definition$lambda$10$$inlined$AsyncFunction$3.class +0 -0
  226. package/android/build/tmp/kotlin-classes/debug/expo/modules/smartcamera/SmartCameraModule$definition$lambda$10$$inlined$AsyncFunctionWithPromise$1.class +0 -0
  227. package/android/build/tmp/kotlin-classes/debug/expo/modules/smartcamera/SmartCameraModule$definition$lambda$10$$inlined$AsyncFunctionWithPromise$2.class +0 -0
  228. package/android/build/tmp/kotlin-classes/debug/expo/modules/smartcamera/SmartCameraModule$definition$lambda$10$$inlined$AsyncFunctionWithPromise$3.class +0 -0
  229. package/android/build/tmp/kotlin-classes/debug/expo/modules/smartcamera/SmartCameraModule$definition$lambda$10$$inlined$AsyncFunctionWithPromise$4.class +0 -0
  230. package/android/build/tmp/kotlin-classes/debug/expo/modules/smartcamera/SmartCameraModule$definition$lambda$10$$inlined$Function$1.class +0 -0
  231. package/android/build/tmp/kotlin-classes/debug/expo/modules/smartcamera/SmartCameraModule$definition$lambda$10$$inlined$Function$2.class +0 -0
  232. package/android/build/tmp/kotlin-classes/debug/expo/modules/smartcamera/SmartCameraModule$definition$lambda$10$$inlined$Function$3.class +0 -0
  233. package/android/build/tmp/kotlin-classes/debug/expo/modules/smartcamera/SmartCameraModule$definition$lambda$10$$inlined$Function$4.class +0 -0
  234. package/android/build/tmp/kotlin-classes/debug/expo/modules/smartcamera/SmartCameraModule$definition$lambda$10$$inlined$FunctionWithoutArgs$1.class +0 -0
  235. package/android/build/tmp/kotlin-classes/debug/expo/modules/smartcamera/SmartCameraModule$definition$lambda$10$$inlined$FunctionWithoutArgs$2.class +0 -0
  236. package/android/build/tmp/kotlin-classes/debug/expo/modules/smartcamera/SmartCameraModule$definition$lambda$10$$inlined$OnActivityEntersBackground$1.class +0 -0
  237. package/android/build/tmp/kotlin-classes/debug/expo/modules/smartcamera/SmartCameraModule$definition$lambda$10$$inlined$OnActivityEntersForeground$1.class +0 -0
  238. package/android/build/tmp/kotlin-classes/debug/expo/modules/smartcamera/SmartCameraModule$definition$lambda$10$$inlined$OnDestroy$1.class +0 -0
  239. package/android/build/tmp/kotlin-classes/debug/expo/modules/smartcamera/SmartCameraModule.class +0 -0
  240. package/android/build/tmp/kotlin-classes/debug/expo/modules/smartcamera/SmartCameraView.class +0 -0
  241. package/android/build/tmp/kotlin-classes/debug/expo/modules/smartcamera/WebRTCFrameBridge$Companion.class +0 -0
  242. package/android/build/tmp/kotlin-classes/debug/expo/modules/smartcamera/WebRTCFrameBridge.class +0 -0
  243. package/android/src/main/java/expo/modules/smartcamera/ImageLoader.kt +0 -106
  244. package/android/src/main/java/expo/modules/smartcamera/MLKitFaceDetector.kt +0 -273
  245. package/android/src/main/java/expo/modules/smartcamera/SmartCameraModule.kt +0 -205
  246. package/android/src/main/java/expo/modules/smartcamera/SmartCameraView.kt +0 -153
  247. package/android/src/main/java/expo/modules/smartcamera/WebRTCFrameBridge.kt +0 -184
  248. package/build/SmartCamera.d.ts +0 -17
  249. package/build/SmartCamera.d.ts.map +0 -1
  250. package/build/SmartCamera.js +0 -270
  251. package/build/SmartCamera.js.map +0 -1
  252. package/build/SmartCameraModule.d.ts +0 -112
  253. package/build/SmartCameraModule.d.ts.map +0 -1
  254. package/build/SmartCameraModule.js +0 -121
  255. package/build/SmartCameraModule.js.map +0 -1
  256. package/build/SmartCameraView.d.ts +0 -8
  257. package/build/SmartCameraView.d.ts.map +0 -1
  258. package/build/SmartCameraView.js +0 -7
  259. package/build/SmartCameraView.js.map +0 -1
  260. package/expo-module.config.json +0 -9
  261. package/ios/MLKitFaceDetector.swift +0 -310
  262. package/ios/SmartCamera.podspec +0 -33
  263. package/ios/SmartCameraModule.swift +0 -225
  264. package/ios/SmartCameraView.swift +0 -146
  265. package/ios/WebRTCFrameBridge.swift +0 -150
@@ -0,0 +1,361 @@
1
+ /**
2
+ * WebRTC-related types for the SmartCamera module
3
+ */
4
+
5
+ // =============================================================================
6
+ // Core WebRTC Types
7
+ // =============================================================================
8
+
9
+ /**
10
+ * ICE server configuration for STUN/TURN servers
11
+ */
12
+ export interface ICEServer {
13
+ /** STUN/TURN server URLs */
14
+ urls: string | string[];
15
+ /** Username for TURN authentication */
16
+ username?: string;
17
+ /** Credential for TURN authentication */
18
+ credential?: string;
19
+ }
20
+
21
+ /**
22
+ * Peer connection configuration
23
+ */
24
+ export interface PeerConnectionConfig {
25
+ /** ICE servers (STUN/TURN) */
26
+ iceServers?: ICEServer[];
27
+ /** ICE transport policy */
28
+ iceTransportPolicy?: 'all' | 'relay';
29
+ /** Bundle policy */
30
+ bundlePolicy?: 'balanced' | 'max-bundle' | 'max-compat';
31
+ /** RTCP mux policy */
32
+ rtcpMuxPolicy?: 'require';
33
+ }
34
+
35
+ /**
36
+ * Video constraints for getUserMedia
37
+ */
38
+ export interface VideoConstraints {
39
+ /** Frame width in pixels */
40
+ width?: number | { min?: number; ideal?: number; max?: number };
41
+ /** Frame height in pixels */
42
+ height?: number | { min?: number; ideal?: number; max?: number };
43
+ /** Target frame rate */
44
+ frameRate?: number | { min?: number; ideal?: number; max?: number };
45
+ /** Camera facing mode */
46
+ facingMode?: 'user' | 'environment';
47
+ }
48
+
49
+ /**
50
+ * Audio constraints for getUserMedia
51
+ */
52
+ export interface AudioConstraints {
53
+ /** Enable echo cancellation */
54
+ echoCancellation?: boolean;
55
+ /** Enable noise suppression */
56
+ noiseSuppression?: boolean;
57
+ /** Enable auto gain control */
58
+ autoGainControl?: boolean;
59
+ }
60
+
61
+ /**
62
+ * Media stream constraints
63
+ */
64
+ export interface MediaConstraints {
65
+ /** Video constraints (false to disable video) */
66
+ video?: boolean | VideoConstraints;
67
+ /** Audio constraints (false to disable audio) */
68
+ audio?: boolean | AudioConstraints;
69
+ }
70
+
71
+ // =============================================================================
72
+ // Call State Types
73
+ // =============================================================================
74
+
75
+ /**
76
+ * WebRTC call state
77
+ */
78
+ export type CallState =
79
+ | 'idle' // No active call
80
+ | 'connecting' // Call is being established
81
+ | 'connected' // Call is active
82
+ | 'reconnecting'// Connection lost, attempting to reconnect
83
+ | 'disconnected'// Call ended or failed
84
+ | 'failed'; // Call failed to establish
85
+
86
+ /**
87
+ * WebRTC connection state (maps to RTCPeerConnectionState)
88
+ */
89
+ export type WebRTCConnectionState =
90
+ | 'new'
91
+ | 'connecting'
92
+ | 'connected'
93
+ | 'disconnected'
94
+ | 'failed'
95
+ | 'closed';
96
+
97
+ /**
98
+ * ICE connection state
99
+ */
100
+ export type ICEConnectionState =
101
+ | 'new'
102
+ | 'checking'
103
+ | 'connected'
104
+ | 'completed'
105
+ | 'failed'
106
+ | 'disconnected'
107
+ | 'closed';
108
+
109
+ /**
110
+ * ICE gathering state
111
+ */
112
+ export type ICEGatheringState = 'new' | 'gathering' | 'complete';
113
+
114
+ /**
115
+ * Signaling state
116
+ */
117
+ export type SignalingState =
118
+ | 'stable'
119
+ | 'have-local-offer'
120
+ | 'have-remote-offer'
121
+ | 'have-local-pranswer'
122
+ | 'have-remote-pranswer'
123
+ | 'closed';
124
+
125
+ // =============================================================================
126
+ // Stream and Track Types
127
+ // =============================================================================
128
+
129
+ /**
130
+ * Video frame format for WebRTC
131
+ */
132
+ export type VideoFrameFormat = 'I420' | 'NV12' | 'NV21' | 'BGRA';
133
+
134
+ /**
135
+ * Configuration for the WebRTC video source
136
+ */
137
+ export interface WebRTCVideoSourceConfig {
138
+ /** Frame width in pixels */
139
+ width: number;
140
+ /** Frame height in pixels */
141
+ height: number;
142
+ /** Target frame rate */
143
+ frameRate: number;
144
+ /** Video frame format. Default: 'I420' */
145
+ format?: VideoFrameFormat;
146
+ }
147
+
148
+ /**
149
+ * WebRTC stream statistics
150
+ */
151
+ export interface WebRTCStreamStats {
152
+ /** Current frame rate */
153
+ frameRate: number;
154
+ /** Frames sent */
155
+ framesSent: number;
156
+ /** Frames dropped */
157
+ framesDropped: number;
158
+ /** Bytes sent */
159
+ bytesSent: number;
160
+ /** Current bitrate in bps */
161
+ bitrate: number;
162
+ /** Round-trip time in ms */
163
+ rtt?: number;
164
+ /** Packets lost */
165
+ packetsLost?: number;
166
+ /** Jitter in ms */
167
+ jitter?: number;
168
+ }
169
+
170
+ /**
171
+ * WebRTC stream quality settings
172
+ */
173
+ export interface WebRTCQualitySettings {
174
+ /** Maximum bitrate in bps */
175
+ maxBitrate?: number;
176
+ /** Minimum bitrate in bps */
177
+ minBitrate?: number;
178
+ /** Target frame rate */
179
+ targetFrameRate?: number;
180
+ /** Resolution scale (0.0 - 1.0) */
181
+ resolutionScale?: number;
182
+ }
183
+
184
+ // =============================================================================
185
+ // Event Types
186
+ // =============================================================================
187
+
188
+ /**
189
+ * Event emitted when WebRTC stream state changes
190
+ */
191
+ export interface WebRTCStreamEvent {
192
+ type: 'started' | 'stopped' | 'error' | 'stats';
193
+ timestamp: number;
194
+ error?: Error;
195
+ stats?: WebRTCStreamStats;
196
+ }
197
+
198
+ /**
199
+ * ICE candidate event data
200
+ */
201
+ export interface ICECandidateEvent {
202
+ /** The ICE candidate */
203
+ candidate: RTCIceCandidate | null;
204
+ /** SDP mid */
205
+ sdpMid?: string | null;
206
+ /** SDP m-line index */
207
+ sdpMLineIndex?: number | null;
208
+ }
209
+
210
+ /**
211
+ * Session description for signaling
212
+ */
213
+ export interface SessionDescription {
214
+ /** Type of description (offer/answer) */
215
+ type: 'offer' | 'answer';
216
+ /** SDP string */
217
+ sdp: string;
218
+ }
219
+
220
+ // =============================================================================
221
+ // Hook Options and Results
222
+ // =============================================================================
223
+
224
+ /**
225
+ * Options for useWebRTC hook
226
+ */
227
+ export interface UseWebRTCOptions {
228
+ /** Peer connection configuration */
229
+ config?: PeerConnectionConfig;
230
+ /** Media constraints for local stream */
231
+ mediaConstraints?: MediaConstraints;
232
+ /** Initial camera facing mode */
233
+ initialCamera?: 'front' | 'back';
234
+ /** Auto-start local stream when hook mounts */
235
+ autoStartLocalStream?: boolean;
236
+ /** Callback when call state changes */
237
+ onCallStateChange?: (state: CallState) => void;
238
+ /** Callback when connection state changes */
239
+ onConnectionStateChange?: (state: WebRTCConnectionState) => void;
240
+ /** Callback when ICE connection state changes */
241
+ onIceConnectionStateChange?: (state: ICEConnectionState) => void;
242
+ /** Callback when remote stream is received */
243
+ onRemoteStream?: (stream: MediaStream) => void;
244
+ /** Callback when remote stream is removed */
245
+ onRemoteStreamRemoved?: () => void;
246
+ /** Callback when an error occurs */
247
+ onError?: (error: Error) => void;
248
+ }
249
+
250
+ /**
251
+ * Result type for useWebRTC hook
252
+ */
253
+ export interface UseWebRTCResult {
254
+ // Streams
255
+ /** Local media stream (camera + microphone) */
256
+ localStream: MediaStream | null;
257
+ /** Remote media stream from peer */
258
+ remoteStream: MediaStream | null;
259
+
260
+ // State
261
+ /** Current call state */
262
+ callState: CallState;
263
+ /** Whether local audio is enabled */
264
+ isAudioEnabled: boolean;
265
+ /** Whether local video is enabled */
266
+ isVideoEnabled: boolean;
267
+ /** Current camera facing mode */
268
+ currentCamera: 'front' | 'back';
269
+ /** Peer connection instance */
270
+ peerConnection: RTCPeerConnection | null;
271
+
272
+ // Local stream controls
273
+ /** Start local camera/microphone stream */
274
+ startLocalStream: () => Promise<void>;
275
+ /** Stop local stream */
276
+ stopLocalStream: () => void;
277
+ /** Switch between front and back camera */
278
+ switchCamera: () => Promise<void>;
279
+ /** Toggle local audio on/off */
280
+ toggleAudio: () => void;
281
+ /** Toggle local video on/off */
282
+ toggleVideo: () => void;
283
+
284
+ // Peer connection management
285
+ /** Create a new peer connection */
286
+ createPeerConnection: (config?: PeerConnectionConfig) => RTCPeerConnection;
287
+ /** Close the peer connection */
288
+ closePeerConnection: () => void;
289
+
290
+ // Signaling helpers (user integrates with their signaling server)
291
+ /** Create an SDP offer */
292
+ createOffer: () => Promise<SessionDescription>;
293
+ /** Create an SDP answer */
294
+ createAnswer: () => Promise<SessionDescription>;
295
+ /** Set the remote SDP description */
296
+ setRemoteDescription: (description: SessionDescription) => Promise<void>;
297
+ /** Add an ICE candidate from remote peer */
298
+ addIceCandidate: (candidate: RTCIceCandidate) => Promise<void>;
299
+ /** Register callback for ICE candidates to send to remote peer */
300
+ onIceCandidate: (callback: (candidate: ICECandidateEvent) => void) => void;
301
+
302
+ // Cleanup
303
+ /** Clean up all resources */
304
+ cleanup: () => void;
305
+ }
306
+
307
+ /**
308
+ * Options for useWebRTCWithDetection hook
309
+ */
310
+ export interface UseWebRTCWithDetectionOptions extends UseWebRTCOptions {
311
+ /** Face detection options */
312
+ faceDetection?: {
313
+ enabled?: boolean;
314
+ performanceMode?: 'fast' | 'accurate';
315
+ landmarkMode?: 'none' | 'all';
316
+ classificationMode?: 'none' | 'all';
317
+ };
318
+ /** Eye tracking options */
319
+ eyeTracking?: {
320
+ enabled?: boolean;
321
+ eyeClosedThreshold?: number;
322
+ };
323
+ }
324
+
325
+ // =============================================================================
326
+ // Default Configurations
327
+ // =============================================================================
328
+
329
+ /**
330
+ * Default ICE servers (Google STUN servers)
331
+ */
332
+ export const DEFAULT_ICE_SERVERS: ICEServer[] = [
333
+ { urls: 'stun:stun.l.google.com:19302' },
334
+ { urls: 'stun:stun1.l.google.com:19302' },
335
+ ];
336
+
337
+ /**
338
+ * Default peer connection configuration
339
+ */
340
+ export const DEFAULT_PEER_CONNECTION_CONFIG: PeerConnectionConfig = {
341
+ iceServers: DEFAULT_ICE_SERVERS,
342
+ iceTransportPolicy: 'all',
343
+ bundlePolicy: 'balanced',
344
+ };
345
+
346
+ /**
347
+ * Default media constraints
348
+ */
349
+ export const DEFAULT_MEDIA_CONSTRAINTS: MediaConstraints = {
350
+ video: {
351
+ width: { ideal: 1280 },
352
+ height: { ideal: 720 },
353
+ frameRate: { ideal: 30 },
354
+ facingMode: 'user',
355
+ },
356
+ audio: {
357
+ echoCancellation: true,
358
+ noiseSuppression: true,
359
+ autoGainControl: true,
360
+ },
361
+ };
@@ -1,10 +0,0 @@
1
- /**
2
- * Automatically generated file. DO NOT MODIFY
3
- */
4
- package expo.modules.smartcamera;
5
-
6
- public final class BuildConfig {
7
- public static final boolean DEBUG = Boolean.parseBoolean("true");
8
- public static final String LIBRARY_PACKAGE_NAME = "expo.modules.smartcamera";
9
- public static final String BUILD_TYPE = "debug";
10
- }
@@ -1,7 +0,0 @@
1
- <?xml version="1.0" encoding="utf-8"?>
2
- <manifest xmlns:android="http://schemas.android.com/apk/res/android"
3
- package="expo.modules.smartcamera" >
4
-
5
- <uses-sdk android:minSdkVersion="23" />
6
-
7
- </manifest>
@@ -1,18 +0,0 @@
1
- {
2
- "version": 3,
3
- "artifactType": {
4
- "type": "AAPT_FRIENDLY_MERGED_MANIFESTS",
5
- "kind": "Directory"
6
- },
7
- "applicationId": "expo.modules.smartcamera",
8
- "variantName": "debug",
9
- "elements": [
10
- {
11
- "type": "SINGLE",
12
- "filters": [],
13
- "attributes": [],
14
- "outputFile": "AndroidManifest.xml"
15
- }
16
- ],
17
- "elementType": "File"
18
- }
@@ -1,6 +0,0 @@
1
- aarFormatVersion=1.0
2
- aarMetadataVersion=1.0
3
- minCompileSdk=1
4
- minCompileSdkExtension=0
5
- minAndroidGradlePluginVersion=1.0.0
6
- coreLibraryDesugaringEnabled=false
@@ -1,2 +0,0 @@
1
- <?xml version="1.0" encoding="utf-8"?>
2
- <merger version="3"><dataSet aapt-namespace="http://schemas.android.com/apk/res-auto" config="main$Generated" generated="true" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:&lt;dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="/Users/arfuhad/Development/personal/rn-expo/rn-expo-package/react-native-smart-camera/android/src/main/res"/></dataSet><dataSet aapt-namespace="http://schemas.android.com/apk/res-auto" config="main" generated-set="main$Generated" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:&lt;dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="/Users/arfuhad/Development/personal/rn-expo/rn-expo-package/react-native-smart-camera/android/src/main/res"/></dataSet><dataSet aapt-namespace="http://schemas.android.com/apk/res-auto" config="debug$Generated" generated="true" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:&lt;dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="/Users/arfuhad/Development/personal/rn-expo/rn-expo-package/react-native-smart-camera/android/src/debug/res"/></dataSet><dataSet aapt-namespace="http://schemas.android.com/apk/res-auto" config="debug" generated-set="debug$Generated" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:&lt;dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="/Users/arfuhad/Development/personal/rn-expo/rn-expo-package/react-native-smart-camera/android/src/debug/res"/></dataSet><dataSet aapt-namespace="http://schemas.android.com/apk/res-auto" config="generated$Generated" generated="true" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:&lt;dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="/Users/arfuhad/Development/personal/rn-expo/rn-expo-package/react-native-smart-camera/android/build/generated/res/resValues/debug"/></dataSet><dataSet aapt-namespace="http://schemas.android.com/apk/res-auto" config="generated" generated-set="generated$Generated" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:&lt;dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="/Users/arfuhad/Development/personal/rn-expo/rn-expo-package/react-native-smart-camera/android/build/generated/res/resValues/debug"/></dataSet><mergedItems/></merger>
@@ -1,2 +0,0 @@
1
- R_DEF: Internal format may change without notice
2
- local
@@ -1,7 +0,0 @@
1
- 1<?xml version="1.0" encoding="utf-8"?>
2
- 2<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3
- 3 package="expo.modules.smartcamera" >
4
- 4
5
- 5 <uses-sdk android:minSdkVersion="23" />
6
- 6
7
- 7</manifest>
@@ -1,7 +0,0 @@
1
- <?xml version="1.0" encoding="utf-8"?>
2
- <manifest xmlns:android="http://schemas.android.com/apk/res/android"
3
- package="expo.modules.smartcamera" >
4
-
5
- <uses-sdk android:minSdkVersion="23" />
6
-
7
- </manifest>