diff --git a/android/src/main/cpp/JSIJNIConversion.cpp b/android/src/main/cpp/JSIJNIConversion.cpp index 4fcb7e6..a3a0d70 100644 --- a/android/src/main/cpp/JSIJNIConversion.cpp +++ b/android/src/main/cpp/JSIJNIConversion.cpp @@ -11,6 +11,7 @@ #include #include +#include #include #include @@ -179,6 +180,14 @@ jsi::Value JSIJNIConversion::convertJNIObjectToJSIValue(jsi::Runtime &runtime, c auto hashMap = toHashMapFunc(object.get()); return convertJNIObjectToJSIValue(runtime, hashMap); + } else if (object->isInstanceOf(JImageProxy::javaClassStatic())) { + // ImageProxy + + auto frame = static_ref_cast(object); + + // box into HostObject + auto hostObject = std::make_shared(frame); + return jsi::Object::createFromHostObject(runtime, hostObject); } auto type = object->getClass()->toString(); diff --git a/example/src/PermissionsPage.tsx b/example/src/PermissionsPage.tsx index 78ee320..b2e7af6 100644 --- a/example/src/PermissionsPage.tsx +++ b/example/src/PermissionsPage.tsx @@ -44,7 +44,7 @@ export function PermissionsPage({ navigation }: Props): React.ReactElement { {cameraPermissionStatus !== 'authorized' && ( - Vision Camera needs Camera permission. + Vision Camera needs Camera permission.{' '} Grant @@ -52,7 +52,7 @@ export function PermissionsPage({ navigation }: Props): React.ReactElement { )} {microphonePermissionStatus !== 'authorized' && ( - Vision Camera needs Microphone permission. + Vision Camera needs Microphone permission.{' '} Grant