103 Commits

Author SHA1 Message Date
Oscar Franco
668b0e5076
Merge pull request #980 from apprennet/AVCaptureSessionError
serialize setCaptureQuality using sessionQueue
2018-01-12 20:28:03 +01:00
Marcus Andersson
e546ae852c fixed merge conflicts. 2018-01-08 21:12:39 +01:00
Sibelius Seraphini
35c5584099
Merge pull request #619 from flybayer/fix-crash
Fix crash when not enough disk storage to save media
2018-01-07 14:01:43 -08:00
Marcus Andersson
ec4ac6c74b fixed so camera works in all orientations for ios 2017-12-20 20:19:14 +01:00
Marcus Andersson
da1f0f2fdd changed so we use the cropToPreview parameter to crop the image 2017-12-20 20:19:05 +01:00
Albert Martin
39f19cd7c7 feat(ios): add support for preview to match viewport cropping (#627) 2017-12-13 15:44:25 -08:00
Sibelius Seraphini
241b5d1060
Merge pull request #859 from cbrevik/start-stop-preview
Add start/stopPreview for Camera
2017-12-07 10:48:23 -02:00
Manuel Nakamurakare
6801113628 serialize setCaptureQuality using sessionQueue 2017-11-13 16:08:42 -08:00
Kesha Antonov
59a0b44c71 fix crash on tap focus & warning on start (#961) 2017-10-28 08:28:15 +02:00
Christian Brevik
1bcf8577a4
Add start/stopPreview for Camera 2017-08-27 18:08:58 +02:00
Armin Primadi
dd8c5c1578 Fix fixOrientation in captureStill always returns true (it returns NSCFBoolean which evaluates to true even if the value is false) (#729) 2017-05-31 12:31:31 +01:00
Armin Primadi
41d3292b6b Fix invalid reference when metadataOrientation is other than 3 or 6 (#728) 2017-05-29 15:28:20 -07:00
Nick Pomfret
cb4447c60e add fixOrientation option (#682)
* optional fix orientation

* comments

* docs
2017-05-17 10:32:53 -07:00
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
Brandon Bayer
543ae8fd72 fix: crash when not enough disk storage to save media 2017-03-04 12:50:04 -06: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 47b7cf2ac17f6ff8193fb2adc87961167e4bceab.
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 048e7414d638a2e7e1dc07e189e4f632b721eaee.
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