Commit Graph

89 Commits

Author SHA1 Message Date
Abe Botros 20b0721850 iOS: minor focus and zoom changes (#578)
* iOS: minor focus and zoom changes

RCTCameraManager focusAtThePoint improvements
- Dynamicaly get size from bounds of camera view, instead of full screen, since
  it might not always be the case that the Camera react component is taking up
  the entire device screen.
- Also add setting exposure to the same point of interest we are focusing on.

Example
- Add onFocusChanged and onZoomChanged empty callback functions by default to
  Example app, allowing tap-to-focus and pinch-to-zoom to be readily
  experienced/experimented with.
- Updated react/react-native dependencies to match root package.json.

TODO/Other remarks
- Tap-to-focus seems to still not work perfectly... From logging, it always seems
  to get the right location in the view (meaning its getting the right location
  from the user touch and transforming it to the {0, 1} range appropriately), and
  does indeed engage the focus process, but it seems it sometimes refocuses on the
  center-ish region of what's in the camera instead of the location that was actually
  pressed. I thought this might be related to the subjectAreaDidChange getting called,
  which in turn sets the focus mode to continuous auto-focus at the view center, but
  from my experimenting, this method never actually gets called. I wasn't able to
  figure out if there's somewhere else in the library that's forcing continuous auto-focus,
  or if there's just some bug in our current focus procedure within focusAtThePoint.

* Reset Example/package.json dependency versions to master
2017-04-23 14:01:04 -07:00
Alex Dunae 8024d6992f Fix typo in code128 definition for barCodeTypes 2017-04-06 08:25:00 +02:00
Nick Pomfret 98de15cf9a [android] add gps meta to android (#643)
* writing metadata.location (lat and lon coords only) to the exif data... and returning the internal url for the new image (which can be used in conjunction with the RN CameraRoll)

* just a tidy up to remove some duplication and fix some logging (no functional changes)

* oops, fix typo

* docs

* added mediaUri to ios so its the same as android
2017-03-23 08:41:01 -07:00
Michael Nolivos 9f3d893f42 Added runtime check for supported bar code types 2017-02-03 20:47:50 -08:00
Chirag d0f48894b6 (ios): fix header search paths (#577) 2017-01-30 17:42:51 -08:00
egpast edcd2435de Fix iOS orientation logic typo (#573)
- This typo results in all roughly face-up still pictures being interpreted as portrait shots.
2017-01-28 01:49:11 -08:00
Derek Hsu c12fd726a3 Fix barcode type ‘code128’ typo (#563) 2017-01-22 23:20:39 -08:00
rt2zz 7224acd7db Revert "Revert "[iOS]: fix for breaking iOS header change in RN 0.40.0 (#544)""
This reverts commit 47b7cf2ac1.
2017-01-22 19:34:09 -08:00
Philip Nuzhnyi 6421067076 set camera pointer to nil when stopping session in emulator (#523) 2017-01-22 19:33:56 -08:00
rt2zz 47b7cf2ac1 Revert "[iOS]: fix for breaking iOS header change in RN 0.40.0 (#544)"
This reverts commit 048e7414d6.
2017-01-06 11:52:27 -08:00
Daniel Kim 048e7414d6 [iOS]: fix for breaking iOS header change in RN 0.40.0 (#544) 2017-01-05 16:07:49 -08:00
Ron Heft b308d08e9a Race conditions initializing flashMode (#436)
* Fix race condition initializing Android camera

* Fix race condition initializing flashMode iOS
2016-12-08 21:05:35 -05:00
Ian Bussières 3f04dd3587 Fix crash on second invocation of camera when running on iOS 10 simulator (#441) 2016-11-18 17:45:21 -05:00
abrahambotros a2a6d028a4 Add 1080p, 720p, and 480p capture qualities. (#469)
* Add 1080p, 720p, and 480p capture qualities.

* Minor improvements for picture/video sizing.

- Minor refactoring for getting supported sizes (DRY).
- Add explicit pictureSize setting for 480p/720p/1080p in still/picture mode.

* Use util.Size objects for 480p/720p/1080p sizing.

- Note using Camera.Size objects would require a camera instance prior to creating the
  size objects, which would be manageable but not too clean.

* Remove 480p for iOS; 16:9/HD aspect ratio for Android 480p

- iOS only has a 640x480 480p-like AVCaptureSessionPreset, which is not the typical 16:9/HD aspect ratio
  desired. Removing this option as a result of this.
- Android 480p updated to use 16:9/HD aspect ratio.

* Add notes for (in)exact sizing for 1080p/720p/480p

* Re-add 480p on iOS, more notes on resolutions.

- Add notes on non-HD-aspect-ratio for iOS 480p.
- Add more explanation of variable resolution/sizes, especially for 480p on Android.

* Use custom Resolution class to hold 480p/720p/1080p resolution sizes

- Mistakenly used util.Size class before, which was not added until Android API level 21 (current
  min is 16).
2016-11-18 17:38:23 -05:00
Roman Mandryk 000c09a2cc Fix for issue #386 - camera cras- ios 10 simulator 2016-09-24 21:18:41 +08:00
matejkriz f4bf30e17b prevent freezing when opened 2 times via navigator (http://stackoverflow.com/questions/33046061/) (#380) 2016-09-12 20:31:46 -07:00
Tuomas Peippo 355a6daea3 Move setCaptureQuality outside of capture function (#322) 2016-08-02 16:22:15 -04:00
Gethin Webster 2444964ead Ensure that preview orientation is correct on launch (#354) 2016-08-01 18:22:35 -07:00
stantoncbradley 5ba2d3e40d add commitConfiguration to stopSession 2016-06-05 12:40:32 -07:00
Charlie Hawker 61617e2bd5 Fixes #301 (#302) 2016-05-28 12:12:09 -07:00
Ryan Wu bff819c574 More accurate log (#289)
Move capturing audio log when it's actually capturing
2016-05-18 08:30:07 -07:00
Radu-Marius Popovici 569da0c31a fix iOS regression (#287)
* use device orientation on android only with auto orientation

* guard against missing playSoundOnCapture and quality props in options

* add video orientation support

* use device orientation on ios only with auto orientation

* fix regression on iOS
2016-05-16 09:28:47 -07:00
Radu-Marius Popovici 0c3dba1ff6 fix snapshot orientation when device orientation is locked (#232)
* use device orientation on android only with auto orientation

* guard against missing playSoundOnCapture and quality props in options

* add video orientation support

* use device orientation on ios only with auto orientation
2016-05-10 11:05:03 -07:00
Zack Story c3ca7cbb03 Merge pull request #270 from lwansbrough/v1
v1 Updates
2016-04-27 20:34:46 -07:00
Kyle Corbitt 1fdb3e73a8
remove undefined methods 2016-04-26 10:41:10 -07:00
Zack Story 2dc43922dc
merge device orientation branch 2016-04-23 13:02:29 -07:00
Jason Brown 2a78d0e1d0 Add alias for photo (#268)
* Add alias for photo

* Map photo to high on android
2016-04-23 12:59:06 -07:00
Kyle Corbitt e95f560526
torch fixes 2016-04-23 12:50:14 -07:00
Kyle Corbitt 7fc183c2e7
increase cohesion of ios methods 2016-04-23 12:50:05 -07:00
Zack Story 9162879305
[barcode] default barCodeTypes to [] if no barcode listener 2016-04-23 12:45:44 -07:00
Jannik Sommerfeld 301620ef90
Update RCTCameraManager.m 2016-04-23 12:44:41 -07:00
Jannik Sommerfeld d449599248
Update RCTCamera.m 2016-04-23 12:44:40 -07:00
Jannik Sommerfeld 9c99108025
Update RCTCameraManager.h 2016-04-23 12:44:40 -07:00
Jannik Sommerfeld 3e880ec386
Update RCTCameraManager.m 2016-04-23 12:44:40 -07:00
Jannik Sommerfeld 714bc6713d
Search only defined barcodes to improve performance 2016-04-23 12:44:39 -07:00
Kyle Corbitt 0c789b8da0
capture returns metadata 2016-04-23 12:44:39 -07:00
Radu Popovici 9646090482 Merge branch 'master' of https://github.com/lwansbrough/react-native-camera 2016-04-04 10:54:33 +02:00
Zack Story cfac209da8 [permissions] rename checkCameraAuthorizationStatus to checkVideoAuthorizationStatus 2016-04-03 11:19:31 -07:00
Zack Story c981675636 Merge pull request #230 from niborb/feature/add-audio-and-video-authorization-check
Add audio and video authorization check separately
2016-04-03 11:09:34 -07:00
Zack Story 067a37146c Merge pull request #228 from bletchley/feature/barcode-screen-coordinates
transform barcode metadata points to screen coordinates
2016-04-03 11:00:12 -07:00
Zack Story e57bae7bc3 Merge pull request #243 from corbt/preview-init
Init preview each time view requested
2016-04-03 10:42:30 -07:00
Radu Popovici 98bd7a853a Merge branch 'master' of https://github.com/lwansbrough/react-native-camera 2016-04-03 10:06:28 +03:00
Zack Story 8bb0b32707 Merge pull request #244 from corbt/better-orientation-init
Set the right preview orientation before startup
2016-04-02 18:59:08 -07:00
Kyle Corbitt 2eac22d151 init preview each time view requested 2016-04-02 15:17:36 -07:00
Kyle Corbitt d3ec8388d9 set the right preview orientation before startup 2016-04-01 20:48:08 -07:00
Kyle Corbitt 9537056157 move instead of copy for much improved perf 2016-03-31 15:00:52 -07:00
Radu Popovici dff6b82147 Merge branch 'master' of https://github.com/lwansbrough/react-native-camera 2016-03-30 11:34:20 +03:00
Dan Horrigan 1406e0630f Add the `mirrorImage` prop will will mirror the resulting image when true. 2016-03-28 14:40:07 -04:00
Radu Popovici 5d98407e67 make orientation public 2016-03-24 10:25:45 +02:00
Radu Popovici 379f75d7a6 refactor sensor orientation checker 2016-03-24 10:12:57 +02:00