Commit Graph

99 Commits

Author SHA1 Message Date
Zack Story 4b089ced6b Update README.md 2017-01-05 23:44:07 -08:00
Paul Ferrett 4babe6573c Fix typo in README.md (#546) 2017-01-05 23:22:18 -08:00
sunnylqm 536d39b33b barcode now supports android (#508) 2016-12-09 12:18:28 -05:00
Ron Heft fd61e506e5 Document other iOS authorization status methods (#427)
The API already exposes specific methods for checking camera and microphone access individually. These should be documented. Especially since calling `checkDeviceAuthorizationStatus` requests the microphone permission, which is undesirable in photo-only use cases.
2016-11-30 20:25:23 -05:00
Anton Shevchenko 9e06741e94 Include microphone permission key in Info.plist (#488)
* Include microphone permission key in Info.plist

Mention microphone permission (and what to add to `Info.plist) for iOS 10 and up.

* Update README.md
2016-11-28 20:15:42 -05:00
Loch Wansbrough 69d6b5acbf Update README.md 2016-11-23 12:59:36 -08:00
Locly 154cb7aa58 Added Camera.constants.CaptureQuality.preview for android to allow the outputted image to be exactly the same as the previewed image (#449) 2016-11-21 19:41:19 -05:00
Zack Story e4536fd896 Update README.md 2016-11-20 15:12:45 -08:00
James 6fe07c48ae Explicitly added instructions for the Camera Usage Description for iO… (#478)
* Explicitly added instructions for the Camera Usage Description for iOS 10

* Added NSPhotLib field as well
2016-11-18 17:42:03 -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
Jonathan Chen adb26f4524 Default captureAudio to false (#420)
* Default captureAudio to false

Since default captureMode is a still picture, not video. 

This also works around some new iOS 10 permissions requiring notifying the user with a reason for using microphone (which is not good for the user experience if they're just taking a picture). Reference: https://github.com/lwansbrough/react-native-camera/issues/386#issuecomment-249007206

If you need video and sound, then explicitly pass it through as props in your Camera component.

* Update readme for default audio setting
2016-11-18 17:35:26 -05:00
abrahambotros b16ec4ab75 Minor Android MediaRecorder, sizing, and file improvements (#477)
Android MediaRecorder:
  - Most importantly, call Camera.unlock() before setting the camera on the
    MediaRecorder instance, and release() not just reset() when releasing the MediaRecorder
    instance!
  - Add comments and notes for preparing and releasing MediaRecorder instance.
  - Add onError callback for errors during recording session.

RCTCameraViewManager, RCTCamera, RCTCameraViewFinder, RCTCameraView:
  - Implement setCaptureMode, preparing camera based on captureMode. Currently, the only step that
    needs to be taken here is setting the recording hint for videos.
  - Handle setting _captureMode instance variable where applicable.

Sizing
  - Determine ViewFinder supported sizes based on actual captureMode (i.e., get supported picture
    sizes when in still capture mode, and get supported video sizes when in video capture mode).

Output files:
  - Get appropriate external storage public directory based on media type (image or video).
  - Minor variable renaming to indicate that both images or videos can be saved.

README:
  - Update captureTarget to indicate that cameraRoll is the actual default for both systems.
  - Small clarification for output data type for deprecated memory captureTarget output.
2016-11-17 22:25:51 -08:00
Livio Bieri fb3b12b4f1 README: Updated Requirements for iOS 10 (#445) 2016-10-12 20:35:13 -04:00
Gonzalo Aguirre b01c64e773 Mirror image for Android (#399)
* Add mirrorImage support for Android

* Release resources after mirroring

* Mirror image only for TYPE_FRONT

* Remove unnecessary annotation

* Document mirrorImage for Android

* Improved compression and error handling

* Add support for mirroring on Android back camera too
2016-09-13 09:48:48 -07:00
jacobSingh 2bbdf8ce91 Update README.md (#407) 2016-09-13 02:08:25 -07:00
David 3ff9a5852a Update Readme (#406)
for everyone that links it manually  - see: https://github.com/lwansbrough/react-native-camera/issues/164
2016-09-13 01:21:28 -07:00
Sergio Navarrete Suárez ae88ac7405 Updates README.md: Manual Android install (#385)
Changes MainActivity.java to MainApplication.java.

For people with little or no Java experience, it also ensures the list returned by getPackages() is separated by a coma.
2016-09-12 20:30:02 -07:00
Marc Johnson e326d51a53 Android support for recording video (#262)
* Initial commit with Android video support

* stopCapture now works

* Bug fixes and parameter enhancements.  README updated.

* Modified stopCapture parameter count to match iOS

* fixed promise bug on stopCapture

* Update RCTCameraModule.java

In Android preview and recording sizes are different, which can cause an error.  This fix detects the difference and chooses a recording resolution that matches.

* Update RCTCameraModule.java

* Update RCTCamera.java

Creating video functions in style/convention of existing

* Update RCTCameraModule.java

Use new functions for adjusting video capture size and quality

* Update RCTCameraModule.java

Fixes issue where file not video playable (readable) on older devices

* Update AndroidManifest.xml

Since we're reading and writing video and pictures, need permissions for it.

* Fixed upside down camera (on some platforms), and misc bugs and crashes

* Added camera-roll and capture to memory support, new options, and support for duration, filesize, and metadata

* To make merge nicer, temporarily reverting "Added camera-roll and capture to memory support, new options, and support for duration, filesize, and metadata"

This reverts commit 9ea1ad409c7e6121cf0197172e752b7523d4b092.

* Fixed merge & brought back all improvements from 9ea1ad4

* Fixed logic for video -> camera roll

* Updates

* Uncommenting setProfile

* Fix support for React Native 0.25

* Renamed Camera to index

* * Fix after merge android recording

* * Fixed android camera roll file saving
* Added recording to example

* * Android promise rejections with exceptions
* Fixed preview, video and photo sizes
* Android recording result in new, javascript object, format

* * Removed example.index.android.js as there is Example project

* * Readme for example

* don't force a specific codec

* always use cache dir

* * Using MediaScannerConnection instead of ACTION_MEDIA_SCANNER_SCAN_FILE intent

* * As described in https://github.com/lwansbrough/react-native-camera/pull/262#issuecomment-239622268:
- fixed video the wrong direction and recoder start fail at "low,medium" on the nexus 5 x
2016-08-27 21:49:46 -04:00
Jason Marshall 1032370749 rnpm is part of react-native now (#355) 2016-08-01 18:19:41 -07:00
Jonathan Stanton 0d32769dac Add podspec (#329)
* Add podspec file

* Add instructions for CocoaPods
2016-07-02 12:01:43 -07:00
Nicolas Charpentier e1f04e082a Merge pull request #304 from charpeni/example
Add example
2016-06-14 09:16:25 -04:00
Darryl Blake b2d9fa904b React, and Component should now be imported from 'react', not 'react-native'. (#297) 2016-06-01 10:30:52 -07:00
Nicolas Charpentier 1024c6bed5 Add example 2016-05-30 11:19:43 -04:00
Zack Story 347d04e843 Update README.md 2016-04-27 20:37:58 -07:00
Zack Story 8d42cd4dde Update README.md 2016-04-27 20:37:48 -07:00
Zack Story c3ca7cbb03 Merge pull request #270 from lwansbrough/v1
v1 Updates
2016-04-27 20:34:46 -07:00
Jason Brown 75dff8bff1 Add photo documentation (#269) 2016-04-23 12:59:17 -07:00
Zack Story fae43dd698
[readme] notes for barCodeTypes and playSoundOnCapture 2016-04-23 12:44:41 -07:00
Kyle Corbitt 0c789b8da0
capture returns metadata 2016-04-23 12:44:39 -07:00
cdimascio a6785cfa46
play shutter click sound on capture (android)
* play shutter click sound on capture (android)

* Add Property playSoundOnCapture to enable whether the default shutter sound is played on capture (Android)
2016-04-10 18:13:01 -07:00
Zack Story 9ac0247f94 Merge pull request #235 from cdimascio/pr/hasFlashAndroid
Add hasFlash support for Android
2016-04-02 19:14:47 -07:00
Dan Horrigan 1406e0630f Add the `mirrorImage` prop will will mirror the resulting image when true. 2016-03-28 14:40:07 -04:00
Carmine DiMascio e20902933d Add hasFlash support for Android 2016-03-26 20:27:40 -04:00
Radu Popovici 5659cc7809 add captureQuality option 2016-03-20 21:31:23 +02:00
Loch Wansbrough 8f2fa1e375 Merge pull request #214 from rt2zz/v1doc
add v1/legacy instructions
2016-03-08 10:22:47 -08:00
sunnylqm bdcd80f35b Aspect.Fill -> Aspect.fill 2016-03-03 10:03:51 +08:00
Zack 1ac4f82d20 add v1/legacy instructions 2016-02-24 10:59:59 -08:00
Loch Wansbrough d786581d08 Merge pull request #196 from brunobar79/more-barcode-types
Add support for ITF14 and interleaved 2 of 5 barcode types
2016-02-13 15:44:50 -08:00
Bruno Barbieri 9e83ddbc59 update docs 2016-02-13 00:59:29 -05:00
Kyle Corbitt 61b950403d add keepAwake prop 2016-02-08 12:22:37 +00:00
Loch Wansbrough 1feb274458 Updated npm instructions in README 2016-02-03 19:18:00 -08:00
Loch Wansbrough ab7751ea44 Merge pull request #179 from zackify/patch-1
fixed android path
2016-02-03 11:39:56 -08:00
Loch Wansbrough 93b0d06613 Update README.md 2016-02-03 08:57:25 -08:00
Zach Silveira dcee7836d1 fixed android path 2016-02-02 21:04:05 -05:00
Lochlan Wansbrough f5ab0c8432 - Updated Read Me with correct Android install information.
- Fixed promise error during android deployment
2016-01-31 20:56:38 -08:00
Lochlan Wansbrough edf0736f92 - Updated example
- ES6 stuff
2016-01-31 20:47:59 -08:00
Lochlan Wansbrough 580d11bba0 Documentation update 2016-01-31 20:15:00 -08:00
Lochlan Wansbrough 8f9fd98496 Updated docs. 2016-01-31 19:46:33 -08:00
Loch Wansbrough 1b5de73fe9 Merge pull request #170 from corbt/promises
Switch from callbacks to promises
2016-01-31 18:16:07 -08:00
Kyle Corbitt 45c26869a4 switch from callbacks to promises 2016-01-28 12:13:01 +00:00