Release 3.9.0
3.9.0 (2024-02-16)
'tis a big one 😳 - VisionCamera 3.9.0 brings A TON of exciting new features :
👉 focus(...) for Android 👆
👉 flash for Android 📸
👉 enableFpsGraph for Android 📈
👉 enableGpuBuffers for Android 🔥
👉 A fully rewritten CameraCaptureSession to fix various blackscreen issues on Android 🚀
👉 A fully rewritten PreviewView to fix stretching issues on Android 🖼️
👉 AE/AF/AWB pre-capture focus for better quality photos on Android 📷
👉 Faster photo capture with qualityPrioritization options (speed, balanced, quality) 🏃
👉 Threading and Concurrency optimizations for faster Camera startup and switching speed 🧵
👉 Various issues fixed (maxImages have already been acquired, NullPointerException, Invalid PixelFormat, CameraDevice was already closed, ...) 💪
Full changelog:
✨ Features
- Flash for Android 🥳📸 (#2558) (37398cc)
- Implement
focus()on Android (#2523) (fb1d82a) - Create persistent
CaptureSessionto avoid any blackscreen issues or errors (#2494) (5acc64e) - Add FPS Counter to Android (
enableFpsGraph) (#2460) (9089014) - Configures capture options with
qualityPrioritizationflags to shoot photos faster (*_MODE_FAST) (#2558) (37398cc) - Add
enableGpuBuffersproperty (#2557) (1a0bd8f), closes #2555 - Synchronize
Frameproperly (#2501) (d8c95c9) - Add
contexttoVisionCameraProxy(#2545) (24f43ef) - Allow focus calls to be cancelable (#2567) (4168d8f)
- Bump
org.jetbrains.kotlinx:kotlinx-coroutines-androidfrom 1.5.2 to 1.7.3 (#2467) (fb96d00) - Use
yuvby default if nopixelFormatis set (#2441) (11eb1f6)
💨 Performance Improvements
- Use existing
cameraQueueinstead of yet another Thread (#2459) (8c5b603) - Allow skipping pre-capture sequence if already focused (#2561) (a7701c8)
- Use GPU/CPU optimized
ImageReaders when possible (#2488) (f896831) - Fix double configuration flicker on fast device change (#2537) (b3a8827)
🐛 Bug Fixes
- Fix PreviewView being stretched (#2519) (3192f5e) <-- this is a big one! 🥳
- Fix
zoomnot resetting in example app (395ee7a) - Fix photo not saving in example app on Android 13+ (#2522) (a4e241a)
- Catch
insufficient-storageerrors (#2422) (b1fa065) - Enable
processNestedWorkletsto fixrunAsyncin example (#2449) (587f2b1) - Expose auto-focus system for Android (#2455) (b5eb01b)
- Fix
maxImages have been acquirederror in Frame Processor (#2430) (7e2889c) - Fix
NullPointerExceptionininitFrameProcessorPluginif plugin is not found (#2454) (02bc8a9) - Fix
NullPointerExceptioninVideoPipeline.removeRecordingSessionOutputSurface(#2453) (bdbcf05) - Fix
pixelFormatbeingnativewhen FP is set (#2450) (d64fc08) - Fix
prioritybeing ignored in some Format filters (#2456) (d9a3011) - Fix
SharedArrayJSI constructor allocating a new array instead of wrapping (#2444) (c911d25) - Fix
Unable to retrieve jni environment. Is the thread attached?errors by usingjni::ThreadScope(#2457) (33e2adc) - Fix Android C++ SharedArray logs (bc6f954)
- Fix crash in
toArrayBuffer()by properly acquiring a reference onAHardwareBuffer*(#2490) (ae75e22) - Fix HostObject destructors to make sure a JNI Environment is set up (#2462) (5f75b9e)
- Prevent phone from going to sleep if Camera is active (#2421) (a739ca1)
- Properly check
HardwareBufferusage flags before setting them (#2488) (f896831) - Refresh Permissions on AppState change (#2420) (97684af)
- Remove unneeded
synchronizedkeyword (f400487) - remove yarn in gitignore (5c5d629)
- Use
ThreadScope::WithClassLoaderto also load custom JNI Types (#2461) (9e12975) - Add extra sanity-checks for
CaptureRequest(#2571) (b105de0) - Fix nullable props (#2573) (bda43d3)
- Replace deprecated
RCTEventEmitterwithUIManager(#2569) (57c6431) - Fix
minFocusDistancebeingNaNon some emulators (e95264f) - Properly type Format
Templates(#2499) (cd5fdd4) - Check if session is still valid before resetting AF after focus (#2550) (b7e24c4)
- Fix "Invalid pixel format 35" HardwareBuffer crash (#2547) (a2a2e94)
- Fix
java.lang.NoSuchMethodErrorinFrameProcessorinitializer (#2546) (1011c3f) - Fix 60 FPS crashing on some Samsungs (#2556) (4786885)
- Fix VideoPipeline crash on Samsung (Disable
USAGE_GPU_SAMPLED_IMAGEImageReader) (#2555) (ad33dd9) - Return after configure error (14daaaa)
- Use
acquireLatestImageinstead ofacquireNextImagefor CodeScanner (#2549) (ec7ce36) - Fix
PreviewViewstretching on Android (now finally a real fix) (#2564) (5df5ca9) - Take Orientation into account for
PreviewView(#2565) (83c0184) - Fix
Session has been closed; further changes are illegalerror by usingtryStopRepeating()(#2568) (129e21f) - Move PreviewView into SurfaceView to make it simpler (#2566) (bcd1264)
📚 Documentation
- New Frame Processor Plugins docs (#2434) (4041ee8)
- Use SVG PlayStore Button (aad7d2b)
- Be more explicit about
videoHeight/videoWidth(97168c6) - Be more explicit about video + preview link and add aspect ratio (14554fa)
- Add
react-native-vision-camera-face-detectorto the FP plugin list (#2534) (0ed3aed)