Commit Graph

208 Commits

Author SHA1 Message Date
Marcos Rodriguez Vélez
3193427143
fix camera orientation for Mac Catalyst 2025-02-27 20:04:03 -04:00
Marcos Rodriguez Velez
1e1921223b add mac catalyst support 2025-02-25 23:08:14 -04:00
Seph Soliman
2376770cf6
Merge branch 'master' into @wolewicki/add-new-arch 2024-11-14 13:46:25 -08:00
Seph Soliman
ace123eefa Added maxPhotoQualityPrioritization for iOS
Allows a massive capture speed-up of 60-80%
2024-11-14 13:34:07 -08:00
Wojciech Lewicki
3b0f913704
fix: indent 2024-08-08 12:46:54 +02:00
Wojciech Lewicki
e034bbb8bc
fix: fixes for use_frameworks 2024-08-08 11:09:01 +02:00
Wojciech Lewicki
0e15019377
feat: add support for new arch 2024-08-06 11:35:56 +02:00
Seph Soliman
21f760117b RN 0.71.0 -> 0.74.1
Added support for volume buttons as capture buttons
Added yarn v3.6.4
2024-05-14 17:43:02 -07:00
Martin Lichstam
80c517dc68
Add resize mode cover/contain (#644)
* Add resize mode cover/contain

* Add resize to simulator, change type enum and add listener for resize

* Add resize to camera example

* Add description of resizeMode to readme

* Add description of resizeMode to readme

* Update ios/ReactNativeCameraKit/CameraView.swift

---------

Co-authored-by: Seph Soliman <github@seph.dk>
2024-04-30 16:24:19 -07:00
Imdad Ismail
234e7f89eb
added code format to see type of code scanned (#633)
* added code format to see type of code scanned

* Update ios/ReactNativeCameraKit/SimulatorCamera.swift

Changed supported barcode types to list of CodeFormat

Co-authored-by: David Bertet <11665957+DavidBertet@users.noreply.github.com>

* Update android/src/main/java/com/rncamerakit/CodeFormat.kt

Added annotation for int type

Co-authored-by: David Bertet <11665957+DavidBertet@users.noreply.github.com>

* Added CodeFormat types and fixed an indentation on a function to match other functions

* Replaced AVMetadataObject with CodeFormat in all files

* Updated code format to case Iterable and changed supportedBarcodeType to code format cases

* Update src/Camera.d.ts

---------

Co-authored-by: David Bertet <11665957+DavidBertet@users.noreply.github.com>
Co-authored-by: Seph Soliman <github@seph.dk>
2024-04-30 16:18:00 -07:00
David Bertet
a13aa787c4
Add iOS linter & report issues on PR (#634)
* Add iOS linter & report issues on PR

* Fix lint errors

---------

Co-authored-by: Seph Soliman <github@seph.dk>
2024-04-30 16:10:07 -07:00
David Bertet
00c461a144
Return height/width of capture (#646)
To be consistent with Android
2024-04-30 12:14:00 -07:00
Seph Soliman
11b15fd236 Fixed Swift runtime failure/crash during unexpected capture() call
'Unexpectedly found nil while implicitly unwrapping an Optional value'
2023-11-03 14:38:19 -07:00
Seph Soliman
33b3f98937 Added multi-lens zoom support for iPhone 12, 13, and 14
(they 'only' have ultra-wide and wide)
2023-08-10 14:35:37 -07:00
Seph Soliman
c02b13f2eb iOS: Default zoom to 1.0 when wide angle is the first device 2023-08-05 13:58:06 -07:00
Seph Soliman
925816f830 Fixed iOS NSRangeException when zooming
Error was 'index 18446744073709551615 beyond bounds [0 .. 0]'
for RealCamera.defaultZoomFactor
2023-08-05 12:03:49 -07:00
Seph Soliman
c4ac4a00d6 Fixed focusMode and zoomMode not being enabled by default 2023-07-25 09:57:31 -07:00
Seph Soliman
4892d53483 Fixed orientation on iPads when starting in landscape mode (#565)
Video connection was not ready, so rotation would silently fail
2023-07-24 17:09:59 -07:00
Seph Soliman
0b27dca950 Removed thumb saving until we have thumbnail sizing support in RN API 2023-07-20 09:59:18 -07:00
Seph Soliman
cef327470c Added expo-file-system support (moveAsync() will now work)
Temp photos now stored as ~/Library/Caches/<bundleid>/<libraryid>/*.jpg
2023-07-19 18:34:30 -07:00
Seph Soliman
40cc209652 Fixed maxZoom not being normalized 2023-07-19 15:10:15 -07:00
Seph Soliman
e9fd0826d0 Updated docs, minor tweaks on Android 2023-07-18 21:35:20 -07:00
Seph Soliman
3253daa6c3 Changed and normalized default zoom to be 1.0x (thx @DavidBertet) 2023-07-18 21:03:14 -07:00
Seph Soliman
87b146f813 Fixed orientation when rotating but app doesn't allow rotation 2023-07-18 19:43:48 -07:00
Seph Soliman
04dd979c4b Fixed zoom not updating when maxZoom prop changes
Fixed inline docs for props
Refactored Swift/Kotlin code to look alike (e.g. gesture handling)
2023-07-17 17:31:50 -07:00
Seph Soliman
e129096208 Fixed zoom prop not working when cameraType is switched
(must explicitly be reset using zoom={0} if that is wanted)
Fixed non-unique queue name
2023-07-16 23:30:18 -07:00
Seph Soliman
19246c5d92 Fixed crash if preview view isn't ready fast enough 2023-07-14 18:56:24 -07:00
Seph Soliman
91c57f0ded Fixed uncontrolled zoom not working on the barcode scanner 2023-07-14 16:54:21 -07:00
Seph Soliman
e6688a2c69 Added zoom control on Android 2023-07-13 18:09:21 -07:00
Seph Soliman
f58bc77ef1 Added zoom control
Added max zoom control
Added onZoom handler
2023-07-12 18:12:33 -07:00
David Bertet
fedec20b26 Remove extensions & unused pinch velocity 2023-07-06 00:39:20 -07:00
David Bertet
2f0195bfdc Enable videoStabilization if supported 2023-07-05 01:22:45 -07:00
David Bertet
231bb301b3 Try to match native app pinch to zoom 2023-07-05 01:11:08 -07:00
David Bertet
13aed7196f Refine orientation
Make initializeMotionManager private
Use extensions for conversions
Handle accelerometer updates on background thread
Use UIDeviceOrientation for deviceOrientation
Converting UIDeviceOrientation to Interface/VideoOrientation counter-rotate it
2023-07-04 15:17:34 -07:00
David Bertet
6c7e0fe500 Fix default zoomFactor when we switch camera 2023-07-04 01:57:54 -07:00
David Bertet
8b346669de Small refinements
Remove cameraType from the class, use local variable only to avoid unwanted side effects
Move thumbnail creation into delegate, to be consistent and return only data
Make `counterRotatedCaptureVideoOrientationFrom` private
Refactor slightly `update(pinchVelocity`
Remove `setTorchMode`, add `scanThrottleDelay` from React types
2023-07-04 01:35:25 -07:00
Seph Soliman
fee756b55c Fixed orientation issues for both orientation locked and rotated UIs
Added support for thumbnails (for later)
Fixed default zoom to be wide angle camera instead of ultra wide
2023-07-03 20:21:20 -07:00
Seph Soliman
37737ace6f Rewrote example project
Using hooks/functional components
Fixed zoom on second pinch
Fixed orientation issues
Added support for new ultra wide camera (fix blurry close ups)
2023-07-03 20:21:11 -07:00
David Bertet
01c23678a3 Remove unused protocol 2023-06-30 01:18:01 -07:00
David Bertet
a23aa47fa7 Remove prints & signpost 2023-06-30 00:29:36 -07:00
David Bertet
d730a76051 Fix small issues, throttle scanner 2023-06-30 00:24:37 -07:00
David Bertet
bdbfac1f33 Swift migration & rewrite 2023-06-27 21:21:18 -07:00
David Bertet
9342a1d2d9 Lay the foundation for a Swift migration 2023-06-11 19:01:23 -07:00
David Bertet
b39b2fa3d5 Fix #517. iOS sim pictures are PNG instead of JPEG 2023-06-05 21:22:57 -07:00
summer-wu
0fb5003801
fix orientation problem (#542)
The captured content is not rotated as the device rotate, fixed.

Co-authored-by: Brett Wu (吴 书宇) <shuywu@tesla.com>
2023-05-22 11:32:25 -07:00
Yousra Sdn
6196173463
chore: expose a method to set the torch mode (#523) 2023-03-10 19:32:47 -08:00
Seph Soliman
edfa42380f
v13 (#491)
* Removed saveToCameraRoll & saveToCameraRollWithPhUrl.
Use react-native-cameraroll instead.

Upgraded CameraX to 1.1.0,
Upgraded com.google.mlkit:barcode-scanning to 17.0.2

* v13.0.0
2022-08-29 11:29:07 -07:00
Stefan Berndt
d4e4aa943e
feat: add Interleaved2of5 to supported barcode types on iOS (#481)
Co-authored-by: Stefan Berndt <stefan.berndt@hornbach.com>
2022-08-07 16:30:47 -07:00
Juan Castillo
73b1110f90
Fix iOS crash when permisions denied (#458)
* Fix iOS crash when permisions denied
2022-04-08 10:30:09 -07:00
Seph Soliman
0228634bb5 Add 'onOrientationChange' event handler to iOS as well 2021-05-26 17:06:42 -07:00