Commit Graph

119 Commits

Author SHA1 Message Date
Zack Story acc60d3cf8 Update README.md 2017-06-02 12:00:36 -07:00
Xavier Damman 6e840f3ebd Activating Open Collective (#722)
* Added backers and sponsors on the README

* Added call to donate after npm install

* Added template for new issue / pull request
2017-05-25 08:14:37 +01:00
Nick Pomfret cb4447c60e add fixOrientation option (#682)
* optional fix orientation

* comments

* docs
2017-05-17 10:32:53 -07:00
Seokjun Kim f783eb0aaf Add totalSeconds description in README.md 2017-05-09 15:26:56 +09:00
Abe Botros ae9eab3533 (android): Android tap-to-focus and improved (continuous) auto-focus (#575)
* Android tap-to-focus and improved (continuous) auto-focus

Tap-to-focus

- On tap, compute focus area around motion event's location, and pass this to the camera parameters
  as the new focus area.
- Adds RCTCameraUtils.java file, so far with only a single function that helps compute the focus area
  from a motion event. This file can serve as a location for utility constants and functions for the
  rest of the app, where such things can be extracted out.

Improved (continuous) auto-focus

- Use FOCUS_MODE_CONTINUOUS_PICTURE/VIDEO when possible to enable continuous auto-focus; fall back to
  FOCUS_MODE_AUTO otherwise, if able.

Other changes

- Update README to specify differences between iOS and Android for focus and zoom functionality.
- Update AndroidManifest with more thorough list of permissions and features.
- Update Example package.json react and react-native dependencies to match root package's package.json.

* Example: default empty onFocusChanged callback

- Enables default tap-to-focus behavior in Example app, facilitating
  testing of focus features in the Example app
2017-04-24 09:25:49 -07:00
Zack Story 3e2088de79 Update README.md 2017-04-23 12:39:59 -07:00
Joshua Pinter e187b8a0e7 (android): Update compileSdkVersion to 25 and buildToolsVersion to 25.0.2 (#677)
* Update compileSdkVersion to 25 and buildToolsVersion to 25.0.2

Best to keep these up-to-date. Doesn't affect backwards compatibility.

* Add buildToolsVersion requirement of 25.0.2.
2017-04-23 12:38:42 -07:00
Nick Pomfret 5c54275aec android jpeg compression support (#658)
*  * removed some of the re-parsing of the output image byte array
 * removed re-saving of output file
 * moved image processing onto an async task to allow camera to be used while processing is running

* added jpeg compression support for android

* move explanation to correct bit of docs
2017-04-06 08:28:47 +02:00
Tomas Roos 4d2dcf74a5 Merge pull request #615 from NazarYablonskiy/master
Small, but important changes
2017-03-29 16:30:36 +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
Nazar Yablonskiy efd5931fd8 updated Breaking Changes section of README.md 2017-03-07 08:11:59 +02:00
Douglas Duhaime da68ee86a1 let flexbox resize components (#620) 2017-03-06 10:33:16 -08:00
Nazar Yablonskiy 79ff4688ae upd readme 2017-02-27 21:27:06 +02:00
Mike Monteith c688c8344c Encourage use of newest version (0.6) (#601) 2017-02-15 10:28:59 -08:00
Andrew Blair 5e9e0edb79 Added important notes about iOS 10 privacy rules
about needing to define strings for `NSCameraUsageDescription` and `NSMicrophoneUsageDescription`
2017-02-06 16:38:18 -08:00
Alejandro Garcia 5ed6b81493 Updated README.md - added missing permission in android manifest (#567) 2017-01-25 11:58:46 -08:00
Derek Hsu c12fd726a3 Fix barcode type ‘code128’ typo (#563) 2017-01-22 23:20:39 -08:00
Zack Story fe43f554f1 Update README.md 2017-01-22 19:39:36 -08:00
Zack Story 3053f5cb43 Update README.md 2017-01-22 19:35:13 -08:00
Zack Story d116d52442 Update README.md 2017-01-06 12:06:02 -08:00
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