From 036856aed5aa56fd60aa1576c48f562720b8c94e Mon Sep 17 00:00:00 2001 From: Marc Rousavy Date: Fri, 1 Sep 2023 18:15:28 +0200 Subject: [PATCH] chore: Move everything into `package/` (#1745) * Move everything into package * Remove .DS_Store * Move scripts and eslintrc to package * Create CODE_OF_CONDUCT.md * fix some links * Update all links (I think) * Update generated docs * Update notice-yarn-changes.yml * Update validate-android.yml * Update validate-cpp.yml * Delete notice-yarn-changes.yml * Update validate-cpp.yml * Update validate-cpp.yml * Update validate-js.yml * Update validate-cpp.yml * Update validate-cpp.yml * wrong c++ style * Revert "wrong c++ style" This reverts commit 55a3575589c6f13f8b05134d83384f55e0601ab2. --- .github/workflows/build-android.yml | 6 + .github/workflows/build-ios.yml | 4 +- .github/workflows/notice-yarn-changes.yml | 19 - .github/workflows/validate-android.yml | 2 +- .github/workflows/validate-cpp.yml | 21 +- .github/workflows/validate-ios.yml | 5 +- .github/workflows/validate-js.yml | 42 +- .gitignore | 69 -- CODE_OF_CONDUCT.md | 76 +++ README.md | 4 +- docs/docs/api/_category_.yml | 1 + docs/docs/api/classes/Camera.md | 383 +++++++++++ docs/docs/api/classes/CameraCaptureError.md | 88 +++ docs/docs/api/classes/CameraRuntimeError.md | 88 +++ docs/docs/api/classes/_category_.yml | 2 + docs/docs/api/index.md | 636 ++++++++++++++++++ docs/docs/api/interfaces/CameraDevice.md | 246 +++++++ .../docs/api/interfaces/CameraDeviceFormat.md | 189 ++++++ docs/docs/api/interfaces/CameraProps.md | 406 +++++++++++ docs/docs/api/interfaces/ErrorWithCause.md | 98 +++ docs/docs/api/interfaces/Frame.md | 118 ++++ .../FrameProcessorPerformanceSuggestion.md | 26 + docs/docs/api/interfaces/FrameRateRange.md | 26 + docs/docs/api/interfaces/PhotoFile.md | 178 +++++ docs/docs/api/interfaces/Point.md | 32 + .../docs/api/interfaces/RecordVideoOptions.md | 96 +++ docs/docs/api/interfaces/TakePhotoOptions.md | 111 +++ .../api/interfaces/TakeSnapshotOptions.md | 62 ++ docs/docs/api/interfaces/TemporaryFile.md | 32 + docs/docs/api/interfaces/VideoFile.md | 48 ++ docs/docs/api/interfaces/_category_.yml | 2 + docs/docs/guides/ERRORS.mdx | 2 +- docs/docs/guides/FRAME_PROCESSORS.mdx | 4 +- .../FRAME_PROCESSORS_CREATE_OVERVIEW.mdx | 8 +- .../FRAME_PROCESSOR_CREATE_PLUGIN_ANDROID.mdx | 4 +- .../FRAME_PROCESSOR_CREATE_PLUGIN_IOS.mdx | 4 +- docs/docs/guides/LIFECYCLE.mdx | 2 +- docs/docs/guides/MOCKING.mdx | 2 +- docs/docs/guides/TROUBLESHOOTING.mdx | 4 +- docs/docs/guides/ZOOMING.mdx | 2 +- docs/docusaurus.config.js | 10 +- docs/package.json | 1 - docs/yarn.lock | 13 +- .eslintrc.js => package/.eslintrc.js | 0 package/.gitignore | 70 ++ .../VisionCamera.podspec | 0 {android => package/android}/.editorconfig | 0 {android => package/android}/.project | 0 .../org.eclipse.buildship.core.prefs | 0 {android => package/android}/CMakeLists.txt | 0 {android => package/android}/README.md | 0 {android => package/android}/build.gradle | 0 .../android}/gradle.properties | 0 .../gradle/wrapper/gradle-wrapper.jar | Bin .../gradle/wrapper/gradle-wrapper.properties | 0 {android => package/android}/gradlew | 0 {android => package/android}/gradlew.bat | 0 {android => package/android}/settings.gradle | 0 .../android}/src/main/AndroidManifest.xml | 0 .../android}/src/main/cpp/OpenGLContext.cpp | 0 .../android}/src/main/cpp/OpenGLContext.h | 0 .../android}/src/main/cpp/OpenGLError.h | 0 .../android}/src/main/cpp/OpenGLRenderer.cpp | 0 .../android}/src/main/cpp/OpenGLRenderer.h | 0 .../android}/src/main/cpp/OpenGLTexture.h | 0 .../src/main/cpp/PassThroughShader.cpp | 0 .../android}/src/main/cpp/PassThroughShader.h | 0 .../android}/src/main/cpp/VideoPipeline.cpp | 0 .../android}/src/main/cpp/VideoPipeline.h | 0 .../android}/src/main/cpp/VisionCamera.cpp | 0 .../cpp/frameprocessor/FrameHostObject.cpp | 0 .../main/cpp/frameprocessor/FrameHostObject.h | 0 .../FrameProcessorPluginHostObject.cpp | 0 .../FrameProcessorPluginHostObject.h | 0 .../cpp/frameprocessor/JSIJNIConversion.cpp | 0 .../cpp/frameprocessor/JSIJNIConversion.h | 0 .../cpp/frameprocessor/VisionCameraProxy.cpp | 0 .../cpp/frameprocessor/VisionCameraProxy.h | 0 .../frameprocessor/java-bindings/JFrame.cpp | 0 .../cpp/frameprocessor/java-bindings/JFrame.h | 0 .../java-bindings/JFrameProcessor.cpp | 0 .../java-bindings/JFrameProcessor.h | 0 .../java-bindings/JFrameProcessorPlugin.cpp | 0 .../java-bindings/JFrameProcessorPlugin.h | 0 .../java-bindings/JVisionCameraProxy.cpp | 0 .../java-bindings/JVisionCameraProxy.h | 0 .../java-bindings/JVisionCameraScheduler.cpp | 0 .../java-bindings/JVisionCameraScheduler.h | 0 .../java/com/mrousavy/camera/CameraPackage.kt | 0 .../java/com/mrousavy/camera/CameraQueues.kt | 0 .../com/mrousavy/camera/CameraView+Events.kt | 0 .../com/mrousavy/camera/CameraView+Focus.kt | 0 .../mrousavy/camera/CameraView+RecordVideo.kt | 0 .../mrousavy/camera/CameraView+TakePhoto.kt | 0 .../java/com/mrousavy/camera/CameraView.kt | 0 .../com/mrousavy/camera/CameraViewManager.kt | 0 .../com/mrousavy/camera/CameraViewModule.kt | 0 .../main/java/com/mrousavy/camera/Errors.kt | 0 .../camera/core/CameraDeviceDetails.kt | 0 .../com/mrousavy/camera/core/CameraSession.kt | 0 .../camera/core/PhotoOutputSynchronizer.kt | 0 .../com/mrousavy/camera/core/PreviewView.kt | 0 .../mrousavy/camera/core/RecordingSession.kt | 0 .../com/mrousavy/camera/core/VideoPipeline.kt | 0 .../camera/core/outputs/CameraOutputs.kt | 0 .../camera/core/outputs/ImageReaderOutput.kt | 0 .../camera/core/outputs/SurfaceOutput.kt | 0 .../core/outputs/VideoPipelineOutput.kt | 0 .../CameraCaptureSession+capture.kt | 0 .../CameraCharacteristics+getOutputSizes.kt | 0 .../CameraDevice+createCaptureSession.kt | 0 .../CameraDevice+createPhotoCaptureRequest.kt | 0 .../extensions/CameraManager+openCamera.kt | 0 .../DynamicRangeProfiles+bestProfile.kt | 0 .../camera/extensions/Handler+postAndWait.kt | 0 .../camera/extensions/List+containsAny.kt | 0 .../mrousavy/camera/extensions/Rect+zoomed.kt | 0 .../camera/extensions/Size+Extensions.kt | 0 .../ViewGroup+installHierarchyFitter.kt | 0 .../extensions/WritableMap+Nullables.kt | 0 .../mrousavy/camera/frameprocessor/Frame.java | 0 .../camera/frameprocessor/FrameProcessor.java | 0 .../frameprocessor/FrameProcessorPlugin.java | 0 .../FrameProcessorPluginRegistry.java | 0 .../frameprocessor/VisionCameraInstaller.java | 0 .../frameprocessor/VisionCameraProxy.kt | 0 .../frameprocessor/VisionCameraScheduler.java | 0 .../camera/parsers/CameraDeviceError.kt | 0 .../java/com/mrousavy/camera/parsers/Flash.kt | 0 .../mrousavy/camera/parsers/HardwareLevel.kt | 0 .../mrousavy/camera/parsers/JSUnionValue.kt | 0 .../com/mrousavy/camera/parsers/LensFacing.kt | 0 .../mrousavy/camera/parsers/Orientation.kt | 0 .../camera/parsers/PermissionStatus.kt | 0 .../mrousavy/camera/parsers/PixelFormat.kt | 0 .../camera/parsers/QualityPrioritization.kt | 0 .../java/com/mrousavy/camera/parsers/Torch.kt | 0 .../com/mrousavy/camera/parsers/VideoCodec.kt | 0 .../mrousavy/camera/parsers/VideoFileType.kt | 0 .../camera/parsers/VideoStabilizationMode.kt | 0 .../mrousavy/camera/utils/CallbackPromise.kt | 0 .../com/mrousavy/camera/utils/withPromise.kt | 0 app.plugin.js => package/app.plugin.js | 0 {cpp => package/cpp}/.clang-format | 0 {cpp => package/cpp}/JSITypedArray.cpp | 0 {cpp => package/cpp}/JSITypedArray.h | 0 {example => package/example}/.eslintrc.js | 0 {example => package/example}/README.md | 0 {example => package/example}/android/.project | 0 .../org.eclipse.buildship.core.prefs | 0 .../example}/android/app/build.gradle | 0 .../example}/android/app/debug.keystore | Bin .../example}/android/app/proguard-rules.pro | 0 .../android/app/src/debug/AndroidManifest.xml | 0 .../android/app/src/main/AndroidManifest.xml | 0 .../app/src/main/ic_launcher-playstore.png | Bin .../example/ExampleFrameProcessorPlugin.java | 0 .../mrousavy/camera/example/MainActivity.java | 0 .../camera/example/MainApplication.java | 0 .../res/drawable/rn_edit_text_material.xml | 0 .../res/mipmap-anydpi-v26/ic_launcher.xml | 0 .../mipmap-anydpi-v26/ic_launcher_round.xml | 0 .../src/main/res/mipmap-hdpi/ic_launcher.png | Bin .../mipmap-hdpi/ic_launcher_foreground.png | Bin .../res/mipmap-hdpi/ic_launcher_round.png | Bin .../src/main/res/mipmap-mdpi/ic_launcher.png | Bin .../mipmap-mdpi/ic_launcher_foreground.png | Bin .../res/mipmap-mdpi/ic_launcher_round.png | Bin .../src/main/res/mipmap-xhdpi/ic_launcher.png | Bin .../mipmap-xhdpi/ic_launcher_foreground.png | Bin .../res/mipmap-xhdpi/ic_launcher_round.png | Bin .../main/res/mipmap-xxhdpi/ic_launcher.png | Bin .../mipmap-xxhdpi/ic_launcher_foreground.png | Bin .../res/mipmap-xxhdpi/ic_launcher_round.png | Bin .../main/res/mipmap-xxxhdpi/ic_launcher.png | Bin .../mipmap-xxxhdpi/ic_launcher_foreground.png | Bin .../res/mipmap-xxxhdpi/ic_launcher_round.png | Bin .../res/values/ic_launcher_background.xml | 0 .../app/src/main/res/values/strings.xml | 0 .../app/src/main/res/values/styles.xml | 0 .../example}/android/build.gradle | 0 .../example}/android/gradle.properties | 0 .../android/gradle/wrapper/gradle-wrapper.jar | Bin .../gradle/wrapper/gradle-wrapper.properties | 0 {example => package/example}/android/gradlew | 0 .../example}/android/gradlew.bat | 0 .../example}/android/settings.gradle | 0 {example => package/example}/app.json | 0 {example => package/example}/babel.config.js | 0 {example => package/example}/clean.sh | 0 {example => package/example}/index.js | 0 .../example}/ios/.swift-version | 0 {example => package/example}/ios/.xcode.env | 0 {example => package/example}/ios/File.swift | 0 .../ExampleFrameProcessorPlugin.m | 0 {example => package/example}/ios/Gemfile | 0 {example => package/example}/ios/Gemfile.lock | 0 {example => package/example}/ios/Podfile | 0 {example => package/example}/ios/Podfile.lock | 0 .../ios/VisionCameraExample-Bridging-Header.h | 0 .../project.pbxproj | 0 .../xcschemes/VisionCameraExample.xcscheme | 0 .../contents.xcworkspacedata | 0 .../xcshareddata/IDEWorkspaceChecks.plist | 0 .../ios/VisionCameraExample/AppDelegate.h | 0 .../ios/VisionCameraExample/AppDelegate.mm | 0 .../AppIcon.appiconset/1024.png | Bin .../AppIcon.appiconset/114.png | Bin .../AppIcon.appiconset/120.png | Bin .../AppIcon.appiconset/180.png | Bin .../Images.xcassets/AppIcon.appiconset/29.png | Bin .../Images.xcassets/AppIcon.appiconset/40.png | Bin .../Images.xcassets/AppIcon.appiconset/57.png | Bin .../Images.xcassets/AppIcon.appiconset/58.png | Bin .../Images.xcassets/AppIcon.appiconset/60.png | Bin .../Images.xcassets/AppIcon.appiconset/80.png | Bin .../Images.xcassets/AppIcon.appiconset/87.png | Bin .../AppIcon.appiconset/Contents.json | 0 .../Images.xcassets/Contents.json | 0 .../shutter.imageset/Contents.json | 0 .../shutter.imageset/IMG_7966-1.jpg | Bin .../shutter.imageset/IMG_7966-2.jpg | Bin .../shutter.imageset/IMG_7966.jpg | Bin .../ios/VisionCameraExample/Info.plist | 0 .../LaunchScreen.storyboard | 0 .../example}/ios/VisionCameraExample/main.m | 0 {example => package/example}/metro.config.js | 0 {example => package/example}/package.json | 0 {example => package/example}/src/App.tsx | 0 .../example}/src/CameraPage.tsx | 0 {example => package/example}/src/Constants.ts | 0 .../example}/src/MediaPage.tsx | 0 .../example}/src/PermissionsPage.tsx | 0 {example => package/example}/src/Routes.ts | 0 .../src/frame-processors/ExamplePlugin.ts | 0 .../example}/src/hooks/useIsForeground.ts | 0 .../example}/src/views/CaptureButton.tsx | 0 .../src/views/StatusBarBlurBackground.tsx | 0 {example => package/example}/tsconfig.json | 0 {example => package/example}/yarn.lock | 0 {ios => package/ios}/.swift-version | 0 {ios => package/ios}/.swiftformat | 0 {ios => package/ios}/.swiftlint.yml | 0 {ios => package/ios}/CameraBridge.h | 0 {ios => package/ios}/CameraError.swift | 0 {ios => package/ios}/CameraQueues.swift | 0 .../ios}/CameraView+AVAudioSession.swift | 0 .../ios}/CameraView+AVCaptureSession.swift | 0 {ios => package/ios}/CameraView+Focus.swift | 0 .../ios}/CameraView+Orientation.swift | 0 .../ios}/CameraView+RecordVideo.swift | 0 .../ios}/CameraView+TakePhoto.swift | 0 {ios => package/ios}/CameraView+Torch.swift | 0 {ios => package/ios}/CameraView+Zoom.swift | 0 {ios => package/ios}/CameraView.swift | 0 {ios => package/ios}/CameraViewManager.m | 0 {ios => package/ios}/CameraViewManager.swift | 0 ...lBufferAdaptor+initWithVideoSettings.swift | 0 .../AVAudioSession+trySetAllowHaptics.swift | 0 .../AVAudioSession+updateCategory.swift | 0 ...reConnection+setInterfaceOrientation.swift | 0 .../AVCaptureDevice+isMultiCam.swift | 0 .../AVCaptureDevice+neutralZoom.swift | 0 .../AVCaptureDevice+physicalDevices.swift | 0 .../AVCaptureDevice.Format+isBetterThan.swift | 0 ...AVCaptureDevice.Format+matchesFilter.swift | 0 .../AVCaptureDevice.Format+toDictionary.swift | 0 ...CaptureDevice.Format+videoDimensions.swift | 0 .../AVCapturePhotoOutput+mirror.swift | 0 ...ureSession+setVideoStabilizationMode.swift | 0 .../AVFrameRateRange+includes.swift | 0 .../ios}/Extensions/Collection+safe.swift | 0 .../Extensions/FourCharCode+toString.swift | 0 {ios => package/ios}/Frame Processor/Frame.h | 0 {ios => package/ios}/Frame Processor/Frame.m | 0 .../ios}/Frame Processor/FrameHostObject.h | 0 .../ios}/Frame Processor/FrameHostObject.mm | 0 .../ios}/Frame Processor/FrameProcessor.h | 0 .../ios}/Frame Processor/FrameProcessor.mm | 0 .../Frame Processor/FrameProcessorPlugin.h | 0 .../Frame Processor/FrameProcessorPlugin.m | 0 .../FrameProcessorPluginHostObject.h | 0 .../FrameProcessorPluginHostObject.mm | 0 .../FrameProcessorPluginRegistry.h | 0 .../FrameProcessorPluginRegistry.m | 0 .../Frame Processor/JSINSObjectConversion.h | 0 .../Frame Processor/JSINSObjectConversion.mm | 0 .../ios}/Frame Processor/VisionCameraProxy.h | 0 .../ios}/Frame Processor/VisionCameraProxy.mm | 0 .../AVAssetWriter.Status+descriptor.swift | 0 .../AVAuthorizationStatus+descriptor.swift | 0 ...VCaptureDevice.DeviceType+descriptor.swift | 0 ...AVCaptureDevice.FlashMode+descriptor.swift | 0 ...ce.Format.AutoFocusSystem+descriptor.swift | 0 .../AVCaptureDevice.Position+descriptor.swift | 0 ...AVCaptureDevice.TorchMode+descriptor.swift | 0 ...put.QualityPrioritization+descriptor.swift | 0 ...ureVideoStabilizationMode+descriptor.swift | 0 .../ios}/Parsers/AVFileType+descriptor.swift | 0 .../Parsers/AVVideoCodecType+descriptor.swift | 0 .../ios}/Parsers/EnumParserError.swift | 0 .../ios}/Parsers/PixelFormat.swift | 0 .../UIInterfaceOrientation+descriptor.swift | 0 .../ios}/PhotoCaptureDelegate.swift | 0 {ios => package/ios}/PreviewView.swift | 0 {ios => package/ios}/README.md | 0 .../ios}/React Utils/Callback.swift | 0 .../ios}/React Utils/MakeReactError.swift | 0 .../ios}/React Utils/Promise.swift | 0 .../ios}/React Utils/ReactLogger.swift | 0 {ios => package/ios}/RecordingSession.swift | 0 .../VisionCamera.xcodeproj/project.pbxproj | 0 package.json => package/package.json | 0 {scripts => package/scripts}/bootstrap.js | 0 {scripts => package/scripts}/check-all.sh | 0 {scripts => package/scripts}/clang-format.sh | 0 {scripts => package/scripts}/clean-android.sh | 0 {scripts => package/scripts}/clean-ios.sh | 0 {scripts => package/scripts}/clean-js.sh | 0 {scripts => package/scripts}/ktlint.sh | 0 {scripts => package/scripts}/swiftformat.sh | 0 {scripts => package/scripts}/swiftlint.sh | 0 {src => package/src}/Camera.tsx | 0 {src => package/src}/CameraDevice.ts | 0 {src => package/src}/CameraError.ts | 0 {src => package/src}/CameraPosition.ts | 0 {src => package/src}/CameraProps.ts | 0 {src => package/src}/Frame.ts | 0 {src => package/src}/FrameProcessorPlugins.ts | 0 {src => package/src}/JSIHelper.ts | 0 {src => package/src}/NativeCameraModule.ts | 0 {src => package/src}/Orientation.ts | 0 {src => package/src}/PhotoFile.ts | 0 {src => package/src}/PixelFormat.ts | 0 {src => package/src}/Point.ts | 0 {src => package/src}/TemporaryFile.ts | 0 {src => package/src}/VideoFile.ts | 0 .../withDisableFrameProcessorsAndroid.ts | 0 .../withDisableFrameProcessorsIOS.ts | 0 .../src}/expo-plugin/withVisionCamera.ts | 0 .../src}/hooks/useCameraDevices.ts | 0 {src => package/src}/hooks/useCameraFormat.ts | 0 .../src}/hooks/useFrameProcessor.ts | 0 {src => package/src}/index.ts | 0 {src => package/src}/utils/FormatFilter.ts | 0 tsconfig.json => package/tsconfig.json | 0 yarn.lock => package/yarn.lock | 0 347 files changed, 3088 insertions(+), 154 deletions(-) delete mode 100644 .github/workflows/notice-yarn-changes.yml create mode 100644 CODE_OF_CONDUCT.md create mode 100644 docs/docs/api/_category_.yml create mode 100644 docs/docs/api/classes/Camera.md create mode 100644 docs/docs/api/classes/CameraCaptureError.md create mode 100644 docs/docs/api/classes/CameraRuntimeError.md create mode 100644 docs/docs/api/classes/_category_.yml create mode 100644 docs/docs/api/index.md create mode 100644 docs/docs/api/interfaces/CameraDevice.md create mode 100644 docs/docs/api/interfaces/CameraDeviceFormat.md create mode 100644 docs/docs/api/interfaces/CameraProps.md create mode 100644 docs/docs/api/interfaces/ErrorWithCause.md create mode 100644 docs/docs/api/interfaces/Frame.md create mode 100644 docs/docs/api/interfaces/FrameProcessorPerformanceSuggestion.md create mode 100644 docs/docs/api/interfaces/FrameRateRange.md create mode 100644 docs/docs/api/interfaces/PhotoFile.md create mode 100644 docs/docs/api/interfaces/Point.md create mode 100644 docs/docs/api/interfaces/RecordVideoOptions.md create mode 100644 docs/docs/api/interfaces/TakePhotoOptions.md create mode 100644 docs/docs/api/interfaces/TakeSnapshotOptions.md create mode 100644 docs/docs/api/interfaces/TemporaryFile.md create mode 100644 docs/docs/api/interfaces/VideoFile.md create mode 100644 docs/docs/api/interfaces/_category_.yml rename .eslintrc.js => package/.eslintrc.js (100%) create mode 100644 package/.gitignore rename VisionCamera.podspec => package/VisionCamera.podspec (100%) rename {android => package/android}/.editorconfig (100%) rename {android => package/android}/.project (100%) rename {android => package/android}/.settings/org.eclipse.buildship.core.prefs (100%) rename {android => package/android}/CMakeLists.txt (100%) rename {android => package/android}/README.md (100%) rename {android => package/android}/build.gradle (100%) rename {android => package/android}/gradle.properties (100%) rename {android => package/android}/gradle/wrapper/gradle-wrapper.jar (100%) rename {android => package/android}/gradle/wrapper/gradle-wrapper.properties (100%) rename {android => package/android}/gradlew (100%) rename {android => package/android}/gradlew.bat (100%) rename {android => package/android}/settings.gradle (100%) rename {android => package/android}/src/main/AndroidManifest.xml (100%) rename {android => package/android}/src/main/cpp/OpenGLContext.cpp (100%) rename {android => package/android}/src/main/cpp/OpenGLContext.h (100%) rename {android => package/android}/src/main/cpp/OpenGLError.h (100%) rename {android => package/android}/src/main/cpp/OpenGLRenderer.cpp (100%) rename {android => package/android}/src/main/cpp/OpenGLRenderer.h (100%) rename {android => package/android}/src/main/cpp/OpenGLTexture.h (100%) rename {android => package/android}/src/main/cpp/PassThroughShader.cpp (100%) rename {android => package/android}/src/main/cpp/PassThroughShader.h (100%) rename {android => package/android}/src/main/cpp/VideoPipeline.cpp (100%) rename {android => package/android}/src/main/cpp/VideoPipeline.h (100%) rename {android => package/android}/src/main/cpp/VisionCamera.cpp (100%) rename {android => package/android}/src/main/cpp/frameprocessor/FrameHostObject.cpp (100%) rename {android => package/android}/src/main/cpp/frameprocessor/FrameHostObject.h (100%) rename {android => package/android}/src/main/cpp/frameprocessor/FrameProcessorPluginHostObject.cpp (100%) rename {android => package/android}/src/main/cpp/frameprocessor/FrameProcessorPluginHostObject.h (100%) rename {android => package/android}/src/main/cpp/frameprocessor/JSIJNIConversion.cpp (100%) rename {android => package/android}/src/main/cpp/frameprocessor/JSIJNIConversion.h (100%) rename {android => package/android}/src/main/cpp/frameprocessor/VisionCameraProxy.cpp (100%) rename {android => package/android}/src/main/cpp/frameprocessor/VisionCameraProxy.h (100%) rename {android => package/android}/src/main/cpp/frameprocessor/java-bindings/JFrame.cpp (100%) rename {android => package/android}/src/main/cpp/frameprocessor/java-bindings/JFrame.h (100%) rename {android => package/android}/src/main/cpp/frameprocessor/java-bindings/JFrameProcessor.cpp (100%) rename {android => package/android}/src/main/cpp/frameprocessor/java-bindings/JFrameProcessor.h (100%) rename {android => package/android}/src/main/cpp/frameprocessor/java-bindings/JFrameProcessorPlugin.cpp (100%) rename {android => package/android}/src/main/cpp/frameprocessor/java-bindings/JFrameProcessorPlugin.h (100%) rename {android => package/android}/src/main/cpp/frameprocessor/java-bindings/JVisionCameraProxy.cpp (100%) rename {android => package/android}/src/main/cpp/frameprocessor/java-bindings/JVisionCameraProxy.h (100%) rename {android => package/android}/src/main/cpp/frameprocessor/java-bindings/JVisionCameraScheduler.cpp (100%) rename {android => package/android}/src/main/cpp/frameprocessor/java-bindings/JVisionCameraScheduler.h (100%) rename {android => package/android}/src/main/java/com/mrousavy/camera/CameraPackage.kt (100%) rename {android => package/android}/src/main/java/com/mrousavy/camera/CameraQueues.kt (100%) rename {android => package/android}/src/main/java/com/mrousavy/camera/CameraView+Events.kt (100%) rename {android => package/android}/src/main/java/com/mrousavy/camera/CameraView+Focus.kt (100%) rename {android => package/android}/src/main/java/com/mrousavy/camera/CameraView+RecordVideo.kt (100%) rename {android => package/android}/src/main/java/com/mrousavy/camera/CameraView+TakePhoto.kt (100%) rename {android => package/android}/src/main/java/com/mrousavy/camera/CameraView.kt (100%) rename {android => package/android}/src/main/java/com/mrousavy/camera/CameraViewManager.kt (100%) rename {android => package/android}/src/main/java/com/mrousavy/camera/CameraViewModule.kt (100%) rename {android => package/android}/src/main/java/com/mrousavy/camera/Errors.kt (100%) rename {android => package/android}/src/main/java/com/mrousavy/camera/core/CameraDeviceDetails.kt (100%) rename {android => package/android}/src/main/java/com/mrousavy/camera/core/CameraSession.kt (100%) rename {android => package/android}/src/main/java/com/mrousavy/camera/core/PhotoOutputSynchronizer.kt (100%) rename {android => package/android}/src/main/java/com/mrousavy/camera/core/PreviewView.kt (100%) rename {android => package/android}/src/main/java/com/mrousavy/camera/core/RecordingSession.kt (100%) rename {android => package/android}/src/main/java/com/mrousavy/camera/core/VideoPipeline.kt (100%) rename {android => package/android}/src/main/java/com/mrousavy/camera/core/outputs/CameraOutputs.kt (100%) rename {android => package/android}/src/main/java/com/mrousavy/camera/core/outputs/ImageReaderOutput.kt (100%) rename {android => package/android}/src/main/java/com/mrousavy/camera/core/outputs/SurfaceOutput.kt (100%) rename {android => package/android}/src/main/java/com/mrousavy/camera/core/outputs/VideoPipelineOutput.kt (100%) rename {android => package/android}/src/main/java/com/mrousavy/camera/extensions/CameraCaptureSession+capture.kt (100%) rename {android => package/android}/src/main/java/com/mrousavy/camera/extensions/CameraCharacteristics+getOutputSizes.kt (100%) rename {android => package/android}/src/main/java/com/mrousavy/camera/extensions/CameraDevice+createCaptureSession.kt (100%) rename {android => package/android}/src/main/java/com/mrousavy/camera/extensions/CameraDevice+createPhotoCaptureRequest.kt (100%) rename {android => package/android}/src/main/java/com/mrousavy/camera/extensions/CameraManager+openCamera.kt (100%) rename {android => package/android}/src/main/java/com/mrousavy/camera/extensions/DynamicRangeProfiles+bestProfile.kt (100%) rename {android => package/android}/src/main/java/com/mrousavy/camera/extensions/Handler+postAndWait.kt (100%) rename {android => package/android}/src/main/java/com/mrousavy/camera/extensions/List+containsAny.kt (100%) rename {android => package/android}/src/main/java/com/mrousavy/camera/extensions/Rect+zoomed.kt (100%) rename {android => package/android}/src/main/java/com/mrousavy/camera/extensions/Size+Extensions.kt (100%) rename {android => package/android}/src/main/java/com/mrousavy/camera/extensions/ViewGroup+installHierarchyFitter.kt (100%) rename {android => package/android}/src/main/java/com/mrousavy/camera/extensions/WritableMap+Nullables.kt (100%) rename {android => package/android}/src/main/java/com/mrousavy/camera/frameprocessor/Frame.java (100%) rename {android => package/android}/src/main/java/com/mrousavy/camera/frameprocessor/FrameProcessor.java (100%) rename {android => package/android}/src/main/java/com/mrousavy/camera/frameprocessor/FrameProcessorPlugin.java (100%) rename {android => package/android}/src/main/java/com/mrousavy/camera/frameprocessor/FrameProcessorPluginRegistry.java (100%) rename {android => package/android}/src/main/java/com/mrousavy/camera/frameprocessor/VisionCameraInstaller.java (100%) rename {android => package/android}/src/main/java/com/mrousavy/camera/frameprocessor/VisionCameraProxy.kt (100%) rename {android => package/android}/src/main/java/com/mrousavy/camera/frameprocessor/VisionCameraScheduler.java (100%) rename {android => package/android}/src/main/java/com/mrousavy/camera/parsers/CameraDeviceError.kt (100%) rename {android => package/android}/src/main/java/com/mrousavy/camera/parsers/Flash.kt (100%) rename {android => package/android}/src/main/java/com/mrousavy/camera/parsers/HardwareLevel.kt (100%) rename {android => package/android}/src/main/java/com/mrousavy/camera/parsers/JSUnionValue.kt (100%) rename {android => package/android}/src/main/java/com/mrousavy/camera/parsers/LensFacing.kt (100%) rename {android => package/android}/src/main/java/com/mrousavy/camera/parsers/Orientation.kt (100%) rename {android => package/android}/src/main/java/com/mrousavy/camera/parsers/PermissionStatus.kt (100%) rename {android => package/android}/src/main/java/com/mrousavy/camera/parsers/PixelFormat.kt (100%) rename {android => package/android}/src/main/java/com/mrousavy/camera/parsers/QualityPrioritization.kt (100%) rename {android => package/android}/src/main/java/com/mrousavy/camera/parsers/Torch.kt (100%) rename {android => package/android}/src/main/java/com/mrousavy/camera/parsers/VideoCodec.kt (100%) rename {android => package/android}/src/main/java/com/mrousavy/camera/parsers/VideoFileType.kt (100%) rename {android => package/android}/src/main/java/com/mrousavy/camera/parsers/VideoStabilizationMode.kt (100%) rename {android => package/android}/src/main/java/com/mrousavy/camera/utils/CallbackPromise.kt (100%) rename {android => package/android}/src/main/java/com/mrousavy/camera/utils/withPromise.kt (100%) rename app.plugin.js => package/app.plugin.js (100%) rename {cpp => package/cpp}/.clang-format (100%) rename {cpp => package/cpp}/JSITypedArray.cpp (100%) rename {cpp => package/cpp}/JSITypedArray.h (100%) rename {example => package/example}/.eslintrc.js (100%) rename {example => package/example}/README.md (100%) rename {example => package/example}/android/.project (100%) rename {example => package/example}/android/.settings/org.eclipse.buildship.core.prefs (100%) rename {example => package/example}/android/app/build.gradle (100%) rename {example => package/example}/android/app/debug.keystore (100%) rename {example => package/example}/android/app/proguard-rules.pro (100%) rename {example => package/example}/android/app/src/debug/AndroidManifest.xml (100%) rename {example => package/example}/android/app/src/main/AndroidManifest.xml (100%) rename {example => package/example}/android/app/src/main/ic_launcher-playstore.png (100%) rename {example => package/example}/android/app/src/main/java/com/mrousavy/camera/example/ExampleFrameProcessorPlugin.java (100%) rename {example => package/example}/android/app/src/main/java/com/mrousavy/camera/example/MainActivity.java (100%) rename {example => package/example}/android/app/src/main/java/com/mrousavy/camera/example/MainApplication.java (100%) rename {example => package/example}/android/app/src/main/res/drawable/rn_edit_text_material.xml (100%) rename {example => package/example}/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml (100%) rename {example => package/example}/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml (100%) rename {example => package/example}/android/app/src/main/res/mipmap-hdpi/ic_launcher.png (100%) rename {example => package/example}/android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png (100%) rename {example => package/example}/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png (100%) rename {example => package/example}/android/app/src/main/res/mipmap-mdpi/ic_launcher.png (100%) rename {example => package/example}/android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png (100%) rename {example => package/example}/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png (100%) rename {example => package/example}/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png (100%) rename {example => package/example}/android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png (100%) rename {example => package/example}/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png (100%) rename {example => package/example}/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png (100%) rename {example => package/example}/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png (100%) rename {example => package/example}/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png (100%) rename {example => package/example}/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png (100%) rename {example => package/example}/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png (100%) rename {example => package/example}/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png (100%) rename {example => package/example}/android/app/src/main/res/values/ic_launcher_background.xml (100%) rename {example => package/example}/android/app/src/main/res/values/strings.xml (100%) rename {example => package/example}/android/app/src/main/res/values/styles.xml (100%) rename {example => package/example}/android/build.gradle (100%) rename {example => package/example}/android/gradle.properties (100%) rename {example => package/example}/android/gradle/wrapper/gradle-wrapper.jar (100%) rename {example => package/example}/android/gradle/wrapper/gradle-wrapper.properties (100%) rename {example => package/example}/android/gradlew (100%) rename {example => package/example}/android/gradlew.bat (100%) rename {example => package/example}/android/settings.gradle (100%) rename {example => package/example}/app.json (100%) rename {example => package/example}/babel.config.js (100%) rename {example => package/example}/clean.sh (100%) rename {example => package/example}/index.js (100%) rename {example => package/example}/ios/.swift-version (100%) rename {example => package/example}/ios/.xcode.env (100%) rename {example => package/example}/ios/File.swift (100%) rename {example => package/example}/ios/Frame Processor Plugins/Example Plugin/ExampleFrameProcessorPlugin.m (100%) rename {example => package/example}/ios/Gemfile (100%) rename {example => package/example}/ios/Gemfile.lock (100%) rename {example => package/example}/ios/Podfile (100%) rename {example => package/example}/ios/Podfile.lock (100%) rename {example => package/example}/ios/VisionCameraExample-Bridging-Header.h (100%) rename {example => package/example}/ios/VisionCameraExample.xcodeproj/project.pbxproj (100%) rename {example => package/example}/ios/VisionCameraExample.xcodeproj/xcshareddata/xcschemes/VisionCameraExample.xcscheme (100%) rename {example => package/example}/ios/VisionCameraExample.xcworkspace/contents.xcworkspacedata (100%) rename {example => package/example}/ios/VisionCameraExample.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist (100%) rename {example => package/example}/ios/VisionCameraExample/AppDelegate.h (100%) rename {example => package/example}/ios/VisionCameraExample/AppDelegate.mm (100%) rename {example => package/example}/ios/VisionCameraExample/Images.xcassets/AppIcon.appiconset/1024.png (100%) rename {example => package/example}/ios/VisionCameraExample/Images.xcassets/AppIcon.appiconset/114.png (100%) rename {example => package/example}/ios/VisionCameraExample/Images.xcassets/AppIcon.appiconset/120.png (100%) rename {example => package/example}/ios/VisionCameraExample/Images.xcassets/AppIcon.appiconset/180.png (100%) rename {example => package/example}/ios/VisionCameraExample/Images.xcassets/AppIcon.appiconset/29.png (100%) rename {example => package/example}/ios/VisionCameraExample/Images.xcassets/AppIcon.appiconset/40.png (100%) rename {example => package/example}/ios/VisionCameraExample/Images.xcassets/AppIcon.appiconset/57.png (100%) rename {example => package/example}/ios/VisionCameraExample/Images.xcassets/AppIcon.appiconset/58.png (100%) rename {example => package/example}/ios/VisionCameraExample/Images.xcassets/AppIcon.appiconset/60.png (100%) rename {example => package/example}/ios/VisionCameraExample/Images.xcassets/AppIcon.appiconset/80.png (100%) rename {example => package/example}/ios/VisionCameraExample/Images.xcassets/AppIcon.appiconset/87.png (100%) rename {example => package/example}/ios/VisionCameraExample/Images.xcassets/AppIcon.appiconset/Contents.json (100%) rename {example => package/example}/ios/VisionCameraExample/Images.xcassets/Contents.json (100%) rename {example => package/example}/ios/VisionCameraExample/Images.xcassets/shutter.imageset/Contents.json (100%) rename {example => package/example}/ios/VisionCameraExample/Images.xcassets/shutter.imageset/IMG_7966-1.jpg (100%) rename {example => package/example}/ios/VisionCameraExample/Images.xcassets/shutter.imageset/IMG_7966-2.jpg (100%) rename {example => package/example}/ios/VisionCameraExample/Images.xcassets/shutter.imageset/IMG_7966.jpg (100%) rename {example => package/example}/ios/VisionCameraExample/Info.plist (100%) rename {example => package/example}/ios/VisionCameraExample/LaunchScreen.storyboard (100%) rename {example => package/example}/ios/VisionCameraExample/main.m (100%) rename {example => package/example}/metro.config.js (100%) rename {example => package/example}/package.json (100%) rename {example => package/example}/src/App.tsx (100%) rename {example => package/example}/src/CameraPage.tsx (100%) rename {example => package/example}/src/Constants.ts (100%) rename {example => package/example}/src/MediaPage.tsx (100%) rename {example => package/example}/src/PermissionsPage.tsx (100%) rename {example => package/example}/src/Routes.ts (100%) rename {example => package/example}/src/frame-processors/ExamplePlugin.ts (100%) rename {example => package/example}/src/hooks/useIsForeground.ts (100%) rename {example => package/example}/src/views/CaptureButton.tsx (100%) rename {example => package/example}/src/views/StatusBarBlurBackground.tsx (100%) rename {example => package/example}/tsconfig.json (100%) rename {example => package/example}/yarn.lock (100%) rename {ios => package/ios}/.swift-version (100%) rename {ios => package/ios}/.swiftformat (100%) rename {ios => package/ios}/.swiftlint.yml (100%) rename {ios => package/ios}/CameraBridge.h (100%) rename {ios => package/ios}/CameraError.swift (100%) rename {ios => package/ios}/CameraQueues.swift (100%) rename {ios => package/ios}/CameraView+AVAudioSession.swift (100%) rename {ios => package/ios}/CameraView+AVCaptureSession.swift (100%) rename {ios => package/ios}/CameraView+Focus.swift (100%) rename {ios => package/ios}/CameraView+Orientation.swift (100%) rename {ios => package/ios}/CameraView+RecordVideo.swift (100%) rename {ios => package/ios}/CameraView+TakePhoto.swift (100%) rename {ios => package/ios}/CameraView+Torch.swift (100%) rename {ios => package/ios}/CameraView+Zoom.swift (100%) rename {ios => package/ios}/CameraView.swift (100%) rename {ios => package/ios}/CameraViewManager.m (100%) rename {ios => package/ios}/CameraViewManager.swift (100%) rename {ios => package/ios}/Extensions/AVAssetWriterInputPixelBufferAdaptor+initWithVideoSettings.swift (100%) rename {ios => package/ios}/Extensions/AVAudioSession+trySetAllowHaptics.swift (100%) rename {ios => package/ios}/Extensions/AVAudioSession+updateCategory.swift (100%) rename {ios => package/ios}/Extensions/AVCaptureConnection+setInterfaceOrientation.swift (100%) rename {ios => package/ios}/Extensions/AVCaptureDevice+isMultiCam.swift (100%) rename {ios => package/ios}/Extensions/AVCaptureDevice+neutralZoom.swift (100%) rename {ios => package/ios}/Extensions/AVCaptureDevice+physicalDevices.swift (100%) rename {ios => package/ios}/Extensions/AVCaptureDevice.Format+isBetterThan.swift (100%) rename {ios => package/ios}/Extensions/AVCaptureDevice.Format+matchesFilter.swift (100%) rename {ios => package/ios}/Extensions/AVCaptureDevice.Format+toDictionary.swift (100%) rename {ios => package/ios}/Extensions/AVCaptureDevice.Format+videoDimensions.swift (100%) rename {ios => package/ios}/Extensions/AVCapturePhotoOutput+mirror.swift (100%) rename {ios => package/ios}/Extensions/AVCaptureSession+setVideoStabilizationMode.swift (100%) rename {ios => package/ios}/Extensions/AVFrameRateRange+includes.swift (100%) rename {ios => package/ios}/Extensions/Collection+safe.swift (100%) rename {ios => package/ios}/Extensions/FourCharCode+toString.swift (100%) rename {ios => package/ios}/Frame Processor/Frame.h (100%) rename {ios => package/ios}/Frame Processor/Frame.m (100%) rename {ios => package/ios}/Frame Processor/FrameHostObject.h (100%) rename {ios => package/ios}/Frame Processor/FrameHostObject.mm (100%) rename {ios => package/ios}/Frame Processor/FrameProcessor.h (100%) rename {ios => package/ios}/Frame Processor/FrameProcessor.mm (100%) rename {ios => package/ios}/Frame Processor/FrameProcessorPlugin.h (100%) rename {ios => package/ios}/Frame Processor/FrameProcessorPlugin.m (100%) rename {ios => package/ios}/Frame Processor/FrameProcessorPluginHostObject.h (100%) rename {ios => package/ios}/Frame Processor/FrameProcessorPluginHostObject.mm (100%) rename {ios => package/ios}/Frame Processor/FrameProcessorPluginRegistry.h (100%) rename {ios => package/ios}/Frame Processor/FrameProcessorPluginRegistry.m (100%) rename {ios => package/ios}/Frame Processor/JSINSObjectConversion.h (100%) rename {ios => package/ios}/Frame Processor/JSINSObjectConversion.mm (100%) rename {ios => package/ios}/Frame Processor/VisionCameraProxy.h (100%) rename {ios => package/ios}/Frame Processor/VisionCameraProxy.mm (100%) rename {ios => package/ios}/Parsers/AVAssetWriter.Status+descriptor.swift (100%) rename {ios => package/ios}/Parsers/AVAuthorizationStatus+descriptor.swift (100%) rename {ios => package/ios}/Parsers/AVCaptureDevice.DeviceType+descriptor.swift (100%) rename {ios => package/ios}/Parsers/AVCaptureDevice.FlashMode+descriptor.swift (100%) rename {ios => package/ios}/Parsers/AVCaptureDevice.Format.AutoFocusSystem+descriptor.swift (100%) rename {ios => package/ios}/Parsers/AVCaptureDevice.Position+descriptor.swift (100%) rename {ios => package/ios}/Parsers/AVCaptureDevice.TorchMode+descriptor.swift (100%) rename {ios => package/ios}/Parsers/AVCapturePhotoOutput.QualityPrioritization+descriptor.swift (100%) rename {ios => package/ios}/Parsers/AVCaptureVideoStabilizationMode+descriptor.swift (100%) rename {ios => package/ios}/Parsers/AVFileType+descriptor.swift (100%) rename {ios => package/ios}/Parsers/AVVideoCodecType+descriptor.swift (100%) rename {ios => package/ios}/Parsers/EnumParserError.swift (100%) rename {ios => package/ios}/Parsers/PixelFormat.swift (100%) rename {ios => package/ios}/Parsers/UIInterfaceOrientation+descriptor.swift (100%) rename {ios => package/ios}/PhotoCaptureDelegate.swift (100%) rename {ios => package/ios}/PreviewView.swift (100%) rename {ios => package/ios}/README.md (100%) rename {ios => package/ios}/React Utils/Callback.swift (100%) rename {ios => package/ios}/React Utils/MakeReactError.swift (100%) rename {ios => package/ios}/React Utils/Promise.swift (100%) rename {ios => package/ios}/React Utils/ReactLogger.swift (100%) rename {ios => package/ios}/RecordingSession.swift (100%) rename {ios => package/ios}/VisionCamera.xcodeproj/project.pbxproj (100%) rename package.json => package/package.json (100%) rename {scripts => package/scripts}/bootstrap.js (100%) rename {scripts => package/scripts}/check-all.sh (100%) rename {scripts => package/scripts}/clang-format.sh (100%) rename {scripts => package/scripts}/clean-android.sh (100%) rename {scripts => package/scripts}/clean-ios.sh (100%) rename {scripts => package/scripts}/clean-js.sh (100%) rename {scripts => package/scripts}/ktlint.sh (100%) rename {scripts => package/scripts}/swiftformat.sh (100%) rename {scripts => package/scripts}/swiftlint.sh (100%) rename {src => package/src}/Camera.tsx (100%) rename {src => package/src}/CameraDevice.ts (100%) rename {src => package/src}/CameraError.ts (100%) rename {src => package/src}/CameraPosition.ts (100%) rename {src => package/src}/CameraProps.ts (100%) rename {src => package/src}/Frame.ts (100%) rename {src => package/src}/FrameProcessorPlugins.ts (100%) rename {src => package/src}/JSIHelper.ts (100%) rename {src => package/src}/NativeCameraModule.ts (100%) rename {src => package/src}/Orientation.ts (100%) rename {src => package/src}/PhotoFile.ts (100%) rename {src => package/src}/PixelFormat.ts (100%) rename {src => package/src}/Point.ts (100%) rename {src => package/src}/TemporaryFile.ts (100%) rename {src => package/src}/VideoFile.ts (100%) rename {src => package/src}/expo-plugin/withDisableFrameProcessorsAndroid.ts (100%) rename {src => package/src}/expo-plugin/withDisableFrameProcessorsIOS.ts (100%) rename {src => package/src}/expo-plugin/withVisionCamera.ts (100%) rename {src => package/src}/hooks/useCameraDevices.ts (100%) rename {src => package/src}/hooks/useCameraFormat.ts (100%) rename {src => package/src}/hooks/useFrameProcessor.ts (100%) rename {src => package/src}/index.ts (100%) rename {src => package/src}/utils/FormatFilter.ts (100%) rename tsconfig.json => package/tsconfig.json (100%) rename yarn.lock => package/yarn.lock (100%) diff --git a/.github/workflows/build-android.yml b/.github/workflows/build-android.yml index d9a5209..9608bc0 100644 --- a/.github/workflows/build-android.yml +++ b/.github/workflows/build-android.yml @@ -24,6 +24,9 @@ jobs: build: name: Build Android Example App runs-on: ubuntu-latest + defaults: + run: + working-directory: ./package steps: - uses: actions/checkout@v2 @@ -63,6 +66,9 @@ jobs: build-no-frame-processors: name: Build Android Example App (without Frame Processors) runs-on: ubuntu-latest + defaults: + run: + working-directory: ./package steps: - uses: actions/checkout@v2 diff --git a/.github/workflows/build-ios.yml b/.github/workflows/build-ios.yml index 55c867a..68b9319 100644 --- a/.github/workflows/build-ios.yml +++ b/.github/workflows/build-ios.yml @@ -24,7 +24,7 @@ jobs: runs-on: macOS-latest defaults: run: - working-directory: example/ios + working-directory: package/example/ios steps: - uses: actions/checkout@v2 @@ -84,7 +84,7 @@ jobs: runs-on: macOS-latest defaults: run: - working-directory: example/ios + working-directory: package/example/ios steps: - uses: actions/checkout@v2 diff --git a/.github/workflows/notice-yarn-changes.yml b/.github/workflows/notice-yarn-changes.yml deleted file mode 100644 index 6d155e7..0000000 --- a/.github/workflows/notice-yarn-changes.yml +++ /dev/null @@ -1,19 +0,0 @@ -name: Notice yarn.lock changes -on: [pull_request] - -jobs: - check: - runs-on: ubuntu-latest - permissions: - pull-requests: write - steps: - - name: Checkout - uses: actions/checkout@v2 - - name: Notice yarn.lock changes - uses: Simek/yarn-lock-changes@main - with: - token: ${{ secrets.GITHUB_TOKEN }} - collapsibleThreshold: '25' - failOnDowngrade: 'false' - path: 'yarn.lock' - updateComment: 'true' diff --git a/.github/workflows/validate-android.yml b/.github/workflows/validate-android.yml index 6e621a0..1f56929 100644 --- a/.github/workflows/validate-android.yml +++ b/.github/workflows/validate-android.yml @@ -20,7 +20,7 @@ jobs: runs-on: ubuntu-latest defaults: run: - working-directory: ./android + working-directory: ./package/android steps: - uses: actions/checkout@v2 - name: Setup JDK 11 diff --git a/.github/workflows/validate-cpp.yml b/.github/workflows/validate-cpp.yml index 2dac66e..13848ab 100644 --- a/.github/workflows/validate-cpp.yml +++ b/.github/workflows/validate-cpp.yml @@ -6,15 +6,15 @@ on: - main paths: - '.github/workflows/validate-cpp.yml' - - 'cpp/**' - - 'android/src/main/cpp/**' - - 'ios/**' + - 'package/cpp/**' + - 'package/android/src/main/cpp/**' + - 'package/ios/**' pull_request: paths: - '.github/workflows/validate-cpp.yml' - - 'cpp/**' - - 'android/src/main/cpp/**' - - 'ios/**' + - 'package/cpp/**' + - 'package/android/src/main/cpp/**' + - 'package/ios/**' jobs: lint: @@ -23,14 +23,15 @@ jobs: strategy: matrix: path: - - 'cpp' - - 'android/src/main/cpp' - - 'ios' + - 'package/cpp' + - 'package/android/src/main/cpp' + - 'package/ios' steps: - uses: actions/checkout@v2 - name: Run clang-format style check - uses: jidicula/clang-format-action@v4.11.0 + uses: mrousavy/clang-format-action@v1 with: clang-format-version: '16' check-path: ${{ matrix.path }} + clang-format-style-path: package/cpp/.clang-format diff --git a/.github/workflows/validate-ios.yml b/.github/workflows/validate-ios.yml index 395050f..82fe5a7 100644 --- a/.github/workflows/validate-ios.yml +++ b/.github/workflows/validate-ios.yml @@ -15,6 +15,9 @@ on: jobs: SwiftLint: runs-on: ubuntu-latest + defaults: + run: + working-directory: ./package steps: - uses: actions/checkout@v2 - name: Run SwiftLint GitHub Action (--strict) @@ -27,7 +30,7 @@ jobs: runs-on: macOS-latest defaults: run: - working-directory: ./ios + working-directory: ./package/ios steps: - uses: actions/checkout@v2 diff --git a/.github/workflows/validate-js.yml b/.github/workflows/validate-js.yml index f430c2b..53f1c17 100644 --- a/.github/workflows/validate-js.yml +++ b/.github/workflows/validate-js.yml @@ -6,32 +6,35 @@ on: - main paths: - '.github/workflows/validate-js.yml' - - 'src/**' - - '*.json' - - '*.js' - - '*.lock' - - 'example/src/**' - - 'example/*.json' - - 'example/*.js' - - 'example/*.lock' - - 'example/*.tsx' + - 'package/src/**' + - 'package/*.json' + - 'package/*.js' + - 'package/*.lock' + - 'package/example/src/**' + - 'package/example/*.json' + - 'package/example/*.js' + - 'package/example/*.lock' + - 'package/example/*.tsx' pull_request: paths: - '.github/workflows/validate-js.yml' - - 'src/**' - - '*.json' - - '*.js' - - '*.lock' - - 'example/src/**' - - 'example/*.json' - - 'example/*.js' - - 'example/*.lock' - - 'example/*.tsx' + - 'package/src/**' + - 'package/*.json' + - 'package/*.js' + - 'package/*.lock' + - 'package/example/src/**' + - 'package/example/*.json' + - 'package/example/*.js' + - 'package/example/*.lock' + - 'package/example/*.tsx' jobs: compile: name: Compile JS (tsc) runs-on: ubuntu-latest + defaults: + run: + working-directory: ./package steps: - uses: actions/checkout@v2 @@ -70,6 +73,9 @@ jobs: lint: name: Lint JS (eslint, prettier) runs-on: ubuntu-latest + defaults: + run: + working-directory: ./package steps: - uses: actions/checkout@v2 diff --git a/.gitignore b/.gitignore index 86e5443..e43b0f9 100644 --- a/.gitignore +++ b/.gitignore @@ -1,70 +1 @@ -# OSX -# .DS_Store - -# XDE -.expo/ - -# VSCode -jsconfig.json - -# Xcode -# -build/ -*.pbxuser -!default.pbxuser -*.mode1v3 -!default.mode1v3 -*.mode2v3 -!default.mode2v3 -*.perspectivev3 -!default.perspectivev3 -xcuserdata -*.xccheckout -*.moved-aside -DerivedData -*.hmap -*.ipa -*.xcuserstate -project.xcworkspace - -# Android/IJ -# -.idea -.gradle -local.properties -android.iml -*.hprof - -# Cocoapods -# -example/ios/Pods - -# node.js -# -node_modules/ -npm-debug.log -yarn-debug.log -yarn-error.log - -# BUCK -buck-out/ -\.buckd/ -android/app/libs -android/keystores/debug.keystore - -# Expo -.expo/* - -# generated by bob -lib/ - -# we only use yarn -package-lock.json - -# TypeDoc/Docusaurus stuff -docs/docs/api - -# External native build folder generated in Android Studio 2.2 and later -.externalNativeBuild -.cxx/ diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md new file mode 100644 index 0000000..96b64bc --- /dev/null +++ b/CODE_OF_CONDUCT.md @@ -0,0 +1,76 @@ +# Contributor Covenant Code of Conduct + +## Our Pledge + +In the interest of fostering an open and welcoming environment, we as +contributors and maintainers pledge to making participation in our project and +our community a harassment-free experience for everyone, regardless of age, body +size, disability, ethnicity, sex characteristics, gender identity and expression, +level of experience, education, socio-economic status, nationality, personal +appearance, race, religion, or sexual identity and orientation. + +## Our Standards + +Examples of behavior that contributes to creating a positive environment +include: + +* Using welcoming and inclusive language +* Being respectful of differing viewpoints and experiences +* Gracefully accepting constructive criticism +* Focusing on what is best for the community +* Showing empathy towards other community members + +Examples of unacceptable behavior by participants include: + +* The use of sexualized language or imagery and unwelcome sexual attention or + advances +* Trolling, insulting/derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or electronic + address, without explicit permission +* Other conduct which could reasonably be considered inappropriate in a + professional setting + +## Our Responsibilities + +Project maintainers are responsible for clarifying the standards of acceptable +behavior and are expected to take appropriate and fair corrective action in +response to any instances of unacceptable behavior. + +Project maintainers have the right and responsibility to remove, edit, or +reject comments, commits, code, wiki edits, issues, and other contributions +that are not aligned to this Code of Conduct, or to ban temporarily or +permanently any contributor for other behaviors that they deem inappropriate, +threatening, offensive, or harmful. + +## Scope + +This Code of Conduct applies both within project spaces and in public spaces +when an individual is representing the project or its community. Examples of +representing a project or community include using an official project e-mail +address, posting via an official social media account, or acting as an appointed +representative at an online or offline event. Representation of a project may be +further defined and clarified by project maintainers. + +## Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behavior may be +reported by creating an issue on the GitHub repository. All +complaints will be reviewed and investigated and will result in a response that +is deemed necessary and appropriate to the circumstances. The project team is +obligated to maintain confidentiality with regard to the reporter of an incident. +Further details of specific enforcement policies may be posted separately. + +Project maintainers who do not follow or enforce the Code of Conduct in good +faith may face temporary or permanent repercussions as determined by other +members of the project's leadership. + +## Attribution + +This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, +available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html + +[homepage]: https://www.contributor-covenant.org + +For answers to common questions about this code of conduct, see +https://www.contributor-covenant.org/faq diff --git a/README.md b/README.md index 0f8db3f..1f07ee6 100644 --- a/README.md +++ b/README.md @@ -39,7 +39,7 @@ cd ios && pod install * [Guides](https://react-native-vision-camera.com/docs/guides) * [API](https://react-native-vision-camera.com/docs/api) -* [Example](./example/) +* [Example](./package/example/) * [Frame Processor Plugins](https://react-native-vision-camera.com/docs/guides/frame-processor-plugin-list) ### Example @@ -60,7 +60,7 @@ function App() { } ``` -> See the [example](./example/) app +> See the [example](./package/example/) app ### Adopting at scale diff --git a/docs/docs/api/_category_.yml b/docs/docs/api/_category_.yml new file mode 100644 index 0000000..24a4602 --- /dev/null +++ b/docs/docs/api/_category_.yml @@ -0,0 +1 @@ +label: "API" \ No newline at end of file diff --git a/docs/docs/api/classes/Camera.md b/docs/docs/api/classes/Camera.md new file mode 100644 index 0000000..11c8ab9 --- /dev/null +++ b/docs/docs/api/classes/Camera.md @@ -0,0 +1,383 @@ +--- +id: "Camera" +title: "Camera" +sidebar_position: 0 +custom_edit_url: null +--- + +### A powerful `` component. + +Read the [VisionCamera documentation](https://react-native-vision-camera.com/) for more information. + +The `` component's most important (and therefore _required_) properties are: + +* [`device`](../interfaces/CameraProps.md#device): Specifies the [`CameraDevice`](../interfaces/CameraDevice.md) to use. Get a [`CameraDevice`](../interfaces/CameraDevice.md) by using the [`useCameraDevices()`](../#usecameradevices) hook, or manually by using the [`Camera.getAvailableCameraDevices()`](Camera.md#getavailablecameradevices) function. +* [`isActive`](../interfaces/CameraProps.md#isactive): A boolean value that specifies whether the Camera should actively stream video frames or not. This can be compared to a Video component, where `isActive` specifies whether the video is paused or not. If you fully unmount the `` component instead of using `isActive={false}`, the Camera will take a bit longer to start again. + +**`Example`** + +```tsx +function App() { + const devices = useCameraDevices('wide-angle-camera') + const device = devices.back + + if (device == null) return + return ( + + ) +} +``` + +**`Component`** + +## Hierarchy + +- `PureComponent`<[`CameraProps`](../interfaces/CameraProps.md)\> + + ↳ **`Camera`** + +## Methods + +### focus + +▸ **focus**(`point`): `Promise`<`void`\> + +Focus the camera to a specific point in the coordinate system. + +**`Throws`** + +[`CameraRuntimeError`](CameraRuntimeError.md) When any kind of error occured while focussing. Use the [`code`](CameraRuntimeError.md#code) property to get the actual error + +**`Example`** + +```ts +await camera.current.focus({ + x: tapEvent.x, + y: tapEvent.y +}) +``` + +#### Parameters + +| Name | Type | Description | +| :------ | :------ | :------ | +| `point` | [`Point`](../interfaces/Point.md) | The point to focus to. This should be relative to the Camera view's coordinate system, and expressed in Pixel on iOS and Points on Android. * `(0, 0)` means **top left**. * `(CameraView.width, CameraView.height)` means **bottom right**. Make sure the value doesn't exceed the CameraView's dimensions. | + +#### Returns + +`Promise`<`void`\> + +#### Defined in + +[Camera.tsx:250](https://github.com/mrousavy/react-native-vision-camera/blob/c66550ed/package/src/Camera.tsx#L250) + +___ + +### pauseRecording + +▸ **pauseRecording**(): `Promise`<`void`\> + +Pauses the current video recording. + +**`Throws`** + +[`CameraCaptureError`](CameraCaptureError.md) When any kind of error occured while pausing the video recording. Use the [`code`](CameraCaptureError.md#code) property to get the actual error + +**`Example`** + +```ts +// Start +await camera.current.startRecording() +await timeout(1000) +// Pause +await camera.current.pauseRecording() +await timeout(500) +// Resume +await camera.current.resumeRecording() +await timeout(2000) +// Stop +const video = await camera.current.stopRecording() +``` + +#### Returns + +`Promise`<`void`\> + +#### Defined in + +[Camera.tsx:175](https://github.com/mrousavy/react-native-vision-camera/blob/c66550ed/package/src/Camera.tsx#L175) + +___ + +### resumeRecording + +▸ **resumeRecording**(): `Promise`<`void`\> + +Resumes a currently paused video recording. + +**`Throws`** + +[`CameraCaptureError`](CameraCaptureError.md) When any kind of error occured while resuming the video recording. Use the [`code`](CameraCaptureError.md#code) property to get the actual error + +**`Example`** + +```ts +// Start +await camera.current.startRecording() +await timeout(1000) +// Pause +await camera.current.pauseRecording() +await timeout(500) +// Resume +await camera.current.resumeRecording() +await timeout(2000) +// Stop +const video = await camera.current.stopRecording() +``` + +#### Returns + +`Promise`<`void`\> + +#### Defined in + +[Camera.tsx:203](https://github.com/mrousavy/react-native-vision-camera/blob/c66550ed/package/src/Camera.tsx#L203) + +___ + +### startRecording + +▸ **startRecording**(`options`): `void` + +Start a new video recording. + +Records in the following formats: +* **iOS**: QuickTime (`.mov`) +* **Android**: MPEG4 (`.mp4`) + +**`Blocking`** + +This function is synchronized/blocking. + +**`Throws`** + +[`CameraCaptureError`](CameraCaptureError.md) When any kind of error occured while starting the video recording. Use the [`code`](CameraCaptureError.md#code) property to get the actual error + +**`Example`** + +```ts +camera.current.startRecording({ + onRecordingFinished: (video) => console.log(video), + onRecordingError: (error) => console.error(error), +}) +setTimeout(() => { + camera.current.stopRecording() +}, 5000) +``` + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `options` | [`RecordVideoOptions`](../interfaces/RecordVideoOptions.md) | + +#### Returns + +`void` + +#### Defined in + +[Camera.tsx:138](https://github.com/mrousavy/react-native-vision-camera/blob/c66550ed/package/src/Camera.tsx#L138) + +___ + +### stopRecording + +▸ **stopRecording**(): `Promise`<`void`\> + +Stop the current video recording. + +**`Throws`** + +[`CameraCaptureError`](CameraCaptureError.md) When any kind of error occured while stopping the video recording. Use the [`code`](CameraCaptureError.md#code) property to get the actual error + +**`Example`** + +```ts +await camera.current.startRecording() +setTimeout(async () => { + const video = await camera.current.stopRecording() +}, 5000) +``` + +#### Returns + +`Promise`<`void`\> + +#### Defined in + +[Camera.tsx:224](https://github.com/mrousavy/react-native-vision-camera/blob/c66550ed/package/src/Camera.tsx#L224) + +___ + +### takePhoto + +▸ **takePhoto**(`options?`): `Promise`<[`PhotoFile`](../interfaces/PhotoFile.md)\> + +Take a single photo and write it's content to a temporary file. + +**`Throws`** + +[`CameraCaptureError`](CameraCaptureError.md) When any kind of error occured while capturing the photo. Use the [`code`](CameraCaptureError.md#code) property to get the actual error + +**`Example`** + +```ts +const photo = await camera.current.takePhoto({ + qualityPrioritization: 'quality', + flash: 'on', + enableAutoRedEyeReduction: true +}) +``` + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `options?` | [`TakePhotoOptions`](../interfaces/TakePhotoOptions.md) | + +#### Returns + +`Promise`<[`PhotoFile`](../interfaces/PhotoFile.md)\> + +#### Defined in + +[Camera.tsx:108](https://github.com/mrousavy/react-native-vision-camera/blob/c66550ed/package/src/Camera.tsx#L108) + +___ + +### getAvailableCameraDevices + +▸ `Static` **getAvailableCameraDevices**(): `Promise`<[`CameraDevice`](../interfaces/CameraDevice.md)[]\> + +Get a list of all available camera devices on the current phone. + +**`Throws`** + +[`CameraRuntimeError`](CameraRuntimeError.md) When any kind of error occured while getting all available camera devices. Use the [`code`](CameraRuntimeError.md#code) property to get the actual error + +**`Example`** + +```ts +const devices = await Camera.getAvailableCameraDevices() +const filtered = devices.filter((d) => matchesMyExpectations(d)) +const sorted = devices.sort(sortDevicesByAmountOfCameras) +return { + back: sorted.find((d) => d.position === "back"), + front: sorted.find((d) => d.position === "front") +} +``` + +#### Returns + +`Promise`<[`CameraDevice`](../interfaces/CameraDevice.md)[]\> + +#### Defined in + +[Camera.tsx:276](https://github.com/mrousavy/react-native-vision-camera/blob/c66550ed/package/src/Camera.tsx#L276) + +___ + +### getCameraPermissionStatus + +▸ `Static` **getCameraPermissionStatus**(): `Promise`<[`CameraPermissionStatus`](../#camerapermissionstatus)\> + +Gets the current Camera Permission Status. Check this before mounting the Camera to ensure +the user has permitted the app to use the camera. + +To actually prompt the user for camera permission, use [`requestCameraPermission()`](Camera.md#requestcamerapermission). + +**`Throws`** + +[`CameraRuntimeError`](CameraRuntimeError.md) When any kind of error occured while getting the current permission status. Use the [`code`](CameraRuntimeError.md#code) property to get the actual error + +#### Returns + +`Promise`<[`CameraPermissionStatus`](../#camerapermissionstatus)\> + +#### Defined in + +[Camera.tsx:291](https://github.com/mrousavy/react-native-vision-camera/blob/c66550ed/package/src/Camera.tsx#L291) + +___ + +### getMicrophonePermissionStatus + +▸ `Static` **getMicrophonePermissionStatus**(): `Promise`<[`CameraPermissionStatus`](../#camerapermissionstatus)\> + +Gets the current Microphone-Recording Permission Status. Check this before mounting the Camera to ensure +the user has permitted the app to use the microphone. + +To actually prompt the user for microphone permission, use [`requestMicrophonePermission()`](Camera.md#requestmicrophonepermission). + +**`Throws`** + +[`CameraRuntimeError`](CameraRuntimeError.md) When any kind of error occured while getting the current permission status. Use the [`code`](CameraRuntimeError.md#code) property to get the actual error + +#### Returns + +`Promise`<[`CameraPermissionStatus`](../#camerapermissionstatus)\> + +#### Defined in + +[Camera.tsx:306](https://github.com/mrousavy/react-native-vision-camera/blob/c66550ed/package/src/Camera.tsx#L306) + +___ + +### requestCameraPermission + +▸ `Static` **requestCameraPermission**(): `Promise`<[`CameraPermissionRequestResult`](../#camerapermissionrequestresult)\> + +Shows a "request permission" alert to the user, and resolves with the new camera permission status. + +If the user has previously blocked the app from using the camera, the alert will not be shown +and `"denied"` will be returned. + +**`Throws`** + +[`CameraRuntimeError`](CameraRuntimeError.md) When any kind of error occured while requesting permission. Use the [`code`](CameraRuntimeError.md#code) property to get the actual error + +#### Returns + +`Promise`<[`CameraPermissionRequestResult`](../#camerapermissionrequestresult)\> + +#### Defined in + +[Camera.tsx:321](https://github.com/mrousavy/react-native-vision-camera/blob/c66550ed/package/src/Camera.tsx#L321) + +___ + +### requestMicrophonePermission + +▸ `Static` **requestMicrophonePermission**(): `Promise`<[`CameraPermissionRequestResult`](../#camerapermissionrequestresult)\> + +Shows a "request permission" alert to the user, and resolves with the new microphone permission status. + +If the user has previously blocked the app from using the microphone, the alert will not be shown +and `"denied"` will be returned. + +**`Throws`** + +[`CameraRuntimeError`](CameraRuntimeError.md) When any kind of error occured while requesting permission. Use the [`code`](CameraRuntimeError.md#code) property to get the actual error + +#### Returns + +`Promise`<[`CameraPermissionRequestResult`](../#camerapermissionrequestresult)\> + +#### Defined in + +[Camera.tsx:336](https://github.com/mrousavy/react-native-vision-camera/blob/c66550ed/package/src/Camera.tsx#L336) diff --git a/docs/docs/api/classes/CameraCaptureError.md b/docs/docs/api/classes/CameraCaptureError.md new file mode 100644 index 0000000..e397f1e --- /dev/null +++ b/docs/docs/api/classes/CameraCaptureError.md @@ -0,0 +1,88 @@ +--- +id: "CameraCaptureError" +title: "CameraCaptureError" +sidebar_position: 0 +custom_edit_url: null +--- + +Represents any kind of error that occured while trying to capture a video or photo. + +See the ["Camera Errors" documentation](https://react-native-vision-camera.com/docs/guides/errors) for more information about Camera Errors. + +## Hierarchy + +- `CameraError`<[`CaptureError`](../#captureerror)\> + + ↳ **`CameraCaptureError`** + +## Accessors + +### cause + +• `get` **cause**(): `undefined` \| `Error` + +#### Returns + +`undefined` \| `Error` + +#### Inherited from + +CameraError.cause + +#### Defined in + +[CameraError.ts:132](https://github.com/mrousavy/react-native-vision-camera/blob/c66550ed/package/src/CameraError.ts#L132) + +___ + +### code + +• `get` **code**(): `TCode` + +#### Returns + +`TCode` + +#### Inherited from + +CameraError.code + +#### Defined in + +[CameraError.ts:126](https://github.com/mrousavy/react-native-vision-camera/blob/c66550ed/package/src/CameraError.ts#L126) + +___ + +### message + +• `get` **message**(): `string` + +#### Returns + +`string` + +#### Inherited from + +CameraError.message + +#### Defined in + +[CameraError.ts:129](https://github.com/mrousavy/react-native-vision-camera/blob/c66550ed/package/src/CameraError.ts#L129) + +## Methods + +### toString + +▸ **toString**(): `string` + +#### Returns + +`string` + +#### Inherited from + +CameraError.toString + +#### Defined in + +[CameraError.ts:150](https://github.com/mrousavy/react-native-vision-camera/blob/c66550ed/package/src/CameraError.ts#L150) diff --git a/docs/docs/api/classes/CameraRuntimeError.md b/docs/docs/api/classes/CameraRuntimeError.md new file mode 100644 index 0000000..eb96785 --- /dev/null +++ b/docs/docs/api/classes/CameraRuntimeError.md @@ -0,0 +1,88 @@ +--- +id: "CameraRuntimeError" +title: "CameraRuntimeError" +sidebar_position: 0 +custom_edit_url: null +--- + +Represents any kind of error that occured in the Camera View Module. + +See the ["Camera Errors" documentation](https://react-native-vision-camera.com/docs/guides/errors) for more information about Camera Errors. + +## Hierarchy + +- `CameraError`<[`PermissionError`](../#permissionerror) \| [`ParameterError`](../#parametererror) \| [`DeviceError`](../#deviceerror) \| [`FormatError`](../#formaterror) \| [`SessionError`](../#sessionerror) \| [`SystemError`](../#systemerror) \| [`UnknownError`](../#unknownerror)\> + + ↳ **`CameraRuntimeError`** + +## Accessors + +### cause + +• `get` **cause**(): `undefined` \| `Error` + +#### Returns + +`undefined` \| `Error` + +#### Inherited from + +CameraError.cause + +#### Defined in + +[CameraError.ts:132](https://github.com/mrousavy/react-native-vision-camera/blob/c66550ed/package/src/CameraError.ts#L132) + +___ + +### code + +• `get` **code**(): `TCode` + +#### Returns + +`TCode` + +#### Inherited from + +CameraError.code + +#### Defined in + +[CameraError.ts:126](https://github.com/mrousavy/react-native-vision-camera/blob/c66550ed/package/src/CameraError.ts#L126) + +___ + +### message + +• `get` **message**(): `string` + +#### Returns + +`string` + +#### Inherited from + +CameraError.message + +#### Defined in + +[CameraError.ts:129](https://github.com/mrousavy/react-native-vision-camera/blob/c66550ed/package/src/CameraError.ts#L129) + +## Methods + +### toString + +▸ **toString**(): `string` + +#### Returns + +`string` + +#### Inherited from + +CameraError.toString + +#### Defined in + +[CameraError.ts:150](https://github.com/mrousavy/react-native-vision-camera/blob/c66550ed/package/src/CameraError.ts#L150) diff --git a/docs/docs/api/classes/_category_.yml b/docs/docs/api/classes/_category_.yml new file mode 100644 index 0000000..55c7980 --- /dev/null +++ b/docs/docs/api/classes/_category_.yml @@ -0,0 +1,2 @@ +label: "Classes" +position: 3 \ No newline at end of file diff --git a/docs/docs/api/index.md b/docs/docs/api/index.md new file mode 100644 index 0000000..78db55b --- /dev/null +++ b/docs/docs/api/index.md @@ -0,0 +1,636 @@ +--- +id: "index" +title: "VisionCamera" +sidebar_label: "Overview" +sidebar_position: 0.5 +custom_edit_url: null +--- + +## Classes + +- [Camera](classes/Camera.md) +- [CameraCaptureError](classes/CameraCaptureError.md) +- [CameraRuntimeError](classes/CameraRuntimeError.md) + +## Interfaces + +- [CameraDevice](interfaces/CameraDevice.md) +- [CameraDeviceFormat](interfaces/CameraDeviceFormat.md) +- [CameraProps](interfaces/CameraProps.md) +- [ErrorWithCause](interfaces/ErrorWithCause.md) +- [PhotoFile](interfaces/PhotoFile.md) +- [Point](interfaces/Point.md) +- [RecordVideoOptions](interfaces/RecordVideoOptions.md) +- [TakePhotoOptions](interfaces/TakePhotoOptions.md) +- [TemporaryFile](interfaces/TemporaryFile.md) +- [VideoFile](interfaces/VideoFile.md) + +## Type Aliases + +### AutoFocusSystem + +Ƭ **AutoFocusSystem**: ``"contrast-detection"`` \| ``"phase-detection"`` \| ``"none"`` + +Indicates a format's autofocus system. + +* `"none"`: Indicates that autofocus is not available +* `"contrast-detection"`: Indicates that autofocus is achieved by contrast detection. Contrast detection performs a focus scan to find the optimal position +* `"phase-detection"`: Indicates that autofocus is achieved by phase detection. Phase detection has the ability to achieve focus in many cases without a focus scan. Phase detection autofocus is typically less visually intrusive than contrast detection autofocus + +#### Defined in + +[CameraDevice.ts:53](https://github.com/mrousavy/react-native-vision-camera/blob/c66550ed/package/src/CameraDevice.ts#L53) + +___ + +### CameraDevices + +Ƭ **CameraDevices**: { [key in CameraPosition]: CameraDevice \| undefined } + +#### Defined in + +[hooks/useCameraDevices.ts:7](https://github.com/mrousavy/react-native-vision-camera/blob/c66550ed/package/src/hooks/useCameraDevices.ts#L7) + +___ + +### CameraPermissionRequestResult + +Ƭ **CameraPermissionRequestResult**: ``"granted"`` \| ``"denied"`` + +#### Defined in + +[Camera.tsx:15](https://github.com/mrousavy/react-native-vision-camera/blob/c66550ed/package/src/Camera.tsx#L15) + +___ + +### CameraPermissionStatus + +Ƭ **CameraPermissionStatus**: ``"granted"`` \| ``"not-determined"`` \| ``"denied"`` \| ``"restricted"`` + +#### Defined in + +[Camera.tsx:14](https://github.com/mrousavy/react-native-vision-camera/blob/c66550ed/package/src/Camera.tsx#L14) + +___ + +### CameraPosition + +Ƭ **CameraPosition**: ``"front"`` \| ``"back"`` \| ``"unspecified"`` \| ``"external"`` + +Represents the camera device position. + +* `"back"`: Indicates that the device is physically located on the back of the system hardware +* `"front"`: Indicates that the device is physically located on the front of the system hardware + +#### iOS only +* `"unspecified"`: Indicates that the device's position relative to the system hardware is unspecified + +#### Android only +* `"external"`: The camera device is an external camera, and has no fixed facing relative to the device's screen. (Android only) + +#### Defined in + +[CameraPosition.ts:13](https://github.com/mrousavy/react-native-vision-camera/blob/c66550ed/package/src/CameraPosition.ts#L13) + +___ + +### CaptureError + +Ƭ **CaptureError**: ``"capture/invalid-photo-format"`` \| ``"capture/encoder-error"`` \| ``"capture/muxer-error"`` \| ``"capture/recording-in-progress"`` \| ``"capture/no-recording-in-progress"`` \| ``"capture/file-io-error"`` \| ``"capture/create-temp-file-error"`` \| ``"capture/invalid-video-options"`` \| ``"capture/create-recorder-error"`` \| ``"capture/recorder-error"`` \| ``"capture/no-valid-data"`` \| ``"capture/inactive-source"`` \| ``"capture/insufficient-storage"`` \| ``"capture/file-size-limit-reached"`` \| ``"capture/invalid-photo-codec"`` \| ``"capture/not-bound-error"`` \| ``"capture/capture-type-not-supported"`` \| ``"capture/video-not-enabled"`` \| ``"capture/photo-not-enabled"`` \| ``"capture/aborted"`` \| ``"capture/unknown"`` + +#### Defined in + +[CameraError.ts:31](https://github.com/mrousavy/react-native-vision-camera/blob/c66550ed/package/src/CameraError.ts#L31) + +___ + +### DeviceError + +Ƭ **DeviceError**: ``"device/configuration-error"`` \| ``"device/no-device"`` \| ``"device/invalid-device"`` \| ``"device/torch-unavailable"`` \| ``"device/microphone-unavailable"`` \| ``"device/pixel-format-not-supported"`` \| ``"device/low-light-boost-not-supported"`` \| ``"device/focus-not-supported"`` \| ``"device/camera-not-available-on-simulator"`` + +#### Defined in + +[CameraError.ts:8](https://github.com/mrousavy/react-native-vision-camera/blob/c66550ed/package/src/CameraError.ts#L8) + +___ + +### FormatError + +Ƭ **FormatError**: ``"format/invalid-fps"`` \| ``"format/invalid-hdr"`` \| ``"format/invalid-low-light-boost"`` \| ``"format/invalid-format"`` \| ``"format/invalid-color-space"`` + +#### Defined in + +[CameraError.ts:18](https://github.com/mrousavy/react-native-vision-camera/blob/c66550ed/package/src/CameraError.ts#L18) + +___ + +### FrameProcessor + +Ƭ **FrameProcessor**: `Object` + +#### Type declaration + +| Name | Type | +| :------ | :------ | +| `frameProcessor` | (`frame`: `Frame`) => `void` | +| `type` | ``"frame-processor"`` | + +#### Defined in + +[CameraProps.ts:7](https://github.com/mrousavy/react-native-vision-camera/blob/c66550ed/package/src/CameraProps.ts#L7) + +___ + +### LogicalCameraDeviceType + +Ƭ **LogicalCameraDeviceType**: ``"dual-camera"`` \| ``"dual-wide-camera"`` \| ``"triple-camera"`` + +Indentifiers for a logical camera (Combinations of multiple physical cameras to create a single logical camera). + +* `"dual-camera"`: A combination of wide-angle and telephoto cameras that creates a capture device. +* `"dual-wide-camera"`: A device that consists of two cameras of fixed focal length, one ultrawide angle and one wide angle. +* `"triple-camera"`: A device that consists of three cameras of fixed focal length, one ultrawide angle, one wide angle, and one telephoto. + +#### Defined in + +[CameraDevice.ts:21](https://github.com/mrousavy/react-native-vision-camera/blob/c66550ed/package/src/CameraDevice.ts#L21) + +___ + +### ParameterError + +Ƭ **ParameterError**: ``"parameter/invalid-parameter"`` \| ``"parameter/unsupported-os"`` \| ``"parameter/unsupported-output"`` \| ``"parameter/unsupported-input"`` \| ``"parameter/invalid-combination"`` + +#### Defined in + +[CameraError.ts:2](https://github.com/mrousavy/react-native-vision-camera/blob/c66550ed/package/src/CameraError.ts#L2) + +___ + +### PermissionError + +Ƭ **PermissionError**: ``"permission/microphone-permission-denied"`` \| ``"permission/camera-permission-denied"`` + +#### Defined in + +[CameraError.ts:1](https://github.com/mrousavy/react-native-vision-camera/blob/c66550ed/package/src/CameraError.ts#L1) + +___ + +### PhysicalCameraDeviceType + +Ƭ **PhysicalCameraDeviceType**: ``"ultra-wide-angle-camera"`` \| ``"wide-angle-camera"`` \| ``"telephoto-camera"`` + +Indentifiers for a physical camera (one that actually exists on the back/front of the device) + +* `"ultra-wide-angle-camera"`: A built-in camera with a shorter focal length than that of a wide-angle camera. (focal length between below 24mm) +* `"wide-angle-camera"`: A built-in wide-angle camera. (focal length between 24mm and 35mm) +* `"telephoto-camera"`: A built-in camera device with a longer focal length than a wide-angle camera. (focal length between above 85mm) + +#### Defined in + +[CameraDevice.ts:12](https://github.com/mrousavy/react-native-vision-camera/blob/c66550ed/package/src/CameraDevice.ts#L12) + +___ + +### SessionError + +Ƭ **SessionError**: ``"session/camera-not-ready"`` \| ``"session/camera-cannot-be-opened"`` \| ``"session/camera-has-been-disconnected"`` \| ``"session/audio-session-setup-failed"`` \| ``"session/audio-in-use-by-other-app"`` \| ``"session/audio-session-failed-to-activate"`` + +#### Defined in + +[CameraError.ts:24](https://github.com/mrousavy/react-native-vision-camera/blob/c66550ed/package/src/CameraError.ts#L24) + +___ + +### SystemError + +Ƭ **SystemError**: ``"system/camera-module-not-found"`` \| ``"system/no-camera-manager"`` \| ``"system/frame-processors-unavailable"`` \| ``"system/view-not-found"`` + +#### Defined in + +[CameraError.ts:53](https://github.com/mrousavy/react-native-vision-camera/blob/c66550ed/package/src/CameraError.ts#L53) + +___ + +### UnknownError + +Ƭ **UnknownError**: ``"unknown/unknown"`` + +#### Defined in + +[CameraError.ts:58](https://github.com/mrousavy/react-native-vision-camera/blob/c66550ed/package/src/CameraError.ts#L58) + +___ + +### VideoStabilizationMode + +Ƭ **VideoStabilizationMode**: ``"off"`` \| ``"standard"`` \| ``"cinematic"`` \| ``"cinematic-extended"`` \| ``"auto"`` + +Indicates a format's supported video stabilization mode. Enabling video stabilization may introduce additional latency into the video capture pipeline. + +* `"off"`: No video stabilization. Indicates that video should not be stabilized +* `"standard"`: Standard software-based video stabilization. Standard video stabilization reduces the field of view by about 10%. +* `"cinematic"`: Advanced software-based video stabilization. This applies more aggressive cropping or transformations than standard. +* `"cinematic-extended"`: Extended software- and hardware-based stabilization that aggressively crops and transforms the video to apply a smooth cinematic stabilization. +* `"auto"`: Indicates that the most appropriate video stabilization mode for the device and format should be chosen automatically + +#### Defined in + +[CameraDevice.ts:64](https://github.com/mrousavy/react-native-vision-camera/blob/c66550ed/package/src/CameraDevice.ts#L64) + +## Variables + +### VisionCameraProxy + +• `Const` **VisionCameraProxy**: `TVisionCameraProxy` = `proxy` + +#### Defined in + +[FrameProcessorPlugins.ts:95](https://github.com/mrousavy/react-native-vision-camera/blob/c66550ed/package/src/FrameProcessorPlugins.ts#L95) + +## Functions + +### createFrameProcessor + +▸ **createFrameProcessor**(`frameProcessor`, `type`): [`FrameProcessor`](#frameprocessor) + +Create a new Frame Processor function which you can pass to the ``. +(See ["Frame Processors"](https://mrousavy.github.io/react-native-vision-camera/docs/guides/frame-processors)) + +Make sure to add the `'worklet'` directive to the top of the Frame Processor function, otherwise it will not get compiled into a worklet. + +Also make sure to memoize the returned object, so that the Camera doesn't reset the Frame Processor Context each time. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `frameProcessor` | (`frame`: `Frame`) => `void` | +| `type` | ``"frame-processor"`` | + +#### Returns + +[`FrameProcessor`](#frameprocessor) + +#### Defined in + +[hooks/useFrameProcessor.ts:13](https://github.com/mrousavy/react-native-vision-camera/blob/c66550ed/package/src/hooks/useFrameProcessor.ts#L13) + +___ + +### isErrorWithCause + +▸ **isErrorWithCause**(`error`): error is ErrorWithCause + +Checks if the given `error` is of type [`ErrorWithCause`](interfaces/ErrorWithCause.md) + +#### Parameters + +| Name | Type | Description | +| :------ | :------ | :------ | +| `error` | `unknown` | Any unknown object to validate | + +#### Returns + +error is ErrorWithCause + +`true` if the given `error` is of type [`ErrorWithCause`](interfaces/ErrorWithCause.md) + +#### Defined in + +[CameraError.ts:176](https://github.com/mrousavy/react-native-vision-camera/blob/c66550ed/package/src/CameraError.ts#L176) + +___ + +### parsePhysicalDeviceTypes + +▸ **parsePhysicalDeviceTypes**(`physicalDeviceTypes`): [`PhysicalCameraDeviceType`](#physicalcameradevicetype) \| [`LogicalCameraDeviceType`](#logicalcameradevicetype) + +Parses an array of physical device types into a single [`PhysicalCameraDeviceType`](#physicalcameradevicetype) or [`LogicalCameraDeviceType`](#logicalcameradevicetype), depending what matches. + +**`Method`** + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `physicalDeviceTypes` | [`PhysicalCameraDeviceType`](#physicalcameradevicetype)[] | + +#### Returns + +[`PhysicalCameraDeviceType`](#physicalcameradevicetype) \| [`LogicalCameraDeviceType`](#logicalcameradevicetype) + +#### Defined in + +[CameraDevice.ts:27](https://github.com/mrousavy/react-native-vision-camera/blob/c66550ed/package/src/CameraDevice.ts#L27) + +___ + +### runAsync + +▸ **runAsync**(`frame`, `func`): `void` + +Runs the given function asynchronously, while keeping a strong reference to the Frame. + +For example, if you want to run a heavy face detection algorithm +while still drawing to the screen at 60 FPS, you can use `runAsync(...)` +to offload the face detection algorithm to a separate thread. + +**`Example`** + +```ts +const frameProcessor = useFrameProcessor((frame) => { + 'worklet' + console.log('New Frame') + runAsync(frame, () => { + 'worklet' + const faces = detectFaces(frame) + const face = [faces0] + console.log(`Detected a new face: ${face}`) + }) +}) +``` + +#### Parameters + +| Name | Type | Description | +| :------ | :------ | :------ | +| `frame` | `Frame` | The current Frame of the Frame Processor. | +| `func` | () => `void` | The function to execute. | + +#### Returns + +`void` + +#### Defined in + +[FrameProcessorPlugins.ts:177](https://github.com/mrousavy/react-native-vision-camera/blob/c66550ed/package/src/FrameProcessorPlugins.ts#L177) + +___ + +### runAtTargetFps + +▸ **runAtTargetFps**<`T`\>(`fps`, `func`): `T` \| `undefined` + +Runs the given function at the given target FPS rate. + +For example, if you want to run a heavy face detection algorithm +only once per second, you can use `runAtTargetFps(1, ...)` to +throttle it to 1 FPS. + +**`Example`** + +```ts +const frameProcessor = useFrameProcessor((frame) => { + 'worklet' + console.log('New Frame') + runAtTargetFps(5, () => { + 'worklet' + const faces = detectFaces(frame) + console.log(`Detected a new face: ${faces[0]}`) + }) +}) +``` + +#### Type parameters + +| Name | +| :------ | +| `T` | + +#### Parameters + +| Name | Type | Description | +| :------ | :------ | :------ | +| `fps` | `number` | The target FPS rate at which the given function should be executed | +| `func` | () => `T` | The function to execute. | + +#### Returns + +`T` \| `undefined` + +The result of the function if it was executed, or `undefined` otherwise. + +#### Defined in + +[FrameProcessorPlugins.ts:136](https://github.com/mrousavy/react-native-vision-camera/blob/c66550ed/package/src/FrameProcessorPlugins.ts#L136) + +___ + +### sortDevices + +▸ **sortDevices**(`left`, `right`): `number` + +Compares two devices by the following criteria: +* `wide-angle-camera`s are ranked higher than others +* Devices with more physical cameras are ranked higher than ones with less. (e.g. "Triple Camera" > "Wide-Angle Camera") + +> Note that this makes the `sort()` function descending, so the first element (`[0]`) is the "best" device. + +**`Example`** + +```ts +const devices = camera.devices.sort(sortDevices) +const bestDevice = devices[0] +``` + +**`Method`** + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `left` | [`CameraDevice`](interfaces/CameraDevice.md) | +| `right` | [`CameraDevice`](interfaces/CameraDevice.md) | + +#### Returns + +`number` + +#### Defined in + +[utils/FormatFilter.ts:18](https://github.com/mrousavy/react-native-vision-camera/blob/c66550ed/package/src/utils/FormatFilter.ts#L18) + +___ + +### sortFormats + +▸ **sortFormats**(`left`, `right`): `number` + +Sort formats by resolution and aspect ratio difference (to the Screen size). + +> Note that this makes the `sort()` function descending, so the first element (`[0]`) is the "best" device. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `left` | [`CameraDeviceFormat`](interfaces/CameraDeviceFormat.md) | +| `right` | [`CameraDeviceFormat`](interfaces/CameraDeviceFormat.md) | + +#### Returns + +`number` + +#### Defined in + +[utils/FormatFilter.ts:72](https://github.com/mrousavy/react-native-vision-camera/blob/c66550ed/package/src/utils/FormatFilter.ts#L72) + +___ + +### tryParseNativeCameraError + +▸ **tryParseNativeCameraError**<`T`\>(`nativeError`): [`CameraCaptureError`](classes/CameraCaptureError.md) \| [`CameraRuntimeError`](classes/CameraRuntimeError.md) \| `T` + +Tries to parse an error coming from native to a typed JS camera error. + +**`Method`** + +#### Type parameters + +| Name | +| :------ | +| `T` | + +#### Parameters + +| Name | Type | Description | +| :------ | :------ | :------ | +| `nativeError` | `T` | The native error instance. This is a JSON in the legacy native module architecture. | + +#### Returns + +[`CameraCaptureError`](classes/CameraCaptureError.md) \| [`CameraRuntimeError`](classes/CameraRuntimeError.md) \| `T` + +A [`CameraRuntimeError`](classes/CameraRuntimeError.md) or [`CameraCaptureError`](classes/CameraCaptureError.md), or the `nativeError` itself if it's not parsable + +#### Defined in + +[CameraError.ts:202](https://github.com/mrousavy/react-native-vision-camera/blob/c66550ed/package/src/CameraError.ts#L202) + +___ + +### useCameraDevices + +▸ **useCameraDevices**(): [`CameraDevices`](#cameradevices) + +Gets the best available [`CameraDevice`](interfaces/CameraDevice.md). Devices with more cameras are preferred. + +**`Throws`** + +[`CameraRuntimeError`](classes/CameraRuntimeError.md) if no device was found. + +**`Example`** + +```tsx +const device = useCameraDevice() +// ... +return +``` + +#### Returns + +[`CameraDevices`](#cameradevices) + +The best matching [`CameraDevice`](interfaces/CameraDevice.md). + +#### Defined in + +[hooks/useCameraDevices.ts:29](https://github.com/mrousavy/react-native-vision-camera/blob/c66550ed/package/src/hooks/useCameraDevices.ts#L29) + +▸ **useCameraDevices**(`deviceType`): [`CameraDevices`](#cameradevices) + +Gets a [`CameraDevice`](interfaces/CameraDevice.md) for the requested device type. + +**`Throws`** + +[`CameraRuntimeError`](classes/CameraRuntimeError.md) if no device was found. + +**`Example`** + +```tsx +const device = useCameraDevice('wide-angle-camera') +// ... +return +``` + +#### Parameters + +| Name | Type | Description | +| :------ | :------ | :------ | +| `deviceType` | [`PhysicalCameraDeviceType`](#physicalcameradevicetype) \| [`LogicalCameraDeviceType`](#logicalcameradevicetype) | Specifies a device type which will be used as a device filter. | + +#### Returns + +[`CameraDevices`](#cameradevices) + +A [`CameraDevice`](interfaces/CameraDevice.md) for the requested device type. + +#### Defined in + +[hooks/useCameraDevices.ts:44](https://github.com/mrousavy/react-native-vision-camera/blob/c66550ed/package/src/hooks/useCameraDevices.ts#L44) + +___ + +### useCameraFormat + +▸ **useCameraFormat**(`device?`): [`CameraDeviceFormat`](interfaces/CameraDeviceFormat.md) \| `undefined` + +Returns the best format for the given camera device. + +This function tries to choose a format with the highest possible photo-capture resolution and best matching aspect ratio. + +#### Parameters + +| Name | Type | Description | +| :------ | :------ | :------ | +| `device?` | [`CameraDevice`](interfaces/CameraDevice.md) | The Camera Device | + +#### Returns + +[`CameraDeviceFormat`](interfaces/CameraDeviceFormat.md) \| `undefined` + +The best matching format for the given camera device, or `undefined` if the camera device is `undefined`. + +#### Defined in + +[hooks/useCameraFormat.ts:14](https://github.com/mrousavy/react-native-vision-camera/blob/c66550ed/package/src/hooks/useCameraFormat.ts#L14) + +___ + +### useFrameProcessor + +▸ **useFrameProcessor**(`frameProcessor`, `dependencies`): [`FrameProcessor`](#frameprocessor) + +Returns a memoized Frame Processor function wich you can pass to the ``. +(See ["Frame Processors"](https://mrousavy.github.io/react-native-vision-camera/docs/guides/frame-processors)) + +Make sure to add the `'worklet'` directive to the top of the Frame Processor function, otherwise it will not get compiled into a worklet. + +**`Example`** + +```ts +const frameProcessor = useFrameProcessor((frame) => { + 'worklet' + const qrCodes = scanQRCodes(frame) + console.log(`QR Codes: ${qrCodes}`) +}, []) +``` + +#### Parameters + +| Name | Type | Description | +| :------ | :------ | :------ | +| `frameProcessor` | (`frame`: `Frame`) => `void` | The Frame Processor | +| `dependencies` | `DependencyList` | The React dependencies which will be copied into the VisionCamera JS-Runtime. | + +#### Returns + +[`FrameProcessor`](#frameprocessor) + +The memoized Frame Processor. + +#### Defined in + +[hooks/useFrameProcessor.ts:49](https://github.com/mrousavy/react-native-vision-camera/blob/c66550ed/package/src/hooks/useFrameProcessor.ts#L49) diff --git a/docs/docs/api/interfaces/CameraDevice.md b/docs/docs/api/interfaces/CameraDevice.md new file mode 100644 index 0000000..e84d9ea --- /dev/null +++ b/docs/docs/api/interfaces/CameraDevice.md @@ -0,0 +1,246 @@ +--- +id: "CameraDevice" +title: "CameraDevice" +sidebar_position: 0 +custom_edit_url: null +--- + +Represents a camera device discovered by the [`Camera.getAvailableCameraDevices()`](../classes/Camera.md#getavailablecameradevices) function + +## Properties + +### devices + +• **devices**: [`PhysicalCameraDeviceType`](../#physicalcameradevicetype)[] + +The physical devices this `CameraDevice` contains. + +* If this camera device is a **logical camera** (combination of multiple physical cameras), there are multiple cameras in this array. +* If this camera device is a **physical camera**, there is only a single element in this array. + +You can check if the camera is a logical multi-camera by using the `isMultiCam` property. + +#### Defined in + +[CameraDevice.ts:149](https://github.com/mrousavy/react-native-vision-camera/blob/c66550ed/package/src/CameraDevice.ts#L149) + +___ + +### formats + +• **formats**: [`CameraDeviceFormat`](CameraDeviceFormat.md)[] + +All available formats for this camera device. Use this to find the best format for your use case and set it to the Camera's [`Camera's .format`](CameraProps.md#format) property. + +See [the Camera Formats documentation](https://react-native-vision-camera.com/docs/guides/formats) for more information about Camera Formats. + +#### Defined in + +[CameraDevice.ts:203](https://github.com/mrousavy/react-native-vision-camera/blob/c66550ed/package/src/CameraDevice.ts#L203) + +___ + +### hardwareLevel + +• **hardwareLevel**: ``"legacy"`` \| ``"limited"`` \| ``"full"`` + +The hardware level of the Camera. +- On Android, some older devices are running at a `legacy` or `limited` level which means they are running in a backwards compatible mode. +- On iOS, all devices are `full`. + +#### Defined in + +[CameraDevice.ts:229](https://github.com/mrousavy/react-native-vision-camera/blob/c66550ed/package/src/CameraDevice.ts#L229) + +___ + +### hasFlash + +• **hasFlash**: `boolean` + +Specifies whether this camera supports enabling flash for photo capture. + +#### Defined in + +[CameraDevice.ts:161](https://github.com/mrousavy/react-native-vision-camera/blob/c66550ed/package/src/CameraDevice.ts#L161) + +___ + +### hasTorch + +• **hasTorch**: `boolean` + +Specifies whether this camera supports continuously enabling the flash to act like a torch (flash with video capture) + +#### Defined in + +[CameraDevice.ts:165](https://github.com/mrousavy/react-native-vision-camera/blob/c66550ed/package/src/CameraDevice.ts#L165) + +___ + +### id + +• **id**: `string` + +The native ID of the camera device instance. + +#### Defined in + +[CameraDevice.ts:140](https://github.com/mrousavy/react-native-vision-camera/blob/c66550ed/package/src/CameraDevice.ts#L140) + +___ + +### isMultiCam + +• **isMultiCam**: `boolean` + +A property indicating whether the device is a virtual multi-camera consisting of multiple combined physical cameras. + +Examples: +* The Dual Camera, which supports seamlessly switching between a wide and telephoto camera while zooming and generating depth data from the disparities between the different points of view of the physical cameras. +* The TrueDepth Camera, which generates depth data from disparities between a YUV camera and an Infrared camera pointed in the same direction. + +#### Defined in + +[CameraDevice.ts:173](https://github.com/mrousavy/react-native-vision-camera/blob/c66550ed/package/src/CameraDevice.ts#L173) + +___ + +### maxZoom + +• **maxZoom**: `number` + +Maximum available zoom factor (e.g. `128`) + +#### Defined in + +[CameraDevice.ts:181](https://github.com/mrousavy/react-native-vision-camera/blob/c66550ed/package/src/CameraDevice.ts#L181) + +___ + +### minZoom + +• **minZoom**: `number` + +Minimum available zoom factor (e.g. `1`) + +#### Defined in + +[CameraDevice.ts:177](https://github.com/mrousavy/react-native-vision-camera/blob/c66550ed/package/src/CameraDevice.ts#L177) + +___ + +### name + +• **name**: `string` + +A friendly localized name describing the camera. + +#### Defined in + +[CameraDevice.ts:157](https://github.com/mrousavy/react-native-vision-camera/blob/c66550ed/package/src/CameraDevice.ts#L157) + +___ + +### neutralZoom + +• **neutralZoom**: `number` + +The zoom factor where the camera is "neutral". + +* For single-physical cameras this property is always `1.0`. +* For multi cameras this property is a value between `minZoom` and `maxZoom`, where the camera is in _wide-angle_ mode and hasn't switched to the _ultra-wide-angle_ ("fish-eye") or telephoto camera yet. + +Use this value as an initial value for the zoom property if you implement custom zoom. (e.g. reanimated shared value should be initially set to this value) + +**`Example`** + +```ts +const device = ... + +const zoom = useSharedValue(device.neutralZoom) // <-- initial value so it doesn't start at ultra-wide +const cameraProps = useAnimatedProps(() => ({ + zoom: zoom.value +})) +``` + +#### Defined in + +[CameraDevice.ts:197](https://github.com/mrousavy/react-native-vision-camera/blob/c66550ed/package/src/CameraDevice.ts#L197) + +___ + +### position + +• **position**: [`CameraPosition`](../#cameraposition) + +Specifies the physical position of this camera. (back or front) + +#### Defined in + +[CameraDevice.ts:153](https://github.com/mrousavy/react-native-vision-camera/blob/c66550ed/package/src/CameraDevice.ts#L153) + +___ + +### sensorOrientation + +• **sensorOrientation**: `Orientation` + +Represents the sensor's orientation relative to the phone. +For most phones this will be landscape, as Camera sensors are usually always rotated by 90 degrees (i.e. width and height are flipped). + +#### Defined in + +[CameraDevice.ts:234](https://github.com/mrousavy/react-native-vision-camera/blob/c66550ed/package/src/CameraDevice.ts#L234) + +___ + +### supportsDepthCapture + +• **supportsDepthCapture**: `boolean` + +Whether this camera supports taking photos with depth data. + +**! Work in Progress !** + +#### Defined in + +[CameraDevice.ts:213](https://github.com/mrousavy/react-native-vision-camera/blob/c66550ed/package/src/CameraDevice.ts#L213) + +___ + +### supportsFocus + +• **supportsFocus**: `boolean` + +Specifies whether this device supports focusing ([`Camera.focus(...)`](../classes/Camera.md#focus)) + +#### Defined in + +[CameraDevice.ts:223](https://github.com/mrousavy/react-native-vision-camera/blob/c66550ed/package/src/CameraDevice.ts#L223) + +___ + +### supportsLowLightBoost + +• **supportsLowLightBoost**: `boolean` + +Whether this camera device supports low light boost. + +#### Defined in + +[CameraDevice.ts:207](https://github.com/mrousavy/react-native-vision-camera/blob/c66550ed/package/src/CameraDevice.ts#L207) + +___ + +### supportsRawCapture + +• **supportsRawCapture**: `boolean` + +Whether this camera supports taking photos in RAW format + +**! Work in Progress !** + +#### Defined in + +[CameraDevice.ts:219](https://github.com/mrousavy/react-native-vision-camera/blob/c66550ed/package/src/CameraDevice.ts#L219) diff --git a/docs/docs/api/interfaces/CameraDeviceFormat.md b/docs/docs/api/interfaces/CameraDeviceFormat.md new file mode 100644 index 0000000..41b1f4d --- /dev/null +++ b/docs/docs/api/interfaces/CameraDeviceFormat.md @@ -0,0 +1,189 @@ +--- +id: "CameraDeviceFormat" +title: "CameraDeviceFormat" +sidebar_position: 0 +custom_edit_url: null +--- + +A Camera Device's video format. Do not create instances of this type yourself, only use [`Camera.getAvailableCameraDevices()`](../classes/Camera.md#getavailablecameradevices). + +## Properties + +### autoFocusSystem + +• **autoFocusSystem**: [`AutoFocusSystem`](../#autofocussystem) + +Specifies this format's auto focus system. + +#### Defined in + +[CameraDevice.ts:121](https://github.com/mrousavy/react-native-vision-camera/blob/c66550ed/package/src/CameraDevice.ts#L121) + +___ + +### fieldOfView + +• **fieldOfView**: `number` + +The video field of view in degrees + +#### Defined in + +[CameraDevice.ts:97](https://github.com/mrousavy/react-native-vision-camera/blob/c66550ed/package/src/CameraDevice.ts#L97) + +___ + +### maxFps + +• **maxFps**: `number` + +The maximum frame rate this Format is able to run at. High resolution formats often run at lower frame rates. + +#### Defined in + +[CameraDevice.ts:117](https://github.com/mrousavy/react-native-vision-camera/blob/c66550ed/package/src/CameraDevice.ts#L117) + +___ + +### maxISO + +• **maxISO**: `number` + +Maximum supported ISO value + +#### Defined in + +[CameraDevice.ts:89](https://github.com/mrousavy/react-native-vision-camera/blob/c66550ed/package/src/CameraDevice.ts#L89) + +___ + +### maxZoom + +• **maxZoom**: `number` + +The maximum zoom factor (e.g. `128`) + +#### Defined in + +[CameraDevice.ts:101](https://github.com/mrousavy/react-native-vision-camera/blob/c66550ed/package/src/CameraDevice.ts#L101) + +___ + +### minFps + +• **minFps**: `number` + +The minum frame rate this Format needs to run at. High resolution formats often run at lower frame rates. + +#### Defined in + +[CameraDevice.ts:113](https://github.com/mrousavy/react-native-vision-camera/blob/c66550ed/package/src/CameraDevice.ts#L113) + +___ + +### minISO + +• **minISO**: `number` + +Minimum supported ISO value + +#### Defined in + +[CameraDevice.ts:93](https://github.com/mrousavy/react-native-vision-camera/blob/c66550ed/package/src/CameraDevice.ts#L93) + +___ + +### photoHeight + +• **photoHeight**: `number` + +The height of the highest resolution a still image (photo) can be produced in + +#### Defined in + +[CameraDevice.ts:73](https://github.com/mrousavy/react-native-vision-camera/blob/c66550ed/package/src/CameraDevice.ts#L73) + +___ + +### photoWidth + +• **photoWidth**: `number` + +The width of the highest resolution a still image (photo) can be produced in + +#### Defined in + +[CameraDevice.ts:77](https://github.com/mrousavy/react-native-vision-camera/blob/c66550ed/package/src/CameraDevice.ts#L77) + +___ + +### pixelFormats + +• **pixelFormats**: `PixelFormat`[] + +Specifies this format's supported pixel-formats. +In most cases, this is `['native', 'yuv']`. + +#### Defined in + +[CameraDevice.ts:130](https://github.com/mrousavy/react-native-vision-camera/blob/c66550ed/package/src/CameraDevice.ts#L130) + +___ + +### supportsPhotoHDR + +• **supportsPhotoHDR**: `boolean` + +Specifies whether this format supports HDR mode for photo capture + +#### Defined in + +[CameraDevice.ts:109](https://github.com/mrousavy/react-native-vision-camera/blob/c66550ed/package/src/CameraDevice.ts#L109) + +___ + +### supportsVideoHDR + +• **supportsVideoHDR**: `boolean` + +Specifies whether this format supports HDR mode for video capture + +#### Defined in + +[CameraDevice.ts:105](https://github.com/mrousavy/react-native-vision-camera/blob/c66550ed/package/src/CameraDevice.ts#L105) + +___ + +### videoHeight + +• **videoHeight**: `number` + +The video resolutions's height + +#### Defined in + +[CameraDevice.ts:81](https://github.com/mrousavy/react-native-vision-camera/blob/c66550ed/package/src/CameraDevice.ts#L81) + +___ + +### videoStabilizationModes + +• **videoStabilizationModes**: [`VideoStabilizationMode`](../#videostabilizationmode)[] + +All supported video stabilization modes + +#### Defined in + +[CameraDevice.ts:125](https://github.com/mrousavy/react-native-vision-camera/blob/c66550ed/package/src/CameraDevice.ts#L125) + +___ + +### videoWidth + +• **videoWidth**: `number` + +The video resolution's width + +#### Defined in + +[CameraDevice.ts:85](https://github.com/mrousavy/react-native-vision-camera/blob/c66550ed/package/src/CameraDevice.ts#L85) diff --git a/docs/docs/api/interfaces/CameraProps.md b/docs/docs/api/interfaces/CameraProps.md new file mode 100644 index 0000000..464e75d --- /dev/null +++ b/docs/docs/api/interfaces/CameraProps.md @@ -0,0 +1,406 @@ +--- +id: "CameraProps" +title: "CameraProps" +sidebar_position: 0 +custom_edit_url: null +--- + +## Hierarchy + +- `ViewProps` + + ↳ **`CameraProps`** + +## Properties + +### audio + +• `Optional` **audio**: `boolean` + +Enables **audio capture** for video recordings (see ["Recording Videos"](https://react-native-vision-camera.com/docs/guides/capturing/#recording-videos)) + +#### Defined in + +[CameraProps.ts:61](https://github.com/mrousavy/react-native-vision-camera/blob/c66550ed/package/src/CameraProps.ts#L61) + +___ + +### device + +• **device**: [`CameraDevice`](CameraDevice.md) + +The Camera Device to use. + +See the [Camera Devices](https://react-native-vision-camera.com/docs/guides/devices) section in the documentation for more information about Camera Devices. + +**`Example`** + +```tsx +const devices = useCameraDevices('wide-angle-camera') +const device = devices.back + +return ( + +) +``` + +#### Defined in + +[CameraProps.ts:37](https://github.com/mrousavy/react-native-vision-camera/blob/c66550ed/package/src/CameraProps.ts#L37) + +___ + +### enableDepthData + +• `Optional` **enableDepthData**: `boolean` + +Also captures data from depth-perception sensors. (e.g. disparity maps) + +**`Default`** + +false + +#### Defined in + +[CameraProps.ts:145](https://github.com/mrousavy/react-native-vision-camera/blob/c66550ed/package/src/CameraProps.ts#L145) + +___ + +### enableFpsGraph + +• `Optional` **enableFpsGraph**: `boolean` + +If `true`, show a debug view to display the FPS of the Camera session. +This is useful for debugging your Frame Processor's speed. + +**`Default`** + +false + +#### Defined in + +[CameraProps.ts:173](https://github.com/mrousavy/react-native-vision-camera/blob/c66550ed/package/src/CameraProps.ts#L173) + +___ + +### enableHighQualityPhotos + +• `Optional` **enableHighQualityPhotos**: `boolean` + +Indicates whether the Camera should prepare the photo pipeline to provide maximum quality photos. + +This enables: +* High Resolution Capture ([`isHighResolutionCaptureEnabled`](https://developer.apple.com/documentation/avfoundation/avcapturephotooutput/1648721-ishighresolutioncaptureenabled)) +* Virtual Device fusion for greater detail ([`isVirtualDeviceConstituentPhotoDeliveryEnabled`](https://developer.apple.com/documentation/avfoundation/avcapturephotooutput/3192189-isvirtualdeviceconstituentphotod)) +* Dual Device fusion for greater detail ([`isDualCameraDualPhotoDeliveryEnabled`](https://developer.apple.com/documentation/avfoundation/avcapturephotosettings/2873917-isdualcameradualphotodeliveryena)) +* Sets the maximum quality prioritization to `.quality` ([`maxPhotoQualityPrioritization`](https://developer.apple.com/documentation/avfoundation/avcapturephotooutput/3182995-maxphotoqualityprioritization)) + +**`Default`** + +false + +#### Defined in + +[CameraProps.ts:166](https://github.com/mrousavy/react-native-vision-camera/blob/c66550ed/package/src/CameraProps.ts#L166) + +___ + +### enablePortraitEffectsMatteDelivery + +• `Optional` **enablePortraitEffectsMatteDelivery**: `boolean` + +A boolean specifying whether the photo render pipeline is prepared for portrait effects matte delivery. + +When enabling this, you must also set `enableDepthData` to `true`. + +**`Platform`** + +iOS 12.0+ + +**`Default`** + +false + +#### Defined in + +[CameraProps.ts:154](https://github.com/mrousavy/react-native-vision-camera/blob/c66550ed/package/src/CameraProps.ts#L154) + +___ + +### enableZoomGesture + +• `Optional` **enableZoomGesture**: `boolean` + +Enables or disables the native pinch to zoom gesture. + +If you want to implement a custom zoom gesture, see [the Zooming with Reanimated documentation](https://react-native-vision-camera.com/docs/guides/animated). + +**`Default`** + +false + +#### Defined in + +[CameraProps.ts:106](https://github.com/mrousavy/react-native-vision-camera/blob/c66550ed/package/src/CameraProps.ts#L106) + +___ + +### format + +• `Optional` **format**: [`CameraDeviceFormat`](CameraDeviceFormat.md) + +Selects a given format. By default, the best matching format is chosen. + +#### Defined in + +[CameraProps.ts:113](https://github.com/mrousavy/react-native-vision-camera/blob/c66550ed/package/src/CameraProps.ts#L113) + +___ + +### fps + +• `Optional` **fps**: `number` + +Specify the frames per second this camera should use. Make sure the given `format` includes a frame rate range with the given `fps`. + +Requires `format` to be set. + +#### Defined in + +[CameraProps.ts:119](https://github.com/mrousavy/react-native-vision-camera/blob/c66550ed/package/src/CameraProps.ts#L119) + +___ + +### frameProcessor + +• `Optional` **frameProcessor**: [`FrameProcessor`](../#frameprocessor) + +A worklet which will be called for every frame the Camera "sees". + +> See [the Frame Processors documentation](https://mrousavy.github.io/react-native-vision-camera/docs/guides/frame-processors) for more information + +**`Example`** + +```tsx +const frameProcessor = useFrameProcessor((frame) => { + 'worklet' + const qrCodes = scanQRCodes(frame) + console.log(`Detected QR Codes: ${qrCodes}`) +}, []) + +return +``` + +#### Defined in + +[CameraProps.ts:204](https://github.com/mrousavy/react-native-vision-camera/blob/c66550ed/package/src/CameraProps.ts#L204) + +___ + +### hdr + +• `Optional` **hdr**: `boolean` + +Enables or disables HDR on this camera device. Make sure the given `format` supports HDR mode. + +Requires `format` to be set. + +#### Defined in + +[CameraProps.ts:125](https://github.com/mrousavy/react-native-vision-camera/blob/c66550ed/package/src/CameraProps.ts#L125) + +___ + +### isActive + +• **isActive**: `boolean` + +Whether the Camera should actively stream video frames, or not. See the [documentation about the `isActive` prop](https://react-native-vision-camera.com/docs/guides/lifecycle#the-isactive-prop) for more information. + +This can be compared to a Video component, where `isActive` specifies whether the video is paused or not. + +> Note: If you fully unmount the `` component instead of using `isActive={false}`, the Camera will take a bit longer to start again. In return, it will use less resources since the Camera will be completely destroyed when unmounted. + +#### Defined in + +[CameraProps.ts:45](https://github.com/mrousavy/react-native-vision-camera/blob/c66550ed/package/src/CameraProps.ts#L45) + +___ + +### lowLightBoost + +• `Optional` **lowLightBoost**: `boolean` + +Enables or disables low-light boost on this camera device. Make sure the given `format` supports low-light boost. + +Requires `format` to be set. + +#### Defined in + +[CameraProps.ts:131](https://github.com/mrousavy/react-native-vision-camera/blob/c66550ed/package/src/CameraProps.ts#L131) + +___ + +### onError + +• `Optional` **onError**: (`error`: [`CameraRuntimeError`](../classes/CameraRuntimeError.md)) => `void` + +#### Type declaration + +▸ (`error`): `void` + +Called when any kind of runtime error occured. + +##### Parameters + +| Name | Type | +| :------ | :------ | +| `error` | [`CameraRuntimeError`](../classes/CameraRuntimeError.md) | + +##### Returns + +`void` + +#### Defined in + +[CameraProps.ts:183](https://github.com/mrousavy/react-native-vision-camera/blob/c66550ed/package/src/CameraProps.ts#L183) + +___ + +### onInitialized + +• `Optional` **onInitialized**: () => `void` + +#### Type declaration + +▸ (): `void` + +Called when the camera was successfully initialized. + +##### Returns + +`void` + +#### Defined in + +[CameraProps.ts:187](https://github.com/mrousavy/react-native-vision-camera/blob/c66550ed/package/src/CameraProps.ts#L187) + +___ + +### orientation + +• `Optional` **orientation**: `Orientation` + +Represents the orientation of all Camera Outputs (Photo, Video, and Frame Processor). If this value is not set, the device orientation is used. + +#### Defined in + +[CameraProps.ts:177](https://github.com/mrousavy/react-native-vision-camera/blob/c66550ed/package/src/CameraProps.ts#L177) + +___ + +### photo + +• `Optional` **photo**: `boolean` + +Enables **photo capture** with the `takePhoto` function (see ["Taking Photos"](https://react-native-vision-camera.com/docs/guides/capturing#taking-photos)) + +#### Defined in + +[CameraProps.ts:51](https://github.com/mrousavy/react-native-vision-camera/blob/c66550ed/package/src/CameraProps.ts#L51) + +___ + +### pixelFormat + +• `Optional` **pixelFormat**: ``"yuv"`` \| ``"rgb"`` \| ``"native"`` + +Specifies the pixel format for the video pipeline. + +Frames from a [Frame Processor](https://mrousavy.github.io/react-native-vision-camera/docs/guides/frame-processors) will be streamed in the pixel format specified here. + +While `native` and `yuv` are the most efficient formats, some ML models (such as MLKit Barcode detection) require input Frames to be in RGB colorspace, otherwise they just output nonsense. + +- `native`: The hardware native GPU buffer format. This is the most efficient format. (`PRIVATE` on Android, sometimes YUV on iOS) +- `yuv`: The YUV (Y'CbCr 4:2:0 or NV21, 8-bit) format, either video- or full-range, depending on hardware capabilities. This is the second most efficient format. +- `rgb`: The RGB (RGB, RGBA or ABGRA, 8-bit) format. This is least efficient and requires explicit conversion. + +**`Default`** + +`native` + +#### Defined in + +[CameraProps.ts:75](https://github.com/mrousavy/react-native-vision-camera/blob/c66550ed/package/src/CameraProps.ts#L75) + +___ + +### torch + +• `Optional` **torch**: ``"off"`` \| ``"on"`` + +Set the current torch mode. + +Note: The torch is only available on `"back"` cameras, and isn't supported by every phone. + +**`Default`** + +"off" + +#### Defined in + +[CameraProps.ts:86](https://github.com/mrousavy/react-native-vision-camera/blob/c66550ed/package/src/CameraProps.ts#L86) + +___ + +### video + +• `Optional` **video**: `boolean` + +Enables **video capture** with the `startRecording` function (see ["Recording Videos"](https://react-native-vision-camera.com/docs/guides/capturing/#recording-videos)) + +Note: If both the `photo` and `video` properties are enabled at the same time and the device is running at a `hardwareLevel` of `'legacy'` or `'limited'`, VisionCamera _might_ use a lower resolution for video capture due to hardware constraints. + +#### Defined in + +[CameraProps.ts:57](https://github.com/mrousavy/react-native-vision-camera/blob/c66550ed/package/src/CameraProps.ts#L57) + +___ + +### videoStabilizationMode + +• `Optional` **videoStabilizationMode**: [`VideoStabilizationMode`](../#videostabilizationmode) + +Specifies the video stabilization mode to use. + +Requires a `format` to be set that contains the given `videoStabilizationMode`. + +#### Defined in + +[CameraProps.ts:137](https://github.com/mrousavy/react-native-vision-camera/blob/c66550ed/package/src/CameraProps.ts#L137) + +___ + +### zoom + +• `Optional` **zoom**: `number` + +Specifies the zoom factor of the current camera, in "factor"/scale. + +This value ranges from `minZoom` (e.g. `1`) to `maxZoom` (e.g. `128`). It is recommended to set this value +to the CameraDevice's `neutralZoom` per default and let the user zoom out to the fish-eye (ultra-wide) camera +on demand (if available) + +**Note:** Linearly increasing this value always appears logarithmic to the user. + +**`Default`** + +1.0 + +#### Defined in + +[CameraProps.ts:98](https://github.com/mrousavy/react-native-vision-camera/blob/c66550ed/package/src/CameraProps.ts#L98) diff --git a/docs/docs/api/interfaces/ErrorWithCause.md b/docs/docs/api/interfaces/ErrorWithCause.md new file mode 100644 index 0000000..1078d02 --- /dev/null +++ b/docs/docs/api/interfaces/ErrorWithCause.md @@ -0,0 +1,98 @@ +--- +id: "ErrorWithCause" +title: "ErrorWithCause" +sidebar_position: 0 +custom_edit_url: null +--- + +Represents a JSON-style error cause. This contains native `NSError`/`Throwable` information, and can have recursive [`.cause`](ErrorWithCause.md#cause) properties until the ultimate cause has been found. + +## Properties + +### cause + +• `Optional` **cause**: [`ErrorWithCause`](ErrorWithCause.md) + +Optional additional cause for nested errors + +* iOS: N/A +* Android: `Throwable.cause` + +#### Defined in + +[CameraError.ts:105](https://github.com/mrousavy/react-native-vision-camera/blob/c66550ed/package/src/CameraError.ts#L105) + +___ + +### code + +• `Optional` **code**: `number` + +The native error's code. + +* iOS: `NSError.code` +* Android: N/A + +#### Defined in + +[CameraError.ts:70](https://github.com/mrousavy/react-native-vision-camera/blob/c66550ed/package/src/CameraError.ts#L70) + +___ + +### details + +• `Optional` **details**: `Record`<`string`, `unknown`\> + +Optional additional details + +* iOS: `NSError.userInfo` +* Android: N/A + +#### Defined in + +[CameraError.ts:91](https://github.com/mrousavy/react-native-vision-camera/blob/c66550ed/package/src/CameraError.ts#L91) + +___ + +### domain + +• `Optional` **domain**: `string` + +The native error's domain. + +* iOS: `NSError.domain` +* Android: N/A + +#### Defined in + +[CameraError.ts:77](https://github.com/mrousavy/react-native-vision-camera/blob/c66550ed/package/src/CameraError.ts#L77) + +___ + +### message + +• **message**: `string` + +The native error description + +* iOS: `NSError.message` +* Android: `Throwable.message` + +#### Defined in + +[CameraError.ts:84](https://github.com/mrousavy/react-native-vision-camera/blob/c66550ed/package/src/CameraError.ts#L84) + +___ + +### stacktrace + +• `Optional` **stacktrace**: `string` + +Optional Java stacktrace + +* iOS: N/A +* Android: `Throwable.stacktrace.toString()` + +#### Defined in + +[CameraError.ts:98](https://github.com/mrousavy/react-native-vision-camera/blob/c66550ed/package/src/CameraError.ts#L98) diff --git a/docs/docs/api/interfaces/Frame.md b/docs/docs/api/interfaces/Frame.md new file mode 100644 index 0000000..eb1f354 --- /dev/null +++ b/docs/docs/api/interfaces/Frame.md @@ -0,0 +1,118 @@ +--- +id: "Frame" +title: "Frame" +sidebar_position: 0 +custom_edit_url: null +--- + +A single frame, as seen by the camera. + +## Properties + +### bytesPerRow + +• **bytesPerRow**: `number` + +Returns the amount of bytes per row. + +#### Defined in + +[Frame.ts:20](https://github.com/mrousavy/react-native-vision-camera/blob/c2fb5bf1/src/Frame.ts#L20) + +___ + +### height + +• **height**: `number` + +Returns the height of the frame, in pixels. + +#### Defined in + +[Frame.ts:16](https://github.com/mrousavy/react-native-vision-camera/blob/c2fb5bf1/src/Frame.ts#L16) + +___ + +### isValid + +• **isValid**: `boolean` + +Whether the underlying buffer is still valid or not. The buffer will be released after the frame processor returns, or `close()` is called. + +#### Defined in + +[Frame.ts:8](https://github.com/mrousavy/react-native-vision-camera/blob/c2fb5bf1/src/Frame.ts#L8) + +___ + +### planesCount + +• **planesCount**: `number` + +Returns the number of planes this frame contains. + +#### Defined in + +[Frame.ts:24](https://github.com/mrousavy/react-native-vision-camera/blob/c2fb5bf1/src/Frame.ts#L24) + +___ + +### width + +• **width**: `number` + +Returns the width of the frame, in pixels. + +#### Defined in + +[Frame.ts:12](https://github.com/mrousavy/react-native-vision-camera/blob/c2fb5bf1/src/Frame.ts#L12) + +## Methods + +### close + +▸ **close**(): `void` + +Closes and disposes the Frame. +Only close frames that you have created yourself, e.g. by copying the frame you receive in a frame processor. + +**`Example`** + +```ts +const frameProcessor = useFrameProcessor((frame) => { + const smallerCopy = resize(frame, 480, 270) + // run AI ... + smallerCopy.close() + // don't close `frame`! +}) +``` + +#### Returns + +`void` + +#### Defined in + +[Frame.ts:48](https://github.com/mrousavy/react-native-vision-camera/blob/c2fb5bf1/src/Frame.ts#L48) + +___ + +### toString + +▸ **toString**(): `string` + +Returns a string representation of the frame. + +**`Example`** + +```ts +console.log(frame.toString()) // -> "3840 x 2160 Frame" +``` + +#### Returns + +`string` + +#### Defined in + +[Frame.ts:33](https://github.com/mrousavy/react-native-vision-camera/blob/c2fb5bf1/src/Frame.ts#L33) diff --git a/docs/docs/api/interfaces/FrameProcessorPerformanceSuggestion.md b/docs/docs/api/interfaces/FrameProcessorPerformanceSuggestion.md new file mode 100644 index 0000000..33464ed --- /dev/null +++ b/docs/docs/api/interfaces/FrameProcessorPerformanceSuggestion.md @@ -0,0 +1,26 @@ +--- +id: "FrameProcessorPerformanceSuggestion" +title: "FrameProcessorPerformanceSuggestion" +sidebar_position: 0 +custom_edit_url: null +--- + +## Properties + +### suggestedFrameProcessorFps + +• **suggestedFrameProcessorFps**: `number` + +#### Defined in + +[CameraProps.ts:9](https://github.com/mrousavy/react-native-vision-camera/blob/c2fb5bf1/src/CameraProps.ts#L9) + +___ + +### type + +• **type**: ``"can-use-higher-fps"`` \| ``"should-use-lower-fps"`` + +#### Defined in + +[CameraProps.ts:8](https://github.com/mrousavy/react-native-vision-camera/blob/c2fb5bf1/src/CameraProps.ts#L8) diff --git a/docs/docs/api/interfaces/FrameRateRange.md b/docs/docs/api/interfaces/FrameRateRange.md new file mode 100644 index 0000000..89ee22e --- /dev/null +++ b/docs/docs/api/interfaces/FrameRateRange.md @@ -0,0 +1,26 @@ +--- +id: "FrameRateRange" +title: "FrameRateRange" +sidebar_position: 0 +custom_edit_url: null +--- + +## Properties + +### maxFrameRate + +• **maxFrameRate**: `number` + +#### Defined in + +[CameraDevice.ts:104](https://github.com/mrousavy/react-native-vision-camera/blob/c2fb5bf1/src/CameraDevice.ts#L104) + +___ + +### minFrameRate + +• **minFrameRate**: `number` + +#### Defined in + +[CameraDevice.ts:103](https://github.com/mrousavy/react-native-vision-camera/blob/c2fb5bf1/src/CameraDevice.ts#L103) diff --git a/docs/docs/api/interfaces/PhotoFile.md b/docs/docs/api/interfaces/PhotoFile.md new file mode 100644 index 0000000..e88bf54 --- /dev/null +++ b/docs/docs/api/interfaces/PhotoFile.md @@ -0,0 +1,178 @@ +--- +id: "PhotoFile" +title: "PhotoFile" +sidebar_position: 0 +custom_edit_url: null +--- + +Represents a Photo taken by the Camera written to the local filesystem. + +See [`Camera.takePhoto()`](../classes/Camera.md#takephoto) + +## Hierarchy + +- [`TemporaryFile`](TemporaryFile.md) + + ↳ **`PhotoFile`** + +## Properties + +### height + +• **height**: `number` + +The height of the photo, in pixels. + +#### Defined in + +[PhotoFile.ts:62](https://github.com/mrousavy/react-native-vision-camera/blob/c66550ed/package/src/PhotoFile.ts#L62) + +___ + +### isMirrored + +• **isMirrored**: `boolean` + +Whether this photo is mirrored (selfies) or not. + +#### Defined in + +[PhotoFile.ts:76](https://github.com/mrousavy/react-native-vision-camera/blob/c66550ed/package/src/PhotoFile.ts#L76) + +___ + +### isRawPhoto + +• **isRawPhoto**: `boolean` + +Whether this photo is in RAW format or not. + +#### Defined in + +[PhotoFile.ts:66](https://github.com/mrousavy/react-native-vision-camera/blob/c66550ed/package/src/PhotoFile.ts#L66) + +___ + +### metadata + +• `Optional` **metadata**: `Object` + +Metadata information describing the captured image. (iOS only) + +**`See`** + +[AVCapturePhoto.metadata](https://developer.apple.com/documentation/avfoundation/avcapturephoto/2873982-metadata) + +**`Platform`** + +iOS + +#### Type declaration + +| Name | Type | Description | +| :------ | :------ | :------ | +| `DPIHeight` | `number` | **`Platform`** iOS | +| `DPIWidth` | `number` | **`Platform`** iOS | +| `Orientation` | `number` | Orientation of the EXIF Image. * 1 = 0 degrees: the correct orientation, no adjustment is required. * 2 = 0 degrees, mirrored: image has been flipped back-to-front. * 3 = 180 degrees: image is upside down. * 4 = 180 degrees, mirrored: image has been flipped back-to-front and is upside down. * 5 = 90 degrees: image has been flipped back-to-front and is on its side. * 6 = 90 degrees, mirrored: image is on its side. * 7 = 270 degrees: image has been flipped back-to-front and is on its far side. * 8 = 270 degrees, mirrored: image is on its far side. | +| `{Exif}` | { `ApertureValue`: `number` ; `BrightnessValue`: `number` ; `ColorSpace`: `number` ; `DateTimeDigitized`: `string` ; `DateTimeOriginal`: `string` ; `ExifVersion`: `string` ; `ExposureBiasValue`: `number` ; `ExposureMode`: `number` ; `ExposureProgram`: `number` ; `ExposureTime`: `number` ; `FNumber`: `number` ; `Flash`: `number` ; `FocalLenIn35mmFilm`: `number` ; `FocalLength`: `number` ; `ISOSpeedRatings`: `number`[] ; `LensMake`: `string` ; `LensModel`: `string` ; `LensSpecification`: `number`[] ; `MeteringMode`: `number` ; `OffsetTime`: `string` ; `OffsetTimeDigitized`: `string` ; `OffsetTimeOriginal`: `string` ; `PixelXDimension`: `number` ; `PixelYDimension`: `number` ; `SceneType`: `number` ; `SensingMethod`: `number` ; `ShutterSpeedValue`: `number` ; `SubjectArea`: `number`[] ; `SubsecTimeDigitized`: `string` ; `SubsecTimeOriginal`: `string` ; `WhiteBalance`: `number` } | - | +| `{Exif}.ApertureValue` | `number` | - | +| `{Exif}.BrightnessValue` | `number` | - | +| `{Exif}.ColorSpace` | `number` | - | +| `{Exif}.DateTimeDigitized` | `string` | - | +| `{Exif}.DateTimeOriginal` | `string` | - | +| `{Exif}.ExifVersion` | `string` | - | +| `{Exif}.ExposureBiasValue` | `number` | - | +| `{Exif}.ExposureMode` | `number` | - | +| `{Exif}.ExposureProgram` | `number` | - | +| `{Exif}.ExposureTime` | `number` | - | +| `{Exif}.FNumber` | `number` | - | +| `{Exif}.Flash` | `number` | - | +| `{Exif}.FocalLenIn35mmFilm` | `number` | - | +| `{Exif}.FocalLength` | `number` | - | +| `{Exif}.ISOSpeedRatings` | `number`[] | - | +| `{Exif}.LensMake` | `string` | - | +| `{Exif}.LensModel` | `string` | - | +| `{Exif}.LensSpecification` | `number`[] | - | +| `{Exif}.MeteringMode` | `number` | - | +| `{Exif}.OffsetTime` | `string` | - | +| `{Exif}.OffsetTimeDigitized` | `string` | - | +| `{Exif}.OffsetTimeOriginal` | `string` | - | +| `{Exif}.PixelXDimension` | `number` | - | +| `{Exif}.PixelYDimension` | `number` | - | +| `{Exif}.SceneType` | `number` | - | +| `{Exif}.SensingMethod` | `number` | - | +| `{Exif}.ShutterSpeedValue` | `number` | - | +| `{Exif}.SubjectArea` | `number`[] | - | +| `{Exif}.SubsecTimeDigitized` | `string` | - | +| `{Exif}.SubsecTimeOriginal` | `string` | - | +| `{Exif}.WhiteBalance` | `number` | - | +| `{MakerApple}?` | `Record`<`string`, `unknown`\> | Represents any data Apple cameras write to the metadata **`Platform`** iOS | +| `{TIFF}` | { `DateTime`: `string` ; `HostComputer?`: `string` ; `Make`: `string` ; `Model`: `string` ; `ResolutionUnit`: `number` ; `Software`: `string` ; `XResolution`: `number` ; `YResolution`: `number` } | - | +| `{TIFF}.DateTime` | `string` | - | +| `{TIFF}.HostComputer?` | `string` | **`Platform`** iOS | +| `{TIFF}.Make` | `string` | - | +| `{TIFF}.Model` | `string` | - | +| `{TIFF}.ResolutionUnit` | `number` | - | +| `{TIFF}.Software` | `string` | - | +| `{TIFF}.XResolution` | `number` | - | +| `{TIFF}.YResolution` | `number` | - | + +#### Defined in + +[PhotoFile.ts:85](https://github.com/mrousavy/react-native-vision-camera/blob/c66550ed/package/src/PhotoFile.ts#L85) + +___ + +### orientation + +• **orientation**: `Orientation` + +Display orientation of the photo, relative to the Camera's sensor orientation. + +Note that Camera sensors are landscape, so e.g. "portrait" photos will have a value of "landscape-left", etc. + +#### Defined in + +[PhotoFile.ts:72](https://github.com/mrousavy/react-native-vision-camera/blob/c66550ed/package/src/PhotoFile.ts#L72) + +___ + +### path + +• **path**: `string` + +The path of the file. + +* **Note:** If you want to consume this file (e.g. for displaying it in an `` component), you might have to add the `file://` prefix. + +* **Note:** This file might get deleted once the app closes because it lives in the temp directory. + +#### Inherited from + +[TemporaryFile](TemporaryFile.md).[path](TemporaryFile.md#path) + +#### Defined in + +[TemporaryFile.ts:12](https://github.com/mrousavy/react-native-vision-camera/blob/c66550ed/package/src/TemporaryFile.ts#L12) + +___ + +### thumbnail + +• `Optional` **thumbnail**: `Record`<`string`, `unknown`\> + +#### Defined in + +[PhotoFile.ts:77](https://github.com/mrousavy/react-native-vision-camera/blob/c66550ed/package/src/PhotoFile.ts#L77) + +___ + +### width + +• **width**: `number` + +The width of the photo, in pixels. + +#### Defined in + +[PhotoFile.ts:58](https://github.com/mrousavy/react-native-vision-camera/blob/c66550ed/package/src/PhotoFile.ts#L58) diff --git a/docs/docs/api/interfaces/Point.md b/docs/docs/api/interfaces/Point.md new file mode 100644 index 0000000..f2ed6d4 --- /dev/null +++ b/docs/docs/api/interfaces/Point.md @@ -0,0 +1,32 @@ +--- +id: "Point" +title: "Point" +sidebar_position: 0 +custom_edit_url: null +--- + +Represents a Point in a 2 dimensional coordinate system. + +## Properties + +### x + +• **x**: `number` + +The X coordinate of this Point. (double) + +#### Defined in + +[Point.ts:8](https://github.com/mrousavy/react-native-vision-camera/blob/c66550ed/package/src/Point.ts#L8) + +___ + +### y + +• **y**: `number` + +The Y coordinate of this Point. (double) + +#### Defined in + +[Point.ts:12](https://github.com/mrousavy/react-native-vision-camera/blob/c66550ed/package/src/Point.ts#L12) diff --git a/docs/docs/api/interfaces/RecordVideoOptions.md b/docs/docs/api/interfaces/RecordVideoOptions.md new file mode 100644 index 0000000..2747dae --- /dev/null +++ b/docs/docs/api/interfaces/RecordVideoOptions.md @@ -0,0 +1,96 @@ +--- +id: "RecordVideoOptions" +title: "RecordVideoOptions" +sidebar_position: 0 +custom_edit_url: null +--- + +## Properties + +### fileType + +• `Optional` **fileType**: ``"mov"`` \| ``"mp4"`` + +Specifies the output file type to record videos into. + +#### Defined in + +[VideoFile.ts:12](https://github.com/mrousavy/react-native-vision-camera/blob/c66550ed/package/src/VideoFile.ts#L12) + +___ + +### flash + +• `Optional` **flash**: ``"off"`` \| ``"auto"`` \| ``"on"`` + +Set the video flash mode. Natively, this just enables the torch while recording. + +#### Defined in + +[VideoFile.ts:8](https://github.com/mrousavy/react-native-vision-camera/blob/c66550ed/package/src/VideoFile.ts#L8) + +___ + +### onRecordingError + +• **onRecordingError**: (`error`: [`CameraCaptureError`](../classes/CameraCaptureError.md)) => `void` + +#### Type declaration + +▸ (`error`): `void` + +Called when there was an unexpected runtime error while recording the video. + +##### Parameters + +| Name | Type | +| :------ | :------ | +| `error` | [`CameraCaptureError`](../classes/CameraCaptureError.md) | + +##### Returns + +`void` + +#### Defined in + +[VideoFile.ts:16](https://github.com/mrousavy/react-native-vision-camera/blob/c66550ed/package/src/VideoFile.ts#L16) + +___ + +### onRecordingFinished + +• **onRecordingFinished**: (`video`: [`VideoFile`](VideoFile.md)) => `void` + +#### Type declaration + +▸ (`video`): `void` + +Called when the recording has been successfully saved to file. + +##### Parameters + +| Name | Type | +| :------ | :------ | +| `video` | [`VideoFile`](VideoFile.md) | + +##### Returns + +`void` + +#### Defined in + +[VideoFile.ts:20](https://github.com/mrousavy/react-native-vision-camera/blob/c66550ed/package/src/VideoFile.ts#L20) + +___ + +### videoCodec + +• `Optional` **videoCodec**: ``"h265"`` + +The Video Codec to record in. +- `h264`: Widely supported, but might be less efficient, especially with larger sizes or framerates. +- `h265`: The HEVC (High-Efficient-Video-Codec) for higher efficient video recordings. + +#### Defined in + +[VideoFile.ts:26](https://github.com/mrousavy/react-native-vision-camera/blob/c66550ed/package/src/VideoFile.ts#L26) diff --git a/docs/docs/api/interfaces/TakePhotoOptions.md b/docs/docs/api/interfaces/TakePhotoOptions.md new file mode 100644 index 0000000..2eca26a --- /dev/null +++ b/docs/docs/api/interfaces/TakePhotoOptions.md @@ -0,0 +1,111 @@ +--- +id: "TakePhotoOptions" +title: "TakePhotoOptions" +sidebar_position: 0 +custom_edit_url: null +--- + +## Properties + +### enableAutoDistortionCorrection + +• `Optional` **enableAutoDistortionCorrection**: `boolean` + +Specifies whether the photo output should use content aware distortion correction on this photo request. +For example, the algorithm may not apply correction to faces in the center of a photo, but may apply it to faces near the photo’s edges. + +**`Platform`** + +iOS + +**`Default`** + +false + +#### Defined in + +[PhotoFile.ts:40](https://github.com/mrousavy/react-native-vision-camera/blob/c66550ed/package/src/PhotoFile.ts#L40) + +___ + +### enableAutoRedEyeReduction + +• `Optional` **enableAutoRedEyeReduction**: `boolean` + +Specifies whether red-eye reduction should be applied automatically on flash captures. + +**`Default`** + +false + +#### Defined in + +[PhotoFile.ts:26](https://github.com/mrousavy/react-native-vision-camera/blob/c66550ed/package/src/PhotoFile.ts#L26) + +___ + +### enableAutoStabilization + +• `Optional` **enableAutoStabilization**: `boolean` + +Indicates whether still image stabilization will be employed when capturing the photo + +**`Default`** + +false + +#### Defined in + +[PhotoFile.ts:32](https://github.com/mrousavy/react-native-vision-camera/blob/c66550ed/package/src/PhotoFile.ts#L32) + +___ + +### enableShutterSound + +• `Optional` **enableShutterSound**: `boolean` + +Whether to play the default shutter "click" sound when taking a picture or not. + +**`Default`** + +true + +#### Defined in + +[PhotoFile.ts:46](https://github.com/mrousavy/react-native-vision-camera/blob/c66550ed/package/src/PhotoFile.ts#L46) + +___ + +### flash + +• `Optional` **flash**: ``"off"`` \| ``"auto"`` \| ``"on"`` + +Whether the Flash should be enabled or disabled + +**`Default`** + +"auto" + +#### Defined in + +[PhotoFile.ts:20](https://github.com/mrousavy/react-native-vision-camera/blob/c66550ed/package/src/PhotoFile.ts#L20) + +___ + +### qualityPrioritization + +• `Optional` **qualityPrioritization**: ``"quality"`` \| ``"balanced"`` \| ``"speed"`` + +Indicates how photo quality should be prioritized against speed. + +* `"quality"` Indicates that photo quality is paramount, even at the expense of shot-to-shot time +* `"balanced"` Indicates that photo quality and speed of delivery are balanced in priority +* `"speed"` Indicates that speed of photo delivery is most important, even at the expense of quality + +**`Default`** + +"balanced" + +#### Defined in + +[PhotoFile.ts:14](https://github.com/mrousavy/react-native-vision-camera/blob/c66550ed/package/src/PhotoFile.ts#L14) diff --git a/docs/docs/api/interfaces/TakeSnapshotOptions.md b/docs/docs/api/interfaces/TakeSnapshotOptions.md new file mode 100644 index 0000000..4228950 --- /dev/null +++ b/docs/docs/api/interfaces/TakeSnapshotOptions.md @@ -0,0 +1,62 @@ +--- +id: "TakeSnapshotOptions" +title: "TakeSnapshotOptions" +sidebar_position: 0 +custom_edit_url: null +--- + +## Properties + +### flash + +• `Optional` **flash**: ``"off"`` \| ``"on"`` + +Whether the Flash should be enabled or disabled + +**`Default`** + +"off" + +#### Defined in + +[Snapshot.ts:16](https://github.com/mrousavy/react-native-vision-camera/blob/c2fb5bf1/src/Snapshot.ts#L16) + +___ + +### quality + +• `Optional` **quality**: `number` + +Specifies the quality of the JPEG. (0-100, where 100 means best quality (no compression)) + +It is recommended to set this to `90` or even `80`, since the user probably won't notice a difference between `90`/`80` and `100`. + +**`Default`** + +100 + +#### Defined in + +[Snapshot.ts:9](https://github.com/mrousavy/react-native-vision-camera/blob/c2fb5bf1/src/Snapshot.ts#L9) + +___ + +### skipMetadata + +• `Optional` **skipMetadata**: `boolean` + +When set to `true`, metadata reading and mapping will be skipped. ([`metadata`](PhotoFile.md#metadata) will be `null`) + +This might result in a faster capture, as metadata reading and mapping requires File IO. + +**`Default`** + +false + +**`Platform`** + +Android + +#### Defined in + +[Snapshot.ts:27](https://github.com/mrousavy/react-native-vision-camera/blob/c2fb5bf1/src/Snapshot.ts#L27) diff --git a/docs/docs/api/interfaces/TemporaryFile.md b/docs/docs/api/interfaces/TemporaryFile.md new file mode 100644 index 0000000..40804e8 --- /dev/null +++ b/docs/docs/api/interfaces/TemporaryFile.md @@ -0,0 +1,32 @@ +--- +id: "TemporaryFile" +title: "TemporaryFile" +sidebar_position: 0 +custom_edit_url: null +--- + +Represents a temporary file in the local filesystem. + +## Hierarchy + +- **`TemporaryFile`** + + ↳ [`PhotoFile`](PhotoFile.md) + + ↳ [`VideoFile`](VideoFile.md) + +## Properties + +### path + +• **path**: `string` + +The path of the file. + +* **Note:** If you want to consume this file (e.g. for displaying it in an `` component), you might have to add the `file://` prefix. + +* **Note:** This file might get deleted once the app closes because it lives in the temp directory. + +#### Defined in + +[TemporaryFile.ts:12](https://github.com/mrousavy/react-native-vision-camera/blob/c66550ed/package/src/TemporaryFile.ts#L12) diff --git a/docs/docs/api/interfaces/VideoFile.md b/docs/docs/api/interfaces/VideoFile.md new file mode 100644 index 0000000..06b4dc7 --- /dev/null +++ b/docs/docs/api/interfaces/VideoFile.md @@ -0,0 +1,48 @@ +--- +id: "VideoFile" +title: "VideoFile" +sidebar_position: 0 +custom_edit_url: null +--- + +Represents a Video taken by the Camera written to the local filesystem. + +Related: [`Camera.startRecording()`](../classes/Camera.md#startrecording), [`Camera.stopRecording()`](../classes/Camera.md#stoprecording) + +## Hierarchy + +- [`TemporaryFile`](TemporaryFile.md) + + ↳ **`VideoFile`** + +## Properties + +### duration + +• **duration**: `number` + +Represents the duration of the video, in seconds. + +#### Defined in + +[VideoFile.ts:38](https://github.com/mrousavy/react-native-vision-camera/blob/c66550ed/package/src/VideoFile.ts#L38) + +___ + +### path + +• **path**: `string` + +The path of the file. + +* **Note:** If you want to consume this file (e.g. for displaying it in an `` component), you might have to add the `file://` prefix. + +* **Note:** This file might get deleted once the app closes because it lives in the temp directory. + +#### Inherited from + +[TemporaryFile](TemporaryFile.md).[path](TemporaryFile.md#path) + +#### Defined in + +[TemporaryFile.ts:12](https://github.com/mrousavy/react-native-vision-camera/blob/c66550ed/package/src/TemporaryFile.ts#L12) diff --git a/docs/docs/api/interfaces/_category_.yml b/docs/docs/api/interfaces/_category_.yml new file mode 100644 index 0000000..43bec88 --- /dev/null +++ b/docs/docs/api/interfaces/_category_.yml @@ -0,0 +1,2 @@ +label: "Interfaces" +position: 4 \ No newline at end of file diff --git a/docs/docs/guides/ERRORS.mdx b/docs/docs/guides/ERRORS.mdx index ab63382..c8162dd 100644 --- a/docs/docs/guides/ERRORS.mdx +++ b/docs/docs/guides/ERRORS.mdx @@ -50,7 +50,7 @@ The `CameraError` type is a baseclass type for all other errors and provides the * `cause.cause?`: The cause that caused this cause. (Recursive) (Optional) :::note -See [the `CameraError.ts` file](https://github.com/mrousavy/react-native-vision-camera/blob/main/src/CameraError.ts) for a list of all possible error codes +See [the `CameraError.ts` file](https://github.com/mrousavy/react-native-vision-camera/blob/main/package/src/CameraError.ts) for a list of all possible error codes ::: ### Runtime Errors diff --git a/docs/docs/guides/FRAME_PROCESSORS.mdx b/docs/docs/guides/FRAME_PROCESSORS.mdx index 9361b49..637354c 100644 --- a/docs/docs/guides/FRAME_PROCESSORS.mdx +++ b/docs/docs/guides/FRAME_PROCESSORS.mdx @@ -203,13 +203,11 @@ If you are using the [react-hooks ESLint plugin](https://www.npmjs.com/package/e **Frame Processors** are JS functions that will be **workletized** using [react-native-worklets-core](https://github.com/margelo/react-native-worklets-core). They are created on a **parallel camera thread** using a separate JavaScript Runtime (_"VisionCamera JS-Runtime"_) and are **invoked synchronously** (using JSI) without ever going over the bridge. In a **Frame Processor** you can write normal JS code, call back to the React-JS Thread (e.g. `setState`), use [Shared Values](https://docs.swmansion.com/react-native-reanimated/docs/fundamentals/shared-values/) and call **Frame Processor Plugins**. -> See [**the example Frame Processor**](https://github.com/mrousavy/react-native-vision-camera/blob/cf68a4c6476d085ec48fc424a53a96962e0c33f9/example/src/CameraPage.tsx#L199-L203) - #### Frame Processor Plugins **Frame Processor Plugins** are native functions (written in Objective-C, Swift, C++, Java or Kotlin) that are injected into the VisionCamera JS-Runtime. They can be **synchronously called** from your JS Frame Processors (using JSI) without ever going over the bridge. Because VisionCamera provides an easy-to-use plugin API, you can easily create a **Frame Processor Plugin** yourself. Some examples include [Barcode Scanning](https://developers.google.com/ml-kit/vision/barcode-scanning), [Face Detection](https://developers.google.com/ml-kit/vision/face-detection), [Image Labeling](https://developers.google.com/ml-kit/vision/image-labeling), [Text Recognition](https://developers.google.com/ml-kit/vision/text-recognition) and more. -> Learn how to [**create Frame Processor Plugins**](frame-processors-plugins-overview), or check out the [**example Frame Processor Plugin for iOS**](https://github.com/mrousavy/react-native-vision-camera/blob/main/example/ios/Frame%20Processor%20Plugins/Example%20Plugin%20(Swift)/ExamplePluginSwift.swift) or [**Android**](https://github.com/mrousavy/react-native-vision-camera/blob/main/example/android/app/src/main/java/com/mrousavy/camera/example/ExampleFrameProcessorPlugin.java). +> Learn how to [**create Frame Processor Plugins**](frame-processors-plugins-overview), or check out the [**example Frame Processor Plugin for iOS**](https://github.com/mrousavy/react-native-vision-camera/blob/main/package/example/ios/Frame%20Processor%20Plugins/Example%20Plugin%20(Swift)/ExamplePluginSwift.swift) or [**Android**](https://github.com/mrousavy/react-native-vision-camera/blob/main/package/example/android/app/src/main/java/com/mrousavy/camera/example/ExampleFrameProcessorPlugin.java). #### The `Frame` object diff --git a/docs/docs/guides/FRAME_PROCESSORS_CREATE_OVERVIEW.mdx b/docs/docs/guides/FRAME_PROCESSORS_CREATE_OVERVIEW.mdx index b452c2d..c133fca 100644 --- a/docs/docs/guides/FRAME_PROCESSORS_CREATE_OVERVIEW.mdx +++ b/docs/docs/guides/FRAME_PROCESSORS_CREATE_OVERVIEW.mdx @@ -76,7 +76,7 @@ public Object callback(Frame frame, Object[] params) { } ``` -Which returns a [`Frame`](https://github.com/mrousavy/react-native-vision-camera/blob/main/src/Frame.ts) in JS: +Which returns a [`Frame`](https://github.com/mrousavy/react-native-vision-camera/blob/main/package/src/Frame.ts) in JS: ```js const frameProcessor = useFrameProcessor((frame) => { @@ -192,9 +192,9 @@ Your Frame Processor Plugins have to be fast. Use the FPS Graph (`enableFpsGraph #### 🚀 Create your first Frame Processor Plugin for [iOS](frame-processors-plugins-ios) or [Android](frame-processors-plugins-android)! -[1]: https://github.com/mrousavy/react-native-vision-camera/blob/main/src/Frame.ts -[2]: https://github.com/mrousavy/react-native-vision-camera/blob/main/ios/Frame%20Processor/Frame.h -[3]: https://github.com/mrousavy/react-native-vision-camera/blob/main/android/src/main/java/com/mrousavy/camera/frameprocessor/Frame.java +[1]: https://github.com/mrousavy/react-native-vision-camera/blob/main/package/src/Frame.ts +[2]: https://github.com/mrousavy/react-native-vision-camera/blob/main/package/ios/Frame%20Processor/Frame.h +[3]: https://github.com/mrousavy/react-native-vision-camera/blob/main/package/android/src/main/java/com/mrousavy/camera/frameprocessor/Frame.java [4]: https://github.com/facebook/react-native/blob/9a43eac7a32a6ba3164a048960101022a92fcd5a/React/Base/RCTBridgeModule.h#L20-L24 [5]: https://developer.apple.com/documentation/coremedia/cmsamplebuffer [6]: https://developer.android.com/reference/androidx/camera/core/ImageProxy diff --git a/docs/docs/guides/FRAME_PROCESSOR_CREATE_PLUGIN_ANDROID.mdx b/docs/docs/guides/FRAME_PROCESSOR_CREATE_PLUGIN_ANDROID.mdx index 681b5db..e1dfc9e 100644 --- a/docs/docs/guides/FRAME_PROCESSOR_CREATE_PLUGIN_ANDROID.mdx +++ b/docs/docs/guides/FRAME_PROCESSOR_CREATE_PLUGIN_ANDROID.mdx @@ -72,7 +72,7 @@ public class FaceDetectorFrameProcessorPlugin extends FrameProcessorPlugin { The Frame Processor Plugin will be exposed to JS through the `VisionCameraProxy` object. In this case, it would be `VisionCameraProxy.getFrameProcessorPlugin("detectFaces")`. ::: -4. **Implement your Frame Processing.** See the [Example Plugin (Java)](https://github.com/mrousavy/react-native-vision-camera/blob/main/example/android/app/src/main/java/com/mrousavy/camera/example/ExampleFrameProcessorPlugin.java) for reference. +4. **Implement your Frame Processing.** See the [Example Plugin (Java)](https://github.com/mrousavy/react-native-vision-camera/blob/main/package/example/android/app/src/main/java/com/mrousavy/camera/example/ExampleFrameProcessorPlugin.java) for reference. 5. Create a new Java file which registers the Frame Processor Plugin in a React Package, for the Face Detector plugin this file will be called `FaceDetectorFrameProcessorPluginPackage.java`: ```java {12} @@ -137,7 +137,7 @@ class FaceDetectorFrameProcessorPlugin: FrameProcessorPlugin() { The Frame Processor Plugin will be exposed to JS through the `VisionCameraProxy` object. In this case, it would be `VisionCameraProxy.getFrameProcessorPlugin("detectFaces")`. ::: -4. **Implement your Frame Processing.** See the [Example Plugin (Java)](https://github.com/mrousavy/react-native-vision-camera/blob/main/example/android/app/src/main/java/com/mrousavy/camera/example/ExampleFrameProcessorPlugin.java) for reference. +4. **Implement your Frame Processing.** See the [Example Plugin (Java)](https://github.com/mrousavy/react-native-vision-camera/blob/main/package/example/android/app/src/main/java/com/mrousavy/camera/example/ExampleFrameProcessorPlugin.java) for reference. 5. Create a new Kotlin file which registers the Frame Processor Plugin in a React Package, for the Face Detector plugin this file will be called `FaceDetectorFrameProcessorPluginPackage.kt`: ```kotlin {9} diff --git a/docs/docs/guides/FRAME_PROCESSOR_CREATE_PLUGIN_IOS.mdx b/docs/docs/guides/FRAME_PROCESSOR_CREATE_PLUGIN_IOS.mdx index b36448a..efd32c9 100644 --- a/docs/docs/guides/FRAME_PROCESSOR_CREATE_PLUGIN_IOS.mdx +++ b/docs/docs/guides/FRAME_PROCESSOR_CREATE_PLUGIN_IOS.mdx @@ -77,7 +77,7 @@ For reference see the [CLI's docs](https://github.com/mateusz1913/vision-camera- The Frame Processor Plugin will be exposed to JS through the `VisionCameraProxy` object. In this case, it would be `VisionCameraProxy.getFrameProcessorPlugin("detectFaces")`. ::: -4. **Implement your Frame Processing.** See the [Example Plugin (Objective-C)](https://github.com/mrousavy/react-native-vision-camera/blob/main/example/ios/Frame%20Processor%20Plugins/Example%20Plugin%20%28Objective%2DC%29) for reference. +4. **Implement your Frame Processing.** See the [Example Plugin (Objective-C)](https://github.com/mrousavy/react-native-vision-camera/blob/main/package/example/ios/Frame%20Processor%20Plugins/Example%20Plugin%20%28Objective%2DC%29) for reference. @@ -132,7 +132,7 @@ public class FaceDetectorFrameProcessorPlugin: FrameProcessorPlugin { } ``` -7. **Implement your frame processing.** See [Example Plugin (Swift)](https://github.com/mrousavy/react-native-vision-camera/blob/main/example/ios/Frame%20Processor%20Plugins/Example%20Plugin%20%28Swift%29) for reference. +7. **Implement your frame processing.** See [Example Plugin (Swift)](https://github.com/mrousavy/react-native-vision-camera/blob/main/package/example/ios/Frame%20Processor%20Plugins/Example%20Plugin%20%28Swift%29) for reference. diff --git a/docs/docs/guides/LIFECYCLE.mdx b/docs/docs/guides/LIFECYCLE.mdx index ec7ba49..98187af 100644 --- a/docs/docs/guides/LIFECYCLE.mdx +++ b/docs/docs/guides/LIFECYCLE.mdx @@ -16,7 +16,7 @@ The Camera's `isActive` property can be used to _pause_ the session (`isActive={ For example, you want to **pause the camera** when the user **navigates to another page** or **minimizes the app** since otherwise the camera continues to run in the background without the user seeing it, causing **significant battery drain**. Also, on iOS a green dot indicates the user that the camera is still active, possibly causing the user to raise privacy concerns. (🔗 See ["About the orange and green indicators in your iPhone status bar"](https://support.apple.com/en-us/HT211876)) -This example demonstrates how you could pause the camera stream once the app goes into background using a [custom `useIsAppForeground` hook](https://github.com/mrousavy/react-native-vision-camera/blob/main/example/src/hooks/useIsForeground.ts): +This example demonstrates how you could pause the camera stream once the app goes into background using a [custom `useIsAppForeground` hook](https://github.com/mrousavy/react-native-vision-camera/blob/main/package/example/src/hooks/useIsForeground.ts): ```tsx function App() { diff --git a/docs/docs/guides/MOCKING.mdx b/docs/docs/guides/MOCKING.mdx index 2f4944d..e772aab 100644 --- a/docs/docs/guides/MOCKING.mdx +++ b/docs/docs/guides/MOCKING.mdx @@ -45,7 +45,7 @@ module.exports = { inside `vision-camera.e2e.js` export the mocked modules. In this example, several functions of the modules `Camera` and `sortDevices` are mocked. -Define your mocks following the [original definitions](https://github.com/mrousavy/react-native-vision-camera/tree/main/src). +Define your mocks following the [original definitions](https://github.com/mrousavy/react-native-vision-camera/tree/main/package/src). ```js // vision-camera.js diff --git a/docs/docs/guides/TROUBLESHOOTING.mdx b/docs/docs/guides/TROUBLESHOOTING.mdx index e186384..05339c6 100644 --- a/docs/docs/guides/TROUBLESHOOTING.mdx +++ b/docs/docs/guides/TROUBLESHOOTING.mdx @@ -69,7 +69,7 @@ Before opening an issue, make sure you try the following: yarn # or `npm i` ``` 4. Make sure you have installed the [Android NDK](https://developer.android.com/ndk). -5. Make sure your minimum SDK version is **21 or higher**, and target SDK version is **33 or higher**. See [the example's `build.gradle`](https://github.com/mrousavy/react-native-vision-camera/blob/main/example/android/build.gradle#L5-L10) for reference. +5. Make sure your minimum SDK version is **21 or higher**, and target SDK version is **33 or higher**. See [the example's `build.gradle`](https://github.com/mrousavy/react-native-vision-camera/blob/main/package/example/android/build.gradle#L5-L10) for reference. 1. Open your `build.gradle` 2. Set `buildToolsVersion` to `33.0.0` or higher 3. Set `compileSdkVersion` to `33` or higher @@ -103,4 +103,4 @@ Before opening an issue, make sure you try the following: ## Issues -If nothing has helped so far, try browsing the [GitHub issues](https://github.com/mrousavy/react-native-vision-camera/issues?q=is%3Aissue). If your issue doesn't exist, [create a new one](https://github.com/mrousavy/react-native-vision-camera/issues/new/choose). Make sure to fill out the template and include as many details as possible. Also try to reproduce the issue in the [example app](https://github.com/mrousavy/react-native-vision-camera/blob/main/example). +If nothing has helped so far, try browsing the [GitHub issues](https://github.com/mrousavy/react-native-vision-camera/issues?q=is%3Aissue). If your issue doesn't exist, [create a new one](https://github.com/mrousavy/react-native-vision-camera/issues/new/choose). Make sure to fill out the template and include as many details as possible. Also try to reproduce the issue in the [example app](https://github.com/mrousavy/react-native-vision-camera/blob/main/package/example). diff --git a/docs/docs/guides/ZOOMING.mdx b/docs/docs/guides/ZOOMING.mdx index e5b7305..983df6e 100644 --- a/docs/docs/guides/ZOOMING.mdx +++ b/docs/docs/guides/ZOOMING.mdx @@ -98,7 +98,7 @@ A Camera's `zoom` property is represented in a **logarithmic scale**. That means ### Pinch-to-zoom -The above example only demonstrates how to animate the `zoom` property. To actually implement pinch-to-zoom or pan-to-zoom, take a look at the [VisionCamera example app](https://github.com/mrousavy/react-native-vision-camera/tree/main/example), the pinch-to-zoom gesture can be found [here](https://github.com/mrousavy/react-native-vision-camera/blob/main/example/src/views/CaptureButton.tsx#L189-L208), and the pan-to-zoom gesture can be found [here](https://github.com/mrousavy/react-native-vision-camera/blob/d8551792e97eaa6fa768f54059ffce054bf748d9/example/src/views/CaptureButton.tsx#L185-L205). They implement a real world use-case, where the maximum zoom value is clamped to a realistic value, and the zoom responds very gracefully by using a logarithmic scale. +The above example only demonstrates how to animate the `zoom` property. To actually implement pinch-to-zoom or pan-to-zoom, take a look at the [VisionCamera example app](https://github.com/mrousavy/react-native-vision-camera/tree/main/example), the pinch-to-zoom gesture can be found [here](https://github.com/mrousavy/react-native-vision-camera/blob/main/package/example/src/views/CaptureButton.tsx#L189-L208), and the pan-to-zoom gesture can be found [here](https://github.com/mrousavy/react-native-vision-camera/blob/d8551792e97eaa6fa768f54059ffce054bf748d9/example/src/views/CaptureButton.tsx#L185-L205). They implement a real world use-case, where the maximum zoom value is clamped to a realistic value, and the zoom responds very gracefully by using a logarithmic scale.
diff --git a/docs/docusaurus.config.js b/docs/docusaurus.config.js index 6de9bb3..b987ab6 100644 --- a/docs/docusaurus.config.js +++ b/docs/docusaurus.config.js @@ -35,7 +35,7 @@ module.exports = { position: 'left' }, { - href: 'https://github.com/mrousavy/react-native-vision-camera/tree/main/example', + href: 'https://github.com/mrousavy/react-native-vision-camera/tree/main/package/example', label: 'Example App', position: 'left' }, @@ -62,7 +62,7 @@ module.exports = { }, { label: 'Example App', - href: 'https://github.com/mrousavy/react-native-vision-camera/tree/main/example', + href: 'https://github.com/mrousavy/react-native-vision-camera/tree/main/package/example', }, ], }, @@ -156,9 +156,9 @@ module.exports = { 'docusaurus-plugin-typedoc', { name: 'VisionCamera', - entryPoints: ['../src'], - exclude: "../src/index.ts", - tsconfig: '../tsconfig.json', + entryPoints: ['../package/src'], + exclude: "../package/src/index.ts", + tsconfig: '../package/tsconfig.json', watch: process.env.TYPEDOC_WATCH, excludePrivate: true, excludeProtected: true, diff --git a/docs/package.json b/docs/package.json index 7f71234..5dcfd45 100644 --- a/docs/package.json +++ b/docs/package.json @@ -3,7 +3,6 @@ "version": "0.0.0", "private": true, "scripts": { - "postinstall": "yarn install --cwd ..", "docusaurus": "docusaurus", "start": "TYPEDOC_WATCH=true docusaurus start", "build": "docusaurus build", diff --git a/docs/yarn.lock b/docs/yarn.lock index c663fb9..44d4599 100644 --- a/docs/yarn.lock +++ b/docs/yarn.lock @@ -3155,15 +3155,10 @@ caniuse-api@^3.0.0: lodash.memoize "^4.1.2" lodash.uniq "^4.5.0" -caniuse-lite@^1.0.0, caniuse-lite@^1.0.30001286: - version "1.0.30001295" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001295.tgz#68a60f8f0664f342b2835c5d8898b4faea7b3d51" - integrity sha512-lSP16vcyC0FEy0R4ECc9duSPoKoZy+YkpGkue9G4D81OfPnliopaZrU10+qtPdT8PbGXad/PNx43TIQrOmJZSQ== - -caniuse-lite@^1.0.30001426, caniuse-lite@^1.0.30001449: - version "1.0.30001460" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001460.tgz#31d2e26f0a2309860ed3eff154e03890d9d851a7" - integrity sha512-Bud7abqjvEjipUkpLs4D7gR0l8hBYBHoa+tGtKJHvT2AYzLp1z7EmVkUT4ERpVUfca8S2HGIVs883D8pUH1ZzQ== +caniuse-lite@^1.0.0, caniuse-lite@^1.0.30001286, caniuse-lite@^1.0.30001426, caniuse-lite@^1.0.30001449: + version "1.0.30001525" + resolved "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001525.tgz" + integrity sha512-/3z+wB4icFt3r0USMwxujAqRvaD/B7rvGTsKhbhSQErVrJvkZCLhgNLJxU8MevahQVH6hCU9FsHdNUFbiwmE7Q== ccount@^1.0.0: version "1.1.0" diff --git a/.eslintrc.js b/package/.eslintrc.js similarity index 100% rename from .eslintrc.js rename to package/.eslintrc.js diff --git a/package/.gitignore b/package/.gitignore new file mode 100644 index 0000000..86e5443 --- /dev/null +++ b/package/.gitignore @@ -0,0 +1,70 @@ +# OSX +# +.DS_Store + +# XDE +.expo/ + +# VSCode +jsconfig.json + +# Xcode +# +build/ +*.pbxuser +!default.pbxuser +*.mode1v3 +!default.mode1v3 +*.mode2v3 +!default.mode2v3 +*.perspectivev3 +!default.perspectivev3 +xcuserdata +*.xccheckout +*.moved-aside +DerivedData +*.hmap +*.ipa +*.xcuserstate +project.xcworkspace + +# Android/IJ +# +.idea +.gradle +local.properties +android.iml +*.hprof + +# Cocoapods +# +example/ios/Pods + +# node.js +# +node_modules/ +npm-debug.log +yarn-debug.log +yarn-error.log + +# BUCK +buck-out/ +\.buckd/ +android/app/libs +android/keystores/debug.keystore + +# Expo +.expo/* + +# generated by bob +lib/ + +# we only use yarn +package-lock.json + +# TypeDoc/Docusaurus stuff +docs/docs/api + +# External native build folder generated in Android Studio 2.2 and later +.externalNativeBuild +.cxx/ diff --git a/VisionCamera.podspec b/package/VisionCamera.podspec similarity index 100% rename from VisionCamera.podspec rename to package/VisionCamera.podspec diff --git a/android/.editorconfig b/package/android/.editorconfig similarity index 100% rename from android/.editorconfig rename to package/android/.editorconfig diff --git a/android/.project b/package/android/.project similarity index 100% rename from android/.project rename to package/android/.project diff --git a/android/.settings/org.eclipse.buildship.core.prefs b/package/android/.settings/org.eclipse.buildship.core.prefs similarity index 100% rename from android/.settings/org.eclipse.buildship.core.prefs rename to package/android/.settings/org.eclipse.buildship.core.prefs diff --git a/android/CMakeLists.txt b/package/android/CMakeLists.txt similarity index 100% rename from android/CMakeLists.txt rename to package/android/CMakeLists.txt diff --git a/android/README.md b/package/android/README.md similarity index 100% rename from android/README.md rename to package/android/README.md diff --git a/android/build.gradle b/package/android/build.gradle similarity index 100% rename from android/build.gradle rename to package/android/build.gradle diff --git a/android/gradle.properties b/package/android/gradle.properties similarity index 100% rename from android/gradle.properties rename to package/android/gradle.properties diff --git a/android/gradle/wrapper/gradle-wrapper.jar b/package/android/gradle/wrapper/gradle-wrapper.jar similarity index 100% rename from android/gradle/wrapper/gradle-wrapper.jar rename to package/android/gradle/wrapper/gradle-wrapper.jar diff --git a/android/gradle/wrapper/gradle-wrapper.properties b/package/android/gradle/wrapper/gradle-wrapper.properties similarity index 100% rename from android/gradle/wrapper/gradle-wrapper.properties rename to package/android/gradle/wrapper/gradle-wrapper.properties diff --git a/android/gradlew b/package/android/gradlew similarity index 100% rename from android/gradlew rename to package/android/gradlew diff --git a/android/gradlew.bat b/package/android/gradlew.bat similarity index 100% rename from android/gradlew.bat rename to package/android/gradlew.bat diff --git a/android/settings.gradle b/package/android/settings.gradle similarity index 100% rename from android/settings.gradle rename to package/android/settings.gradle diff --git a/android/src/main/AndroidManifest.xml b/package/android/src/main/AndroidManifest.xml similarity index 100% rename from android/src/main/AndroidManifest.xml rename to package/android/src/main/AndroidManifest.xml diff --git a/android/src/main/cpp/OpenGLContext.cpp b/package/android/src/main/cpp/OpenGLContext.cpp similarity index 100% rename from android/src/main/cpp/OpenGLContext.cpp rename to package/android/src/main/cpp/OpenGLContext.cpp diff --git a/android/src/main/cpp/OpenGLContext.h b/package/android/src/main/cpp/OpenGLContext.h similarity index 100% rename from android/src/main/cpp/OpenGLContext.h rename to package/android/src/main/cpp/OpenGLContext.h diff --git a/android/src/main/cpp/OpenGLError.h b/package/android/src/main/cpp/OpenGLError.h similarity index 100% rename from android/src/main/cpp/OpenGLError.h rename to package/android/src/main/cpp/OpenGLError.h diff --git a/android/src/main/cpp/OpenGLRenderer.cpp b/package/android/src/main/cpp/OpenGLRenderer.cpp similarity index 100% rename from android/src/main/cpp/OpenGLRenderer.cpp rename to package/android/src/main/cpp/OpenGLRenderer.cpp diff --git a/android/src/main/cpp/OpenGLRenderer.h b/package/android/src/main/cpp/OpenGLRenderer.h similarity index 100% rename from android/src/main/cpp/OpenGLRenderer.h rename to package/android/src/main/cpp/OpenGLRenderer.h diff --git a/android/src/main/cpp/OpenGLTexture.h b/package/android/src/main/cpp/OpenGLTexture.h similarity index 100% rename from android/src/main/cpp/OpenGLTexture.h rename to package/android/src/main/cpp/OpenGLTexture.h diff --git a/android/src/main/cpp/PassThroughShader.cpp b/package/android/src/main/cpp/PassThroughShader.cpp similarity index 100% rename from android/src/main/cpp/PassThroughShader.cpp rename to package/android/src/main/cpp/PassThroughShader.cpp diff --git a/android/src/main/cpp/PassThroughShader.h b/package/android/src/main/cpp/PassThroughShader.h similarity index 100% rename from android/src/main/cpp/PassThroughShader.h rename to package/android/src/main/cpp/PassThroughShader.h diff --git a/android/src/main/cpp/VideoPipeline.cpp b/package/android/src/main/cpp/VideoPipeline.cpp similarity index 100% rename from android/src/main/cpp/VideoPipeline.cpp rename to package/android/src/main/cpp/VideoPipeline.cpp diff --git a/android/src/main/cpp/VideoPipeline.h b/package/android/src/main/cpp/VideoPipeline.h similarity index 100% rename from android/src/main/cpp/VideoPipeline.h rename to package/android/src/main/cpp/VideoPipeline.h diff --git a/android/src/main/cpp/VisionCamera.cpp b/package/android/src/main/cpp/VisionCamera.cpp similarity index 100% rename from android/src/main/cpp/VisionCamera.cpp rename to package/android/src/main/cpp/VisionCamera.cpp diff --git a/android/src/main/cpp/frameprocessor/FrameHostObject.cpp b/package/android/src/main/cpp/frameprocessor/FrameHostObject.cpp similarity index 100% rename from android/src/main/cpp/frameprocessor/FrameHostObject.cpp rename to package/android/src/main/cpp/frameprocessor/FrameHostObject.cpp diff --git a/android/src/main/cpp/frameprocessor/FrameHostObject.h b/package/android/src/main/cpp/frameprocessor/FrameHostObject.h similarity index 100% rename from android/src/main/cpp/frameprocessor/FrameHostObject.h rename to package/android/src/main/cpp/frameprocessor/FrameHostObject.h diff --git a/android/src/main/cpp/frameprocessor/FrameProcessorPluginHostObject.cpp b/package/android/src/main/cpp/frameprocessor/FrameProcessorPluginHostObject.cpp similarity index 100% rename from android/src/main/cpp/frameprocessor/FrameProcessorPluginHostObject.cpp rename to package/android/src/main/cpp/frameprocessor/FrameProcessorPluginHostObject.cpp diff --git a/android/src/main/cpp/frameprocessor/FrameProcessorPluginHostObject.h b/package/android/src/main/cpp/frameprocessor/FrameProcessorPluginHostObject.h similarity index 100% rename from android/src/main/cpp/frameprocessor/FrameProcessorPluginHostObject.h rename to package/android/src/main/cpp/frameprocessor/FrameProcessorPluginHostObject.h diff --git a/android/src/main/cpp/frameprocessor/JSIJNIConversion.cpp b/package/android/src/main/cpp/frameprocessor/JSIJNIConversion.cpp similarity index 100% rename from android/src/main/cpp/frameprocessor/JSIJNIConversion.cpp rename to package/android/src/main/cpp/frameprocessor/JSIJNIConversion.cpp diff --git a/android/src/main/cpp/frameprocessor/JSIJNIConversion.h b/package/android/src/main/cpp/frameprocessor/JSIJNIConversion.h similarity index 100% rename from android/src/main/cpp/frameprocessor/JSIJNIConversion.h rename to package/android/src/main/cpp/frameprocessor/JSIJNIConversion.h diff --git a/android/src/main/cpp/frameprocessor/VisionCameraProxy.cpp b/package/android/src/main/cpp/frameprocessor/VisionCameraProxy.cpp similarity index 100% rename from android/src/main/cpp/frameprocessor/VisionCameraProxy.cpp rename to package/android/src/main/cpp/frameprocessor/VisionCameraProxy.cpp diff --git a/android/src/main/cpp/frameprocessor/VisionCameraProxy.h b/package/android/src/main/cpp/frameprocessor/VisionCameraProxy.h similarity index 100% rename from android/src/main/cpp/frameprocessor/VisionCameraProxy.h rename to package/android/src/main/cpp/frameprocessor/VisionCameraProxy.h diff --git a/android/src/main/cpp/frameprocessor/java-bindings/JFrame.cpp b/package/android/src/main/cpp/frameprocessor/java-bindings/JFrame.cpp similarity index 100% rename from android/src/main/cpp/frameprocessor/java-bindings/JFrame.cpp rename to package/android/src/main/cpp/frameprocessor/java-bindings/JFrame.cpp diff --git a/android/src/main/cpp/frameprocessor/java-bindings/JFrame.h b/package/android/src/main/cpp/frameprocessor/java-bindings/JFrame.h similarity index 100% rename from android/src/main/cpp/frameprocessor/java-bindings/JFrame.h rename to package/android/src/main/cpp/frameprocessor/java-bindings/JFrame.h diff --git a/android/src/main/cpp/frameprocessor/java-bindings/JFrameProcessor.cpp b/package/android/src/main/cpp/frameprocessor/java-bindings/JFrameProcessor.cpp similarity index 100% rename from android/src/main/cpp/frameprocessor/java-bindings/JFrameProcessor.cpp rename to package/android/src/main/cpp/frameprocessor/java-bindings/JFrameProcessor.cpp diff --git a/android/src/main/cpp/frameprocessor/java-bindings/JFrameProcessor.h b/package/android/src/main/cpp/frameprocessor/java-bindings/JFrameProcessor.h similarity index 100% rename from android/src/main/cpp/frameprocessor/java-bindings/JFrameProcessor.h rename to package/android/src/main/cpp/frameprocessor/java-bindings/JFrameProcessor.h diff --git a/android/src/main/cpp/frameprocessor/java-bindings/JFrameProcessorPlugin.cpp b/package/android/src/main/cpp/frameprocessor/java-bindings/JFrameProcessorPlugin.cpp similarity index 100% rename from android/src/main/cpp/frameprocessor/java-bindings/JFrameProcessorPlugin.cpp rename to package/android/src/main/cpp/frameprocessor/java-bindings/JFrameProcessorPlugin.cpp diff --git a/android/src/main/cpp/frameprocessor/java-bindings/JFrameProcessorPlugin.h b/package/android/src/main/cpp/frameprocessor/java-bindings/JFrameProcessorPlugin.h similarity index 100% rename from android/src/main/cpp/frameprocessor/java-bindings/JFrameProcessorPlugin.h rename to package/android/src/main/cpp/frameprocessor/java-bindings/JFrameProcessorPlugin.h diff --git a/android/src/main/cpp/frameprocessor/java-bindings/JVisionCameraProxy.cpp b/package/android/src/main/cpp/frameprocessor/java-bindings/JVisionCameraProxy.cpp similarity index 100% rename from android/src/main/cpp/frameprocessor/java-bindings/JVisionCameraProxy.cpp rename to package/android/src/main/cpp/frameprocessor/java-bindings/JVisionCameraProxy.cpp diff --git a/android/src/main/cpp/frameprocessor/java-bindings/JVisionCameraProxy.h b/package/android/src/main/cpp/frameprocessor/java-bindings/JVisionCameraProxy.h similarity index 100% rename from android/src/main/cpp/frameprocessor/java-bindings/JVisionCameraProxy.h rename to package/android/src/main/cpp/frameprocessor/java-bindings/JVisionCameraProxy.h diff --git a/android/src/main/cpp/frameprocessor/java-bindings/JVisionCameraScheduler.cpp b/package/android/src/main/cpp/frameprocessor/java-bindings/JVisionCameraScheduler.cpp similarity index 100% rename from android/src/main/cpp/frameprocessor/java-bindings/JVisionCameraScheduler.cpp rename to package/android/src/main/cpp/frameprocessor/java-bindings/JVisionCameraScheduler.cpp diff --git a/android/src/main/cpp/frameprocessor/java-bindings/JVisionCameraScheduler.h b/package/android/src/main/cpp/frameprocessor/java-bindings/JVisionCameraScheduler.h similarity index 100% rename from android/src/main/cpp/frameprocessor/java-bindings/JVisionCameraScheduler.h rename to package/android/src/main/cpp/frameprocessor/java-bindings/JVisionCameraScheduler.h diff --git a/android/src/main/java/com/mrousavy/camera/CameraPackage.kt b/package/android/src/main/java/com/mrousavy/camera/CameraPackage.kt similarity index 100% rename from android/src/main/java/com/mrousavy/camera/CameraPackage.kt rename to package/android/src/main/java/com/mrousavy/camera/CameraPackage.kt diff --git a/android/src/main/java/com/mrousavy/camera/CameraQueues.kt b/package/android/src/main/java/com/mrousavy/camera/CameraQueues.kt similarity index 100% rename from android/src/main/java/com/mrousavy/camera/CameraQueues.kt rename to package/android/src/main/java/com/mrousavy/camera/CameraQueues.kt diff --git a/android/src/main/java/com/mrousavy/camera/CameraView+Events.kt b/package/android/src/main/java/com/mrousavy/camera/CameraView+Events.kt similarity index 100% rename from android/src/main/java/com/mrousavy/camera/CameraView+Events.kt rename to package/android/src/main/java/com/mrousavy/camera/CameraView+Events.kt diff --git a/android/src/main/java/com/mrousavy/camera/CameraView+Focus.kt b/package/android/src/main/java/com/mrousavy/camera/CameraView+Focus.kt similarity index 100% rename from android/src/main/java/com/mrousavy/camera/CameraView+Focus.kt rename to package/android/src/main/java/com/mrousavy/camera/CameraView+Focus.kt diff --git a/android/src/main/java/com/mrousavy/camera/CameraView+RecordVideo.kt b/package/android/src/main/java/com/mrousavy/camera/CameraView+RecordVideo.kt similarity index 100% rename from android/src/main/java/com/mrousavy/camera/CameraView+RecordVideo.kt rename to package/android/src/main/java/com/mrousavy/camera/CameraView+RecordVideo.kt diff --git a/android/src/main/java/com/mrousavy/camera/CameraView+TakePhoto.kt b/package/android/src/main/java/com/mrousavy/camera/CameraView+TakePhoto.kt similarity index 100% rename from android/src/main/java/com/mrousavy/camera/CameraView+TakePhoto.kt rename to package/android/src/main/java/com/mrousavy/camera/CameraView+TakePhoto.kt diff --git a/android/src/main/java/com/mrousavy/camera/CameraView.kt b/package/android/src/main/java/com/mrousavy/camera/CameraView.kt similarity index 100% rename from android/src/main/java/com/mrousavy/camera/CameraView.kt rename to package/android/src/main/java/com/mrousavy/camera/CameraView.kt diff --git a/android/src/main/java/com/mrousavy/camera/CameraViewManager.kt b/package/android/src/main/java/com/mrousavy/camera/CameraViewManager.kt similarity index 100% rename from android/src/main/java/com/mrousavy/camera/CameraViewManager.kt rename to package/android/src/main/java/com/mrousavy/camera/CameraViewManager.kt diff --git a/android/src/main/java/com/mrousavy/camera/CameraViewModule.kt b/package/android/src/main/java/com/mrousavy/camera/CameraViewModule.kt similarity index 100% rename from android/src/main/java/com/mrousavy/camera/CameraViewModule.kt rename to package/android/src/main/java/com/mrousavy/camera/CameraViewModule.kt diff --git a/android/src/main/java/com/mrousavy/camera/Errors.kt b/package/android/src/main/java/com/mrousavy/camera/Errors.kt similarity index 100% rename from android/src/main/java/com/mrousavy/camera/Errors.kt rename to package/android/src/main/java/com/mrousavy/camera/Errors.kt diff --git a/android/src/main/java/com/mrousavy/camera/core/CameraDeviceDetails.kt b/package/android/src/main/java/com/mrousavy/camera/core/CameraDeviceDetails.kt similarity index 100% rename from android/src/main/java/com/mrousavy/camera/core/CameraDeviceDetails.kt rename to package/android/src/main/java/com/mrousavy/camera/core/CameraDeviceDetails.kt diff --git a/android/src/main/java/com/mrousavy/camera/core/CameraSession.kt b/package/android/src/main/java/com/mrousavy/camera/core/CameraSession.kt similarity index 100% rename from android/src/main/java/com/mrousavy/camera/core/CameraSession.kt rename to package/android/src/main/java/com/mrousavy/camera/core/CameraSession.kt diff --git a/android/src/main/java/com/mrousavy/camera/core/PhotoOutputSynchronizer.kt b/package/android/src/main/java/com/mrousavy/camera/core/PhotoOutputSynchronizer.kt similarity index 100% rename from android/src/main/java/com/mrousavy/camera/core/PhotoOutputSynchronizer.kt rename to package/android/src/main/java/com/mrousavy/camera/core/PhotoOutputSynchronizer.kt diff --git a/android/src/main/java/com/mrousavy/camera/core/PreviewView.kt b/package/android/src/main/java/com/mrousavy/camera/core/PreviewView.kt similarity index 100% rename from android/src/main/java/com/mrousavy/camera/core/PreviewView.kt rename to package/android/src/main/java/com/mrousavy/camera/core/PreviewView.kt diff --git a/android/src/main/java/com/mrousavy/camera/core/RecordingSession.kt b/package/android/src/main/java/com/mrousavy/camera/core/RecordingSession.kt similarity index 100% rename from android/src/main/java/com/mrousavy/camera/core/RecordingSession.kt rename to package/android/src/main/java/com/mrousavy/camera/core/RecordingSession.kt diff --git a/android/src/main/java/com/mrousavy/camera/core/VideoPipeline.kt b/package/android/src/main/java/com/mrousavy/camera/core/VideoPipeline.kt similarity index 100% rename from android/src/main/java/com/mrousavy/camera/core/VideoPipeline.kt rename to package/android/src/main/java/com/mrousavy/camera/core/VideoPipeline.kt diff --git a/android/src/main/java/com/mrousavy/camera/core/outputs/CameraOutputs.kt b/package/android/src/main/java/com/mrousavy/camera/core/outputs/CameraOutputs.kt similarity index 100% rename from android/src/main/java/com/mrousavy/camera/core/outputs/CameraOutputs.kt rename to package/android/src/main/java/com/mrousavy/camera/core/outputs/CameraOutputs.kt diff --git a/android/src/main/java/com/mrousavy/camera/core/outputs/ImageReaderOutput.kt b/package/android/src/main/java/com/mrousavy/camera/core/outputs/ImageReaderOutput.kt similarity index 100% rename from android/src/main/java/com/mrousavy/camera/core/outputs/ImageReaderOutput.kt rename to package/android/src/main/java/com/mrousavy/camera/core/outputs/ImageReaderOutput.kt diff --git a/android/src/main/java/com/mrousavy/camera/core/outputs/SurfaceOutput.kt b/package/android/src/main/java/com/mrousavy/camera/core/outputs/SurfaceOutput.kt similarity index 100% rename from android/src/main/java/com/mrousavy/camera/core/outputs/SurfaceOutput.kt rename to package/android/src/main/java/com/mrousavy/camera/core/outputs/SurfaceOutput.kt diff --git a/android/src/main/java/com/mrousavy/camera/core/outputs/VideoPipelineOutput.kt b/package/android/src/main/java/com/mrousavy/camera/core/outputs/VideoPipelineOutput.kt similarity index 100% rename from android/src/main/java/com/mrousavy/camera/core/outputs/VideoPipelineOutput.kt rename to package/android/src/main/java/com/mrousavy/camera/core/outputs/VideoPipelineOutput.kt diff --git a/android/src/main/java/com/mrousavy/camera/extensions/CameraCaptureSession+capture.kt b/package/android/src/main/java/com/mrousavy/camera/extensions/CameraCaptureSession+capture.kt similarity index 100% rename from android/src/main/java/com/mrousavy/camera/extensions/CameraCaptureSession+capture.kt rename to package/android/src/main/java/com/mrousavy/camera/extensions/CameraCaptureSession+capture.kt diff --git a/android/src/main/java/com/mrousavy/camera/extensions/CameraCharacteristics+getOutputSizes.kt b/package/android/src/main/java/com/mrousavy/camera/extensions/CameraCharacteristics+getOutputSizes.kt similarity index 100% rename from android/src/main/java/com/mrousavy/camera/extensions/CameraCharacteristics+getOutputSizes.kt rename to package/android/src/main/java/com/mrousavy/camera/extensions/CameraCharacteristics+getOutputSizes.kt diff --git a/android/src/main/java/com/mrousavy/camera/extensions/CameraDevice+createCaptureSession.kt b/package/android/src/main/java/com/mrousavy/camera/extensions/CameraDevice+createCaptureSession.kt similarity index 100% rename from android/src/main/java/com/mrousavy/camera/extensions/CameraDevice+createCaptureSession.kt rename to package/android/src/main/java/com/mrousavy/camera/extensions/CameraDevice+createCaptureSession.kt diff --git a/android/src/main/java/com/mrousavy/camera/extensions/CameraDevice+createPhotoCaptureRequest.kt b/package/android/src/main/java/com/mrousavy/camera/extensions/CameraDevice+createPhotoCaptureRequest.kt similarity index 100% rename from android/src/main/java/com/mrousavy/camera/extensions/CameraDevice+createPhotoCaptureRequest.kt rename to package/android/src/main/java/com/mrousavy/camera/extensions/CameraDevice+createPhotoCaptureRequest.kt diff --git a/android/src/main/java/com/mrousavy/camera/extensions/CameraManager+openCamera.kt b/package/android/src/main/java/com/mrousavy/camera/extensions/CameraManager+openCamera.kt similarity index 100% rename from android/src/main/java/com/mrousavy/camera/extensions/CameraManager+openCamera.kt rename to package/android/src/main/java/com/mrousavy/camera/extensions/CameraManager+openCamera.kt diff --git a/android/src/main/java/com/mrousavy/camera/extensions/DynamicRangeProfiles+bestProfile.kt b/package/android/src/main/java/com/mrousavy/camera/extensions/DynamicRangeProfiles+bestProfile.kt similarity index 100% rename from android/src/main/java/com/mrousavy/camera/extensions/DynamicRangeProfiles+bestProfile.kt rename to package/android/src/main/java/com/mrousavy/camera/extensions/DynamicRangeProfiles+bestProfile.kt diff --git a/android/src/main/java/com/mrousavy/camera/extensions/Handler+postAndWait.kt b/package/android/src/main/java/com/mrousavy/camera/extensions/Handler+postAndWait.kt similarity index 100% rename from android/src/main/java/com/mrousavy/camera/extensions/Handler+postAndWait.kt rename to package/android/src/main/java/com/mrousavy/camera/extensions/Handler+postAndWait.kt diff --git a/android/src/main/java/com/mrousavy/camera/extensions/List+containsAny.kt b/package/android/src/main/java/com/mrousavy/camera/extensions/List+containsAny.kt similarity index 100% rename from android/src/main/java/com/mrousavy/camera/extensions/List+containsAny.kt rename to package/android/src/main/java/com/mrousavy/camera/extensions/List+containsAny.kt diff --git a/android/src/main/java/com/mrousavy/camera/extensions/Rect+zoomed.kt b/package/android/src/main/java/com/mrousavy/camera/extensions/Rect+zoomed.kt similarity index 100% rename from android/src/main/java/com/mrousavy/camera/extensions/Rect+zoomed.kt rename to package/android/src/main/java/com/mrousavy/camera/extensions/Rect+zoomed.kt diff --git a/android/src/main/java/com/mrousavy/camera/extensions/Size+Extensions.kt b/package/android/src/main/java/com/mrousavy/camera/extensions/Size+Extensions.kt similarity index 100% rename from android/src/main/java/com/mrousavy/camera/extensions/Size+Extensions.kt rename to package/android/src/main/java/com/mrousavy/camera/extensions/Size+Extensions.kt diff --git a/android/src/main/java/com/mrousavy/camera/extensions/ViewGroup+installHierarchyFitter.kt b/package/android/src/main/java/com/mrousavy/camera/extensions/ViewGroup+installHierarchyFitter.kt similarity index 100% rename from android/src/main/java/com/mrousavy/camera/extensions/ViewGroup+installHierarchyFitter.kt rename to package/android/src/main/java/com/mrousavy/camera/extensions/ViewGroup+installHierarchyFitter.kt diff --git a/android/src/main/java/com/mrousavy/camera/extensions/WritableMap+Nullables.kt b/package/android/src/main/java/com/mrousavy/camera/extensions/WritableMap+Nullables.kt similarity index 100% rename from android/src/main/java/com/mrousavy/camera/extensions/WritableMap+Nullables.kt rename to package/android/src/main/java/com/mrousavy/camera/extensions/WritableMap+Nullables.kt diff --git a/android/src/main/java/com/mrousavy/camera/frameprocessor/Frame.java b/package/android/src/main/java/com/mrousavy/camera/frameprocessor/Frame.java similarity index 100% rename from android/src/main/java/com/mrousavy/camera/frameprocessor/Frame.java rename to package/android/src/main/java/com/mrousavy/camera/frameprocessor/Frame.java diff --git a/android/src/main/java/com/mrousavy/camera/frameprocessor/FrameProcessor.java b/package/android/src/main/java/com/mrousavy/camera/frameprocessor/FrameProcessor.java similarity index 100% rename from android/src/main/java/com/mrousavy/camera/frameprocessor/FrameProcessor.java rename to package/android/src/main/java/com/mrousavy/camera/frameprocessor/FrameProcessor.java diff --git a/android/src/main/java/com/mrousavy/camera/frameprocessor/FrameProcessorPlugin.java b/package/android/src/main/java/com/mrousavy/camera/frameprocessor/FrameProcessorPlugin.java similarity index 100% rename from android/src/main/java/com/mrousavy/camera/frameprocessor/FrameProcessorPlugin.java rename to package/android/src/main/java/com/mrousavy/camera/frameprocessor/FrameProcessorPlugin.java diff --git a/android/src/main/java/com/mrousavy/camera/frameprocessor/FrameProcessorPluginRegistry.java b/package/android/src/main/java/com/mrousavy/camera/frameprocessor/FrameProcessorPluginRegistry.java similarity index 100% rename from android/src/main/java/com/mrousavy/camera/frameprocessor/FrameProcessorPluginRegistry.java rename to package/android/src/main/java/com/mrousavy/camera/frameprocessor/FrameProcessorPluginRegistry.java diff --git a/android/src/main/java/com/mrousavy/camera/frameprocessor/VisionCameraInstaller.java b/package/android/src/main/java/com/mrousavy/camera/frameprocessor/VisionCameraInstaller.java similarity index 100% rename from android/src/main/java/com/mrousavy/camera/frameprocessor/VisionCameraInstaller.java rename to package/android/src/main/java/com/mrousavy/camera/frameprocessor/VisionCameraInstaller.java diff --git a/android/src/main/java/com/mrousavy/camera/frameprocessor/VisionCameraProxy.kt b/package/android/src/main/java/com/mrousavy/camera/frameprocessor/VisionCameraProxy.kt similarity index 100% rename from android/src/main/java/com/mrousavy/camera/frameprocessor/VisionCameraProxy.kt rename to package/android/src/main/java/com/mrousavy/camera/frameprocessor/VisionCameraProxy.kt diff --git a/android/src/main/java/com/mrousavy/camera/frameprocessor/VisionCameraScheduler.java b/package/android/src/main/java/com/mrousavy/camera/frameprocessor/VisionCameraScheduler.java similarity index 100% rename from android/src/main/java/com/mrousavy/camera/frameprocessor/VisionCameraScheduler.java rename to package/android/src/main/java/com/mrousavy/camera/frameprocessor/VisionCameraScheduler.java diff --git a/android/src/main/java/com/mrousavy/camera/parsers/CameraDeviceError.kt b/package/android/src/main/java/com/mrousavy/camera/parsers/CameraDeviceError.kt similarity index 100% rename from android/src/main/java/com/mrousavy/camera/parsers/CameraDeviceError.kt rename to package/android/src/main/java/com/mrousavy/camera/parsers/CameraDeviceError.kt diff --git a/android/src/main/java/com/mrousavy/camera/parsers/Flash.kt b/package/android/src/main/java/com/mrousavy/camera/parsers/Flash.kt similarity index 100% rename from android/src/main/java/com/mrousavy/camera/parsers/Flash.kt rename to package/android/src/main/java/com/mrousavy/camera/parsers/Flash.kt diff --git a/android/src/main/java/com/mrousavy/camera/parsers/HardwareLevel.kt b/package/android/src/main/java/com/mrousavy/camera/parsers/HardwareLevel.kt similarity index 100% rename from android/src/main/java/com/mrousavy/camera/parsers/HardwareLevel.kt rename to package/android/src/main/java/com/mrousavy/camera/parsers/HardwareLevel.kt diff --git a/android/src/main/java/com/mrousavy/camera/parsers/JSUnionValue.kt b/package/android/src/main/java/com/mrousavy/camera/parsers/JSUnionValue.kt similarity index 100% rename from android/src/main/java/com/mrousavy/camera/parsers/JSUnionValue.kt rename to package/android/src/main/java/com/mrousavy/camera/parsers/JSUnionValue.kt diff --git a/android/src/main/java/com/mrousavy/camera/parsers/LensFacing.kt b/package/android/src/main/java/com/mrousavy/camera/parsers/LensFacing.kt similarity index 100% rename from android/src/main/java/com/mrousavy/camera/parsers/LensFacing.kt rename to package/android/src/main/java/com/mrousavy/camera/parsers/LensFacing.kt diff --git a/android/src/main/java/com/mrousavy/camera/parsers/Orientation.kt b/package/android/src/main/java/com/mrousavy/camera/parsers/Orientation.kt similarity index 100% rename from android/src/main/java/com/mrousavy/camera/parsers/Orientation.kt rename to package/android/src/main/java/com/mrousavy/camera/parsers/Orientation.kt diff --git a/android/src/main/java/com/mrousavy/camera/parsers/PermissionStatus.kt b/package/android/src/main/java/com/mrousavy/camera/parsers/PermissionStatus.kt similarity index 100% rename from android/src/main/java/com/mrousavy/camera/parsers/PermissionStatus.kt rename to package/android/src/main/java/com/mrousavy/camera/parsers/PermissionStatus.kt diff --git a/android/src/main/java/com/mrousavy/camera/parsers/PixelFormat.kt b/package/android/src/main/java/com/mrousavy/camera/parsers/PixelFormat.kt similarity index 100% rename from android/src/main/java/com/mrousavy/camera/parsers/PixelFormat.kt rename to package/android/src/main/java/com/mrousavy/camera/parsers/PixelFormat.kt diff --git a/android/src/main/java/com/mrousavy/camera/parsers/QualityPrioritization.kt b/package/android/src/main/java/com/mrousavy/camera/parsers/QualityPrioritization.kt similarity index 100% rename from android/src/main/java/com/mrousavy/camera/parsers/QualityPrioritization.kt rename to package/android/src/main/java/com/mrousavy/camera/parsers/QualityPrioritization.kt diff --git a/android/src/main/java/com/mrousavy/camera/parsers/Torch.kt b/package/android/src/main/java/com/mrousavy/camera/parsers/Torch.kt similarity index 100% rename from android/src/main/java/com/mrousavy/camera/parsers/Torch.kt rename to package/android/src/main/java/com/mrousavy/camera/parsers/Torch.kt diff --git a/android/src/main/java/com/mrousavy/camera/parsers/VideoCodec.kt b/package/android/src/main/java/com/mrousavy/camera/parsers/VideoCodec.kt similarity index 100% rename from android/src/main/java/com/mrousavy/camera/parsers/VideoCodec.kt rename to package/android/src/main/java/com/mrousavy/camera/parsers/VideoCodec.kt diff --git a/android/src/main/java/com/mrousavy/camera/parsers/VideoFileType.kt b/package/android/src/main/java/com/mrousavy/camera/parsers/VideoFileType.kt similarity index 100% rename from android/src/main/java/com/mrousavy/camera/parsers/VideoFileType.kt rename to package/android/src/main/java/com/mrousavy/camera/parsers/VideoFileType.kt diff --git a/android/src/main/java/com/mrousavy/camera/parsers/VideoStabilizationMode.kt b/package/android/src/main/java/com/mrousavy/camera/parsers/VideoStabilizationMode.kt similarity index 100% rename from android/src/main/java/com/mrousavy/camera/parsers/VideoStabilizationMode.kt rename to package/android/src/main/java/com/mrousavy/camera/parsers/VideoStabilizationMode.kt diff --git a/android/src/main/java/com/mrousavy/camera/utils/CallbackPromise.kt b/package/android/src/main/java/com/mrousavy/camera/utils/CallbackPromise.kt similarity index 100% rename from android/src/main/java/com/mrousavy/camera/utils/CallbackPromise.kt rename to package/android/src/main/java/com/mrousavy/camera/utils/CallbackPromise.kt diff --git a/android/src/main/java/com/mrousavy/camera/utils/withPromise.kt b/package/android/src/main/java/com/mrousavy/camera/utils/withPromise.kt similarity index 100% rename from android/src/main/java/com/mrousavy/camera/utils/withPromise.kt rename to package/android/src/main/java/com/mrousavy/camera/utils/withPromise.kt diff --git a/app.plugin.js b/package/app.plugin.js similarity index 100% rename from app.plugin.js rename to package/app.plugin.js diff --git a/cpp/.clang-format b/package/cpp/.clang-format similarity index 100% rename from cpp/.clang-format rename to package/cpp/.clang-format diff --git a/cpp/JSITypedArray.cpp b/package/cpp/JSITypedArray.cpp similarity index 100% rename from cpp/JSITypedArray.cpp rename to package/cpp/JSITypedArray.cpp diff --git a/cpp/JSITypedArray.h b/package/cpp/JSITypedArray.h similarity index 100% rename from cpp/JSITypedArray.h rename to package/cpp/JSITypedArray.h diff --git a/example/.eslintrc.js b/package/example/.eslintrc.js similarity index 100% rename from example/.eslintrc.js rename to package/example/.eslintrc.js diff --git a/example/README.md b/package/example/README.md similarity index 100% rename from example/README.md rename to package/example/README.md diff --git a/example/android/.project b/package/example/android/.project similarity index 100% rename from example/android/.project rename to package/example/android/.project diff --git a/example/android/.settings/org.eclipse.buildship.core.prefs b/package/example/android/.settings/org.eclipse.buildship.core.prefs similarity index 100% rename from example/android/.settings/org.eclipse.buildship.core.prefs rename to package/example/android/.settings/org.eclipse.buildship.core.prefs diff --git a/example/android/app/build.gradle b/package/example/android/app/build.gradle similarity index 100% rename from example/android/app/build.gradle rename to package/example/android/app/build.gradle diff --git a/example/android/app/debug.keystore b/package/example/android/app/debug.keystore similarity index 100% rename from example/android/app/debug.keystore rename to package/example/android/app/debug.keystore diff --git a/example/android/app/proguard-rules.pro b/package/example/android/app/proguard-rules.pro similarity index 100% rename from example/android/app/proguard-rules.pro rename to package/example/android/app/proguard-rules.pro diff --git a/example/android/app/src/debug/AndroidManifest.xml b/package/example/android/app/src/debug/AndroidManifest.xml similarity index 100% rename from example/android/app/src/debug/AndroidManifest.xml rename to package/example/android/app/src/debug/AndroidManifest.xml diff --git a/example/android/app/src/main/AndroidManifest.xml b/package/example/android/app/src/main/AndroidManifest.xml similarity index 100% rename from example/android/app/src/main/AndroidManifest.xml rename to package/example/android/app/src/main/AndroidManifest.xml diff --git a/example/android/app/src/main/ic_launcher-playstore.png b/package/example/android/app/src/main/ic_launcher-playstore.png similarity index 100% rename from example/android/app/src/main/ic_launcher-playstore.png rename to package/example/android/app/src/main/ic_launcher-playstore.png diff --git a/example/android/app/src/main/java/com/mrousavy/camera/example/ExampleFrameProcessorPlugin.java b/package/example/android/app/src/main/java/com/mrousavy/camera/example/ExampleFrameProcessorPlugin.java similarity index 100% rename from example/android/app/src/main/java/com/mrousavy/camera/example/ExampleFrameProcessorPlugin.java rename to package/example/android/app/src/main/java/com/mrousavy/camera/example/ExampleFrameProcessorPlugin.java diff --git a/example/android/app/src/main/java/com/mrousavy/camera/example/MainActivity.java b/package/example/android/app/src/main/java/com/mrousavy/camera/example/MainActivity.java similarity index 100% rename from example/android/app/src/main/java/com/mrousavy/camera/example/MainActivity.java rename to package/example/android/app/src/main/java/com/mrousavy/camera/example/MainActivity.java diff --git a/example/android/app/src/main/java/com/mrousavy/camera/example/MainApplication.java b/package/example/android/app/src/main/java/com/mrousavy/camera/example/MainApplication.java similarity index 100% rename from example/android/app/src/main/java/com/mrousavy/camera/example/MainApplication.java rename to package/example/android/app/src/main/java/com/mrousavy/camera/example/MainApplication.java diff --git a/example/android/app/src/main/res/drawable/rn_edit_text_material.xml b/package/example/android/app/src/main/res/drawable/rn_edit_text_material.xml similarity index 100% rename from example/android/app/src/main/res/drawable/rn_edit_text_material.xml rename to package/example/android/app/src/main/res/drawable/rn_edit_text_material.xml diff --git a/example/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml b/package/example/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml similarity index 100% rename from example/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml rename to package/example/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml diff --git a/example/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml b/package/example/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml similarity index 100% rename from example/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml rename to package/example/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml diff --git a/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/package/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png similarity index 100% rename from example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png rename to package/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png diff --git a/example/android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png b/package/example/android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png similarity index 100% rename from example/android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png rename to package/example/android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png diff --git a/example/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png b/package/example/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png similarity index 100% rename from example/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png rename to package/example/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png diff --git a/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/package/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png similarity index 100% rename from example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png rename to package/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png diff --git a/example/android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png b/package/example/android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png similarity index 100% rename from example/android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png rename to package/example/android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png diff --git a/example/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png b/package/example/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png similarity index 100% rename from example/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png rename to package/example/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png diff --git a/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/package/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png similarity index 100% rename from example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png rename to package/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png diff --git a/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png b/package/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png similarity index 100% rename from example/android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png rename to package/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png diff --git a/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png b/package/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png similarity index 100% rename from example/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png rename to package/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png diff --git a/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/package/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png similarity index 100% rename from example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png rename to package/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png diff --git a/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png b/package/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png similarity index 100% rename from example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png rename to package/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png diff --git a/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png b/package/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png similarity index 100% rename from example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png rename to package/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png diff --git a/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/package/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png similarity index 100% rename from example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png rename to package/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png diff --git a/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png b/package/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png similarity index 100% rename from example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png rename to package/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png diff --git a/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png b/package/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png similarity index 100% rename from example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png rename to package/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png diff --git a/example/android/app/src/main/res/values/ic_launcher_background.xml b/package/example/android/app/src/main/res/values/ic_launcher_background.xml similarity index 100% rename from example/android/app/src/main/res/values/ic_launcher_background.xml rename to package/example/android/app/src/main/res/values/ic_launcher_background.xml diff --git a/example/android/app/src/main/res/values/strings.xml b/package/example/android/app/src/main/res/values/strings.xml similarity index 100% rename from example/android/app/src/main/res/values/strings.xml rename to package/example/android/app/src/main/res/values/strings.xml diff --git a/example/android/app/src/main/res/values/styles.xml b/package/example/android/app/src/main/res/values/styles.xml similarity index 100% rename from example/android/app/src/main/res/values/styles.xml rename to package/example/android/app/src/main/res/values/styles.xml diff --git a/example/android/build.gradle b/package/example/android/build.gradle similarity index 100% rename from example/android/build.gradle rename to package/example/android/build.gradle diff --git a/example/android/gradle.properties b/package/example/android/gradle.properties similarity index 100% rename from example/android/gradle.properties rename to package/example/android/gradle.properties diff --git a/example/android/gradle/wrapper/gradle-wrapper.jar b/package/example/android/gradle/wrapper/gradle-wrapper.jar similarity index 100% rename from example/android/gradle/wrapper/gradle-wrapper.jar rename to package/example/android/gradle/wrapper/gradle-wrapper.jar diff --git a/example/android/gradle/wrapper/gradle-wrapper.properties b/package/example/android/gradle/wrapper/gradle-wrapper.properties similarity index 100% rename from example/android/gradle/wrapper/gradle-wrapper.properties rename to package/example/android/gradle/wrapper/gradle-wrapper.properties diff --git a/example/android/gradlew b/package/example/android/gradlew similarity index 100% rename from example/android/gradlew rename to package/example/android/gradlew diff --git a/example/android/gradlew.bat b/package/example/android/gradlew.bat similarity index 100% rename from example/android/gradlew.bat rename to package/example/android/gradlew.bat diff --git a/example/android/settings.gradle b/package/example/android/settings.gradle similarity index 100% rename from example/android/settings.gradle rename to package/example/android/settings.gradle diff --git a/example/app.json b/package/example/app.json similarity index 100% rename from example/app.json rename to package/example/app.json diff --git a/example/babel.config.js b/package/example/babel.config.js similarity index 100% rename from example/babel.config.js rename to package/example/babel.config.js diff --git a/example/clean.sh b/package/example/clean.sh similarity index 100% rename from example/clean.sh rename to package/example/clean.sh diff --git a/example/index.js b/package/example/index.js similarity index 100% rename from example/index.js rename to package/example/index.js diff --git a/example/ios/.swift-version b/package/example/ios/.swift-version similarity index 100% rename from example/ios/.swift-version rename to package/example/ios/.swift-version diff --git a/example/ios/.xcode.env b/package/example/ios/.xcode.env similarity index 100% rename from example/ios/.xcode.env rename to package/example/ios/.xcode.env diff --git a/example/ios/File.swift b/package/example/ios/File.swift similarity index 100% rename from example/ios/File.swift rename to package/example/ios/File.swift diff --git a/example/ios/Frame Processor Plugins/Example Plugin/ExampleFrameProcessorPlugin.m b/package/example/ios/Frame Processor Plugins/Example Plugin/ExampleFrameProcessorPlugin.m similarity index 100% rename from example/ios/Frame Processor Plugins/Example Plugin/ExampleFrameProcessorPlugin.m rename to package/example/ios/Frame Processor Plugins/Example Plugin/ExampleFrameProcessorPlugin.m diff --git a/example/ios/Gemfile b/package/example/ios/Gemfile similarity index 100% rename from example/ios/Gemfile rename to package/example/ios/Gemfile diff --git a/example/ios/Gemfile.lock b/package/example/ios/Gemfile.lock similarity index 100% rename from example/ios/Gemfile.lock rename to package/example/ios/Gemfile.lock diff --git a/example/ios/Podfile b/package/example/ios/Podfile similarity index 100% rename from example/ios/Podfile rename to package/example/ios/Podfile diff --git a/example/ios/Podfile.lock b/package/example/ios/Podfile.lock similarity index 100% rename from example/ios/Podfile.lock rename to package/example/ios/Podfile.lock diff --git a/example/ios/VisionCameraExample-Bridging-Header.h b/package/example/ios/VisionCameraExample-Bridging-Header.h similarity index 100% rename from example/ios/VisionCameraExample-Bridging-Header.h rename to package/example/ios/VisionCameraExample-Bridging-Header.h diff --git a/example/ios/VisionCameraExample.xcodeproj/project.pbxproj b/package/example/ios/VisionCameraExample.xcodeproj/project.pbxproj similarity index 100% rename from example/ios/VisionCameraExample.xcodeproj/project.pbxproj rename to package/example/ios/VisionCameraExample.xcodeproj/project.pbxproj diff --git a/example/ios/VisionCameraExample.xcodeproj/xcshareddata/xcschemes/VisionCameraExample.xcscheme b/package/example/ios/VisionCameraExample.xcodeproj/xcshareddata/xcschemes/VisionCameraExample.xcscheme similarity index 100% rename from example/ios/VisionCameraExample.xcodeproj/xcshareddata/xcschemes/VisionCameraExample.xcscheme rename to package/example/ios/VisionCameraExample.xcodeproj/xcshareddata/xcschemes/VisionCameraExample.xcscheme diff --git a/example/ios/VisionCameraExample.xcworkspace/contents.xcworkspacedata b/package/example/ios/VisionCameraExample.xcworkspace/contents.xcworkspacedata similarity index 100% rename from example/ios/VisionCameraExample.xcworkspace/contents.xcworkspacedata rename to package/example/ios/VisionCameraExample.xcworkspace/contents.xcworkspacedata diff --git a/example/ios/VisionCameraExample.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/package/example/ios/VisionCameraExample.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist similarity index 100% rename from example/ios/VisionCameraExample.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist rename to package/example/ios/VisionCameraExample.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist diff --git a/example/ios/VisionCameraExample/AppDelegate.h b/package/example/ios/VisionCameraExample/AppDelegate.h similarity index 100% rename from example/ios/VisionCameraExample/AppDelegate.h rename to package/example/ios/VisionCameraExample/AppDelegate.h diff --git a/example/ios/VisionCameraExample/AppDelegate.mm b/package/example/ios/VisionCameraExample/AppDelegate.mm similarity index 100% rename from example/ios/VisionCameraExample/AppDelegate.mm rename to package/example/ios/VisionCameraExample/AppDelegate.mm diff --git a/example/ios/VisionCameraExample/Images.xcassets/AppIcon.appiconset/1024.png b/package/example/ios/VisionCameraExample/Images.xcassets/AppIcon.appiconset/1024.png similarity index 100% rename from example/ios/VisionCameraExample/Images.xcassets/AppIcon.appiconset/1024.png rename to package/example/ios/VisionCameraExample/Images.xcassets/AppIcon.appiconset/1024.png diff --git a/example/ios/VisionCameraExample/Images.xcassets/AppIcon.appiconset/114.png b/package/example/ios/VisionCameraExample/Images.xcassets/AppIcon.appiconset/114.png similarity index 100% rename from example/ios/VisionCameraExample/Images.xcassets/AppIcon.appiconset/114.png rename to package/example/ios/VisionCameraExample/Images.xcassets/AppIcon.appiconset/114.png diff --git a/example/ios/VisionCameraExample/Images.xcassets/AppIcon.appiconset/120.png b/package/example/ios/VisionCameraExample/Images.xcassets/AppIcon.appiconset/120.png similarity index 100% rename from example/ios/VisionCameraExample/Images.xcassets/AppIcon.appiconset/120.png rename to package/example/ios/VisionCameraExample/Images.xcassets/AppIcon.appiconset/120.png diff --git a/example/ios/VisionCameraExample/Images.xcassets/AppIcon.appiconset/180.png b/package/example/ios/VisionCameraExample/Images.xcassets/AppIcon.appiconset/180.png similarity index 100% rename from example/ios/VisionCameraExample/Images.xcassets/AppIcon.appiconset/180.png rename to package/example/ios/VisionCameraExample/Images.xcassets/AppIcon.appiconset/180.png diff --git a/example/ios/VisionCameraExample/Images.xcassets/AppIcon.appiconset/29.png b/package/example/ios/VisionCameraExample/Images.xcassets/AppIcon.appiconset/29.png similarity index 100% rename from example/ios/VisionCameraExample/Images.xcassets/AppIcon.appiconset/29.png rename to package/example/ios/VisionCameraExample/Images.xcassets/AppIcon.appiconset/29.png diff --git a/example/ios/VisionCameraExample/Images.xcassets/AppIcon.appiconset/40.png b/package/example/ios/VisionCameraExample/Images.xcassets/AppIcon.appiconset/40.png similarity index 100% rename from example/ios/VisionCameraExample/Images.xcassets/AppIcon.appiconset/40.png rename to package/example/ios/VisionCameraExample/Images.xcassets/AppIcon.appiconset/40.png diff --git a/example/ios/VisionCameraExample/Images.xcassets/AppIcon.appiconset/57.png b/package/example/ios/VisionCameraExample/Images.xcassets/AppIcon.appiconset/57.png similarity index 100% rename from example/ios/VisionCameraExample/Images.xcassets/AppIcon.appiconset/57.png rename to package/example/ios/VisionCameraExample/Images.xcassets/AppIcon.appiconset/57.png diff --git a/example/ios/VisionCameraExample/Images.xcassets/AppIcon.appiconset/58.png b/package/example/ios/VisionCameraExample/Images.xcassets/AppIcon.appiconset/58.png similarity index 100% rename from example/ios/VisionCameraExample/Images.xcassets/AppIcon.appiconset/58.png rename to package/example/ios/VisionCameraExample/Images.xcassets/AppIcon.appiconset/58.png diff --git a/example/ios/VisionCameraExample/Images.xcassets/AppIcon.appiconset/60.png b/package/example/ios/VisionCameraExample/Images.xcassets/AppIcon.appiconset/60.png similarity index 100% rename from example/ios/VisionCameraExample/Images.xcassets/AppIcon.appiconset/60.png rename to package/example/ios/VisionCameraExample/Images.xcassets/AppIcon.appiconset/60.png diff --git a/example/ios/VisionCameraExample/Images.xcassets/AppIcon.appiconset/80.png b/package/example/ios/VisionCameraExample/Images.xcassets/AppIcon.appiconset/80.png similarity index 100% rename from example/ios/VisionCameraExample/Images.xcassets/AppIcon.appiconset/80.png rename to package/example/ios/VisionCameraExample/Images.xcassets/AppIcon.appiconset/80.png diff --git a/example/ios/VisionCameraExample/Images.xcassets/AppIcon.appiconset/87.png b/package/example/ios/VisionCameraExample/Images.xcassets/AppIcon.appiconset/87.png similarity index 100% rename from example/ios/VisionCameraExample/Images.xcassets/AppIcon.appiconset/87.png rename to package/example/ios/VisionCameraExample/Images.xcassets/AppIcon.appiconset/87.png diff --git a/example/ios/VisionCameraExample/Images.xcassets/AppIcon.appiconset/Contents.json b/package/example/ios/VisionCameraExample/Images.xcassets/AppIcon.appiconset/Contents.json similarity index 100% rename from example/ios/VisionCameraExample/Images.xcassets/AppIcon.appiconset/Contents.json rename to package/example/ios/VisionCameraExample/Images.xcassets/AppIcon.appiconset/Contents.json diff --git a/example/ios/VisionCameraExample/Images.xcassets/Contents.json b/package/example/ios/VisionCameraExample/Images.xcassets/Contents.json similarity index 100% rename from example/ios/VisionCameraExample/Images.xcassets/Contents.json rename to package/example/ios/VisionCameraExample/Images.xcassets/Contents.json diff --git a/example/ios/VisionCameraExample/Images.xcassets/shutter.imageset/Contents.json b/package/example/ios/VisionCameraExample/Images.xcassets/shutter.imageset/Contents.json similarity index 100% rename from example/ios/VisionCameraExample/Images.xcassets/shutter.imageset/Contents.json rename to package/example/ios/VisionCameraExample/Images.xcassets/shutter.imageset/Contents.json diff --git a/example/ios/VisionCameraExample/Images.xcassets/shutter.imageset/IMG_7966-1.jpg b/package/example/ios/VisionCameraExample/Images.xcassets/shutter.imageset/IMG_7966-1.jpg similarity index 100% rename from example/ios/VisionCameraExample/Images.xcassets/shutter.imageset/IMG_7966-1.jpg rename to package/example/ios/VisionCameraExample/Images.xcassets/shutter.imageset/IMG_7966-1.jpg diff --git a/example/ios/VisionCameraExample/Images.xcassets/shutter.imageset/IMG_7966-2.jpg b/package/example/ios/VisionCameraExample/Images.xcassets/shutter.imageset/IMG_7966-2.jpg similarity index 100% rename from example/ios/VisionCameraExample/Images.xcassets/shutter.imageset/IMG_7966-2.jpg rename to package/example/ios/VisionCameraExample/Images.xcassets/shutter.imageset/IMG_7966-2.jpg diff --git a/example/ios/VisionCameraExample/Images.xcassets/shutter.imageset/IMG_7966.jpg b/package/example/ios/VisionCameraExample/Images.xcassets/shutter.imageset/IMG_7966.jpg similarity index 100% rename from example/ios/VisionCameraExample/Images.xcassets/shutter.imageset/IMG_7966.jpg rename to package/example/ios/VisionCameraExample/Images.xcassets/shutter.imageset/IMG_7966.jpg diff --git a/example/ios/VisionCameraExample/Info.plist b/package/example/ios/VisionCameraExample/Info.plist similarity index 100% rename from example/ios/VisionCameraExample/Info.plist rename to package/example/ios/VisionCameraExample/Info.plist diff --git a/example/ios/VisionCameraExample/LaunchScreen.storyboard b/package/example/ios/VisionCameraExample/LaunchScreen.storyboard similarity index 100% rename from example/ios/VisionCameraExample/LaunchScreen.storyboard rename to package/example/ios/VisionCameraExample/LaunchScreen.storyboard diff --git a/example/ios/VisionCameraExample/main.m b/package/example/ios/VisionCameraExample/main.m similarity index 100% rename from example/ios/VisionCameraExample/main.m rename to package/example/ios/VisionCameraExample/main.m diff --git a/example/metro.config.js b/package/example/metro.config.js similarity index 100% rename from example/metro.config.js rename to package/example/metro.config.js diff --git a/example/package.json b/package/example/package.json similarity index 100% rename from example/package.json rename to package/example/package.json diff --git a/example/src/App.tsx b/package/example/src/App.tsx similarity index 100% rename from example/src/App.tsx rename to package/example/src/App.tsx diff --git a/example/src/CameraPage.tsx b/package/example/src/CameraPage.tsx similarity index 100% rename from example/src/CameraPage.tsx rename to package/example/src/CameraPage.tsx diff --git a/example/src/Constants.ts b/package/example/src/Constants.ts similarity index 100% rename from example/src/Constants.ts rename to package/example/src/Constants.ts diff --git a/example/src/MediaPage.tsx b/package/example/src/MediaPage.tsx similarity index 100% rename from example/src/MediaPage.tsx rename to package/example/src/MediaPage.tsx diff --git a/example/src/PermissionsPage.tsx b/package/example/src/PermissionsPage.tsx similarity index 100% rename from example/src/PermissionsPage.tsx rename to package/example/src/PermissionsPage.tsx diff --git a/example/src/Routes.ts b/package/example/src/Routes.ts similarity index 100% rename from example/src/Routes.ts rename to package/example/src/Routes.ts diff --git a/example/src/frame-processors/ExamplePlugin.ts b/package/example/src/frame-processors/ExamplePlugin.ts similarity index 100% rename from example/src/frame-processors/ExamplePlugin.ts rename to package/example/src/frame-processors/ExamplePlugin.ts diff --git a/example/src/hooks/useIsForeground.ts b/package/example/src/hooks/useIsForeground.ts similarity index 100% rename from example/src/hooks/useIsForeground.ts rename to package/example/src/hooks/useIsForeground.ts diff --git a/example/src/views/CaptureButton.tsx b/package/example/src/views/CaptureButton.tsx similarity index 100% rename from example/src/views/CaptureButton.tsx rename to package/example/src/views/CaptureButton.tsx diff --git a/example/src/views/StatusBarBlurBackground.tsx b/package/example/src/views/StatusBarBlurBackground.tsx similarity index 100% rename from example/src/views/StatusBarBlurBackground.tsx rename to package/example/src/views/StatusBarBlurBackground.tsx diff --git a/example/tsconfig.json b/package/example/tsconfig.json similarity index 100% rename from example/tsconfig.json rename to package/example/tsconfig.json diff --git a/example/yarn.lock b/package/example/yarn.lock similarity index 100% rename from example/yarn.lock rename to package/example/yarn.lock diff --git a/ios/.swift-version b/package/ios/.swift-version similarity index 100% rename from ios/.swift-version rename to package/ios/.swift-version diff --git a/ios/.swiftformat b/package/ios/.swiftformat similarity index 100% rename from ios/.swiftformat rename to package/ios/.swiftformat diff --git a/ios/.swiftlint.yml b/package/ios/.swiftlint.yml similarity index 100% rename from ios/.swiftlint.yml rename to package/ios/.swiftlint.yml diff --git a/ios/CameraBridge.h b/package/ios/CameraBridge.h similarity index 100% rename from ios/CameraBridge.h rename to package/ios/CameraBridge.h diff --git a/ios/CameraError.swift b/package/ios/CameraError.swift similarity index 100% rename from ios/CameraError.swift rename to package/ios/CameraError.swift diff --git a/ios/CameraQueues.swift b/package/ios/CameraQueues.swift similarity index 100% rename from ios/CameraQueues.swift rename to package/ios/CameraQueues.swift diff --git a/ios/CameraView+AVAudioSession.swift b/package/ios/CameraView+AVAudioSession.swift similarity index 100% rename from ios/CameraView+AVAudioSession.swift rename to package/ios/CameraView+AVAudioSession.swift diff --git a/ios/CameraView+AVCaptureSession.swift b/package/ios/CameraView+AVCaptureSession.swift similarity index 100% rename from ios/CameraView+AVCaptureSession.swift rename to package/ios/CameraView+AVCaptureSession.swift diff --git a/ios/CameraView+Focus.swift b/package/ios/CameraView+Focus.swift similarity index 100% rename from ios/CameraView+Focus.swift rename to package/ios/CameraView+Focus.swift diff --git a/ios/CameraView+Orientation.swift b/package/ios/CameraView+Orientation.swift similarity index 100% rename from ios/CameraView+Orientation.swift rename to package/ios/CameraView+Orientation.swift diff --git a/ios/CameraView+RecordVideo.swift b/package/ios/CameraView+RecordVideo.swift similarity index 100% rename from ios/CameraView+RecordVideo.swift rename to package/ios/CameraView+RecordVideo.swift diff --git a/ios/CameraView+TakePhoto.swift b/package/ios/CameraView+TakePhoto.swift similarity index 100% rename from ios/CameraView+TakePhoto.swift rename to package/ios/CameraView+TakePhoto.swift diff --git a/ios/CameraView+Torch.swift b/package/ios/CameraView+Torch.swift similarity index 100% rename from ios/CameraView+Torch.swift rename to package/ios/CameraView+Torch.swift diff --git a/ios/CameraView+Zoom.swift b/package/ios/CameraView+Zoom.swift similarity index 100% rename from ios/CameraView+Zoom.swift rename to package/ios/CameraView+Zoom.swift diff --git a/ios/CameraView.swift b/package/ios/CameraView.swift similarity index 100% rename from ios/CameraView.swift rename to package/ios/CameraView.swift diff --git a/ios/CameraViewManager.m b/package/ios/CameraViewManager.m similarity index 100% rename from ios/CameraViewManager.m rename to package/ios/CameraViewManager.m diff --git a/ios/CameraViewManager.swift b/package/ios/CameraViewManager.swift similarity index 100% rename from ios/CameraViewManager.swift rename to package/ios/CameraViewManager.swift diff --git a/ios/Extensions/AVAssetWriterInputPixelBufferAdaptor+initWithVideoSettings.swift b/package/ios/Extensions/AVAssetWriterInputPixelBufferAdaptor+initWithVideoSettings.swift similarity index 100% rename from ios/Extensions/AVAssetWriterInputPixelBufferAdaptor+initWithVideoSettings.swift rename to package/ios/Extensions/AVAssetWriterInputPixelBufferAdaptor+initWithVideoSettings.swift diff --git a/ios/Extensions/AVAudioSession+trySetAllowHaptics.swift b/package/ios/Extensions/AVAudioSession+trySetAllowHaptics.swift similarity index 100% rename from ios/Extensions/AVAudioSession+trySetAllowHaptics.swift rename to package/ios/Extensions/AVAudioSession+trySetAllowHaptics.swift diff --git a/ios/Extensions/AVAudioSession+updateCategory.swift b/package/ios/Extensions/AVAudioSession+updateCategory.swift similarity index 100% rename from ios/Extensions/AVAudioSession+updateCategory.swift rename to package/ios/Extensions/AVAudioSession+updateCategory.swift diff --git a/ios/Extensions/AVCaptureConnection+setInterfaceOrientation.swift b/package/ios/Extensions/AVCaptureConnection+setInterfaceOrientation.swift similarity index 100% rename from ios/Extensions/AVCaptureConnection+setInterfaceOrientation.swift rename to package/ios/Extensions/AVCaptureConnection+setInterfaceOrientation.swift diff --git a/ios/Extensions/AVCaptureDevice+isMultiCam.swift b/package/ios/Extensions/AVCaptureDevice+isMultiCam.swift similarity index 100% rename from ios/Extensions/AVCaptureDevice+isMultiCam.swift rename to package/ios/Extensions/AVCaptureDevice+isMultiCam.swift diff --git a/ios/Extensions/AVCaptureDevice+neutralZoom.swift b/package/ios/Extensions/AVCaptureDevice+neutralZoom.swift similarity index 100% rename from ios/Extensions/AVCaptureDevice+neutralZoom.swift rename to package/ios/Extensions/AVCaptureDevice+neutralZoom.swift diff --git a/ios/Extensions/AVCaptureDevice+physicalDevices.swift b/package/ios/Extensions/AVCaptureDevice+physicalDevices.swift similarity index 100% rename from ios/Extensions/AVCaptureDevice+physicalDevices.swift rename to package/ios/Extensions/AVCaptureDevice+physicalDevices.swift diff --git a/ios/Extensions/AVCaptureDevice.Format+isBetterThan.swift b/package/ios/Extensions/AVCaptureDevice.Format+isBetterThan.swift similarity index 100% rename from ios/Extensions/AVCaptureDevice.Format+isBetterThan.swift rename to package/ios/Extensions/AVCaptureDevice.Format+isBetterThan.swift diff --git a/ios/Extensions/AVCaptureDevice.Format+matchesFilter.swift b/package/ios/Extensions/AVCaptureDevice.Format+matchesFilter.swift similarity index 100% rename from ios/Extensions/AVCaptureDevice.Format+matchesFilter.swift rename to package/ios/Extensions/AVCaptureDevice.Format+matchesFilter.swift diff --git a/ios/Extensions/AVCaptureDevice.Format+toDictionary.swift b/package/ios/Extensions/AVCaptureDevice.Format+toDictionary.swift similarity index 100% rename from ios/Extensions/AVCaptureDevice.Format+toDictionary.swift rename to package/ios/Extensions/AVCaptureDevice.Format+toDictionary.swift diff --git a/ios/Extensions/AVCaptureDevice.Format+videoDimensions.swift b/package/ios/Extensions/AVCaptureDevice.Format+videoDimensions.swift similarity index 100% rename from ios/Extensions/AVCaptureDevice.Format+videoDimensions.swift rename to package/ios/Extensions/AVCaptureDevice.Format+videoDimensions.swift diff --git a/ios/Extensions/AVCapturePhotoOutput+mirror.swift b/package/ios/Extensions/AVCapturePhotoOutput+mirror.swift similarity index 100% rename from ios/Extensions/AVCapturePhotoOutput+mirror.swift rename to package/ios/Extensions/AVCapturePhotoOutput+mirror.swift diff --git a/ios/Extensions/AVCaptureSession+setVideoStabilizationMode.swift b/package/ios/Extensions/AVCaptureSession+setVideoStabilizationMode.swift similarity index 100% rename from ios/Extensions/AVCaptureSession+setVideoStabilizationMode.swift rename to package/ios/Extensions/AVCaptureSession+setVideoStabilizationMode.swift diff --git a/ios/Extensions/AVFrameRateRange+includes.swift b/package/ios/Extensions/AVFrameRateRange+includes.swift similarity index 100% rename from ios/Extensions/AVFrameRateRange+includes.swift rename to package/ios/Extensions/AVFrameRateRange+includes.swift diff --git a/ios/Extensions/Collection+safe.swift b/package/ios/Extensions/Collection+safe.swift similarity index 100% rename from ios/Extensions/Collection+safe.swift rename to package/ios/Extensions/Collection+safe.swift diff --git a/ios/Extensions/FourCharCode+toString.swift b/package/ios/Extensions/FourCharCode+toString.swift similarity index 100% rename from ios/Extensions/FourCharCode+toString.swift rename to package/ios/Extensions/FourCharCode+toString.swift diff --git a/ios/Frame Processor/Frame.h b/package/ios/Frame Processor/Frame.h similarity index 100% rename from ios/Frame Processor/Frame.h rename to package/ios/Frame Processor/Frame.h diff --git a/ios/Frame Processor/Frame.m b/package/ios/Frame Processor/Frame.m similarity index 100% rename from ios/Frame Processor/Frame.m rename to package/ios/Frame Processor/Frame.m diff --git a/ios/Frame Processor/FrameHostObject.h b/package/ios/Frame Processor/FrameHostObject.h similarity index 100% rename from ios/Frame Processor/FrameHostObject.h rename to package/ios/Frame Processor/FrameHostObject.h diff --git a/ios/Frame Processor/FrameHostObject.mm b/package/ios/Frame Processor/FrameHostObject.mm similarity index 100% rename from ios/Frame Processor/FrameHostObject.mm rename to package/ios/Frame Processor/FrameHostObject.mm diff --git a/ios/Frame Processor/FrameProcessor.h b/package/ios/Frame Processor/FrameProcessor.h similarity index 100% rename from ios/Frame Processor/FrameProcessor.h rename to package/ios/Frame Processor/FrameProcessor.h diff --git a/ios/Frame Processor/FrameProcessor.mm b/package/ios/Frame Processor/FrameProcessor.mm similarity index 100% rename from ios/Frame Processor/FrameProcessor.mm rename to package/ios/Frame Processor/FrameProcessor.mm diff --git a/ios/Frame Processor/FrameProcessorPlugin.h b/package/ios/Frame Processor/FrameProcessorPlugin.h similarity index 100% rename from ios/Frame Processor/FrameProcessorPlugin.h rename to package/ios/Frame Processor/FrameProcessorPlugin.h diff --git a/ios/Frame Processor/FrameProcessorPlugin.m b/package/ios/Frame Processor/FrameProcessorPlugin.m similarity index 100% rename from ios/Frame Processor/FrameProcessorPlugin.m rename to package/ios/Frame Processor/FrameProcessorPlugin.m diff --git a/ios/Frame Processor/FrameProcessorPluginHostObject.h b/package/ios/Frame Processor/FrameProcessorPluginHostObject.h similarity index 100% rename from ios/Frame Processor/FrameProcessorPluginHostObject.h rename to package/ios/Frame Processor/FrameProcessorPluginHostObject.h diff --git a/ios/Frame Processor/FrameProcessorPluginHostObject.mm b/package/ios/Frame Processor/FrameProcessorPluginHostObject.mm similarity index 100% rename from ios/Frame Processor/FrameProcessorPluginHostObject.mm rename to package/ios/Frame Processor/FrameProcessorPluginHostObject.mm diff --git a/ios/Frame Processor/FrameProcessorPluginRegistry.h b/package/ios/Frame Processor/FrameProcessorPluginRegistry.h similarity index 100% rename from ios/Frame Processor/FrameProcessorPluginRegistry.h rename to package/ios/Frame Processor/FrameProcessorPluginRegistry.h diff --git a/ios/Frame Processor/FrameProcessorPluginRegistry.m b/package/ios/Frame Processor/FrameProcessorPluginRegistry.m similarity index 100% rename from ios/Frame Processor/FrameProcessorPluginRegistry.m rename to package/ios/Frame Processor/FrameProcessorPluginRegistry.m diff --git a/ios/Frame Processor/JSINSObjectConversion.h b/package/ios/Frame Processor/JSINSObjectConversion.h similarity index 100% rename from ios/Frame Processor/JSINSObjectConversion.h rename to package/ios/Frame Processor/JSINSObjectConversion.h diff --git a/ios/Frame Processor/JSINSObjectConversion.mm b/package/ios/Frame Processor/JSINSObjectConversion.mm similarity index 100% rename from ios/Frame Processor/JSINSObjectConversion.mm rename to package/ios/Frame Processor/JSINSObjectConversion.mm diff --git a/ios/Frame Processor/VisionCameraProxy.h b/package/ios/Frame Processor/VisionCameraProxy.h similarity index 100% rename from ios/Frame Processor/VisionCameraProxy.h rename to package/ios/Frame Processor/VisionCameraProxy.h diff --git a/ios/Frame Processor/VisionCameraProxy.mm b/package/ios/Frame Processor/VisionCameraProxy.mm similarity index 100% rename from ios/Frame Processor/VisionCameraProxy.mm rename to package/ios/Frame Processor/VisionCameraProxy.mm diff --git a/ios/Parsers/AVAssetWriter.Status+descriptor.swift b/package/ios/Parsers/AVAssetWriter.Status+descriptor.swift similarity index 100% rename from ios/Parsers/AVAssetWriter.Status+descriptor.swift rename to package/ios/Parsers/AVAssetWriter.Status+descriptor.swift diff --git a/ios/Parsers/AVAuthorizationStatus+descriptor.swift b/package/ios/Parsers/AVAuthorizationStatus+descriptor.swift similarity index 100% rename from ios/Parsers/AVAuthorizationStatus+descriptor.swift rename to package/ios/Parsers/AVAuthorizationStatus+descriptor.swift diff --git a/ios/Parsers/AVCaptureDevice.DeviceType+descriptor.swift b/package/ios/Parsers/AVCaptureDevice.DeviceType+descriptor.swift similarity index 100% rename from ios/Parsers/AVCaptureDevice.DeviceType+descriptor.swift rename to package/ios/Parsers/AVCaptureDevice.DeviceType+descriptor.swift diff --git a/ios/Parsers/AVCaptureDevice.FlashMode+descriptor.swift b/package/ios/Parsers/AVCaptureDevice.FlashMode+descriptor.swift similarity index 100% rename from ios/Parsers/AVCaptureDevice.FlashMode+descriptor.swift rename to package/ios/Parsers/AVCaptureDevice.FlashMode+descriptor.swift diff --git a/ios/Parsers/AVCaptureDevice.Format.AutoFocusSystem+descriptor.swift b/package/ios/Parsers/AVCaptureDevice.Format.AutoFocusSystem+descriptor.swift similarity index 100% rename from ios/Parsers/AVCaptureDevice.Format.AutoFocusSystem+descriptor.swift rename to package/ios/Parsers/AVCaptureDevice.Format.AutoFocusSystem+descriptor.swift diff --git a/ios/Parsers/AVCaptureDevice.Position+descriptor.swift b/package/ios/Parsers/AVCaptureDevice.Position+descriptor.swift similarity index 100% rename from ios/Parsers/AVCaptureDevice.Position+descriptor.swift rename to package/ios/Parsers/AVCaptureDevice.Position+descriptor.swift diff --git a/ios/Parsers/AVCaptureDevice.TorchMode+descriptor.swift b/package/ios/Parsers/AVCaptureDevice.TorchMode+descriptor.swift similarity index 100% rename from ios/Parsers/AVCaptureDevice.TorchMode+descriptor.swift rename to package/ios/Parsers/AVCaptureDevice.TorchMode+descriptor.swift diff --git a/ios/Parsers/AVCapturePhotoOutput.QualityPrioritization+descriptor.swift b/package/ios/Parsers/AVCapturePhotoOutput.QualityPrioritization+descriptor.swift similarity index 100% rename from ios/Parsers/AVCapturePhotoOutput.QualityPrioritization+descriptor.swift rename to package/ios/Parsers/AVCapturePhotoOutput.QualityPrioritization+descriptor.swift diff --git a/ios/Parsers/AVCaptureVideoStabilizationMode+descriptor.swift b/package/ios/Parsers/AVCaptureVideoStabilizationMode+descriptor.swift similarity index 100% rename from ios/Parsers/AVCaptureVideoStabilizationMode+descriptor.swift rename to package/ios/Parsers/AVCaptureVideoStabilizationMode+descriptor.swift diff --git a/ios/Parsers/AVFileType+descriptor.swift b/package/ios/Parsers/AVFileType+descriptor.swift similarity index 100% rename from ios/Parsers/AVFileType+descriptor.swift rename to package/ios/Parsers/AVFileType+descriptor.swift diff --git a/ios/Parsers/AVVideoCodecType+descriptor.swift b/package/ios/Parsers/AVVideoCodecType+descriptor.swift similarity index 100% rename from ios/Parsers/AVVideoCodecType+descriptor.swift rename to package/ios/Parsers/AVVideoCodecType+descriptor.swift diff --git a/ios/Parsers/EnumParserError.swift b/package/ios/Parsers/EnumParserError.swift similarity index 100% rename from ios/Parsers/EnumParserError.swift rename to package/ios/Parsers/EnumParserError.swift diff --git a/ios/Parsers/PixelFormat.swift b/package/ios/Parsers/PixelFormat.swift similarity index 100% rename from ios/Parsers/PixelFormat.swift rename to package/ios/Parsers/PixelFormat.swift diff --git a/ios/Parsers/UIInterfaceOrientation+descriptor.swift b/package/ios/Parsers/UIInterfaceOrientation+descriptor.swift similarity index 100% rename from ios/Parsers/UIInterfaceOrientation+descriptor.swift rename to package/ios/Parsers/UIInterfaceOrientation+descriptor.swift diff --git a/ios/PhotoCaptureDelegate.swift b/package/ios/PhotoCaptureDelegate.swift similarity index 100% rename from ios/PhotoCaptureDelegate.swift rename to package/ios/PhotoCaptureDelegate.swift diff --git a/ios/PreviewView.swift b/package/ios/PreviewView.swift similarity index 100% rename from ios/PreviewView.swift rename to package/ios/PreviewView.swift diff --git a/ios/README.md b/package/ios/README.md similarity index 100% rename from ios/README.md rename to package/ios/README.md diff --git a/ios/React Utils/Callback.swift b/package/ios/React Utils/Callback.swift similarity index 100% rename from ios/React Utils/Callback.swift rename to package/ios/React Utils/Callback.swift diff --git a/ios/React Utils/MakeReactError.swift b/package/ios/React Utils/MakeReactError.swift similarity index 100% rename from ios/React Utils/MakeReactError.swift rename to package/ios/React Utils/MakeReactError.swift diff --git a/ios/React Utils/Promise.swift b/package/ios/React Utils/Promise.swift similarity index 100% rename from ios/React Utils/Promise.swift rename to package/ios/React Utils/Promise.swift diff --git a/ios/React Utils/ReactLogger.swift b/package/ios/React Utils/ReactLogger.swift similarity index 100% rename from ios/React Utils/ReactLogger.swift rename to package/ios/React Utils/ReactLogger.swift diff --git a/ios/RecordingSession.swift b/package/ios/RecordingSession.swift similarity index 100% rename from ios/RecordingSession.swift rename to package/ios/RecordingSession.swift diff --git a/ios/VisionCamera.xcodeproj/project.pbxproj b/package/ios/VisionCamera.xcodeproj/project.pbxproj similarity index 100% rename from ios/VisionCamera.xcodeproj/project.pbxproj rename to package/ios/VisionCamera.xcodeproj/project.pbxproj diff --git a/package.json b/package/package.json similarity index 100% rename from package.json rename to package/package.json diff --git a/scripts/bootstrap.js b/package/scripts/bootstrap.js similarity index 100% rename from scripts/bootstrap.js rename to package/scripts/bootstrap.js diff --git a/scripts/check-all.sh b/package/scripts/check-all.sh similarity index 100% rename from scripts/check-all.sh rename to package/scripts/check-all.sh diff --git a/scripts/clang-format.sh b/package/scripts/clang-format.sh similarity index 100% rename from scripts/clang-format.sh rename to package/scripts/clang-format.sh diff --git a/scripts/clean-android.sh b/package/scripts/clean-android.sh similarity index 100% rename from scripts/clean-android.sh rename to package/scripts/clean-android.sh diff --git a/scripts/clean-ios.sh b/package/scripts/clean-ios.sh similarity index 100% rename from scripts/clean-ios.sh rename to package/scripts/clean-ios.sh diff --git a/scripts/clean-js.sh b/package/scripts/clean-js.sh similarity index 100% rename from scripts/clean-js.sh rename to package/scripts/clean-js.sh diff --git a/scripts/ktlint.sh b/package/scripts/ktlint.sh similarity index 100% rename from scripts/ktlint.sh rename to package/scripts/ktlint.sh diff --git a/scripts/swiftformat.sh b/package/scripts/swiftformat.sh similarity index 100% rename from scripts/swiftformat.sh rename to package/scripts/swiftformat.sh diff --git a/scripts/swiftlint.sh b/package/scripts/swiftlint.sh similarity index 100% rename from scripts/swiftlint.sh rename to package/scripts/swiftlint.sh diff --git a/src/Camera.tsx b/package/src/Camera.tsx similarity index 100% rename from src/Camera.tsx rename to package/src/Camera.tsx diff --git a/src/CameraDevice.ts b/package/src/CameraDevice.ts similarity index 100% rename from src/CameraDevice.ts rename to package/src/CameraDevice.ts diff --git a/src/CameraError.ts b/package/src/CameraError.ts similarity index 100% rename from src/CameraError.ts rename to package/src/CameraError.ts diff --git a/src/CameraPosition.ts b/package/src/CameraPosition.ts similarity index 100% rename from src/CameraPosition.ts rename to package/src/CameraPosition.ts diff --git a/src/CameraProps.ts b/package/src/CameraProps.ts similarity index 100% rename from src/CameraProps.ts rename to package/src/CameraProps.ts diff --git a/src/Frame.ts b/package/src/Frame.ts similarity index 100% rename from src/Frame.ts rename to package/src/Frame.ts diff --git a/src/FrameProcessorPlugins.ts b/package/src/FrameProcessorPlugins.ts similarity index 100% rename from src/FrameProcessorPlugins.ts rename to package/src/FrameProcessorPlugins.ts diff --git a/src/JSIHelper.ts b/package/src/JSIHelper.ts similarity index 100% rename from src/JSIHelper.ts rename to package/src/JSIHelper.ts diff --git a/src/NativeCameraModule.ts b/package/src/NativeCameraModule.ts similarity index 100% rename from src/NativeCameraModule.ts rename to package/src/NativeCameraModule.ts diff --git a/src/Orientation.ts b/package/src/Orientation.ts similarity index 100% rename from src/Orientation.ts rename to package/src/Orientation.ts diff --git a/src/PhotoFile.ts b/package/src/PhotoFile.ts similarity index 100% rename from src/PhotoFile.ts rename to package/src/PhotoFile.ts diff --git a/src/PixelFormat.ts b/package/src/PixelFormat.ts similarity index 100% rename from src/PixelFormat.ts rename to package/src/PixelFormat.ts diff --git a/src/Point.ts b/package/src/Point.ts similarity index 100% rename from src/Point.ts rename to package/src/Point.ts diff --git a/src/TemporaryFile.ts b/package/src/TemporaryFile.ts similarity index 100% rename from src/TemporaryFile.ts rename to package/src/TemporaryFile.ts diff --git a/src/VideoFile.ts b/package/src/VideoFile.ts similarity index 100% rename from src/VideoFile.ts rename to package/src/VideoFile.ts diff --git a/src/expo-plugin/withDisableFrameProcessorsAndroid.ts b/package/src/expo-plugin/withDisableFrameProcessorsAndroid.ts similarity index 100% rename from src/expo-plugin/withDisableFrameProcessorsAndroid.ts rename to package/src/expo-plugin/withDisableFrameProcessorsAndroid.ts diff --git a/src/expo-plugin/withDisableFrameProcessorsIOS.ts b/package/src/expo-plugin/withDisableFrameProcessorsIOS.ts similarity index 100% rename from src/expo-plugin/withDisableFrameProcessorsIOS.ts rename to package/src/expo-plugin/withDisableFrameProcessorsIOS.ts diff --git a/src/expo-plugin/withVisionCamera.ts b/package/src/expo-plugin/withVisionCamera.ts similarity index 100% rename from src/expo-plugin/withVisionCamera.ts rename to package/src/expo-plugin/withVisionCamera.ts diff --git a/src/hooks/useCameraDevices.ts b/package/src/hooks/useCameraDevices.ts similarity index 100% rename from src/hooks/useCameraDevices.ts rename to package/src/hooks/useCameraDevices.ts diff --git a/src/hooks/useCameraFormat.ts b/package/src/hooks/useCameraFormat.ts similarity index 100% rename from src/hooks/useCameraFormat.ts rename to package/src/hooks/useCameraFormat.ts diff --git a/src/hooks/useFrameProcessor.ts b/package/src/hooks/useFrameProcessor.ts similarity index 100% rename from src/hooks/useFrameProcessor.ts rename to package/src/hooks/useFrameProcessor.ts diff --git a/src/index.ts b/package/src/index.ts similarity index 100% rename from src/index.ts rename to package/src/index.ts diff --git a/src/utils/FormatFilter.ts b/package/src/utils/FormatFilter.ts similarity index 100% rename from src/utils/FormatFilter.ts rename to package/src/utils/FormatFilter.ts diff --git a/tsconfig.json b/package/tsconfig.json similarity index 100% rename from tsconfig.json rename to package/tsconfig.json diff --git a/yarn.lock b/package/yarn.lock similarity index 100% rename from yarn.lock rename to package/yarn.lock