Commit Graph

105 Commits

Author SHA1 Message Date
Sibelius Seraphini
255e19e77a
doc(tidelift): add tidelift for enterprise 2019-10-18 23:07:24 -03:00
cristianoccazinsp
6b7d7f4a64 feature(ios): Ios exposure poi (#2514)
* feat: autoexposure on point of interest and defocus on subject change

* Impelement cameraIds for iOS, and various iOS bug fixes.

Summary:

- Implement getCameraIds and cameraId property to manually select a camera device.

- Fix the internal preset being used to properly use a photo and video preset, and check for invalid presets on camera switch.
    - This fixes a bug that would happen after recording. After a recording is complete, the camera preset was set to 4k permanently, and attempting to select any camera that does not support that preset would result in an totally unusable camera. Now, the "Photo" preset is the default which should be the highest quality option for photos, and the previously used "High" preset will be used as video default if no value is provided.
    - This also adds proper support to setting the undocumented "pictureSize" property. Setting this property will change the default photo quality to be that one.

- Minor cleanup to the camera initialization so the same code is not called as many times redundantly (start session / device happening multiple times)
    - The reduced redundant calls to start session and session updates should make the camera startup slightly faster.

- Fix for warnings issued due to misuse of the "isRecording" property. This property was defined as both as a property and a method and was both getting set manually and retrieved with a function. It should now consistently only be retrieved with a function based on the real recording status. Should have no behaivour change, but removes a pesky warning.

- Fix an issue related to the camera getting stuck after a background resume by removing the use of the queue for those two events.

- Fixes a wrong event unsubscription (UIDeviceOrientationDidChangeNotification to UIApplicationDidChangeStatusBarOrientationNotification) from a previous change. Also move event subscriptions to superview changes for consistency and so they are not used/consumed if not needed. After testing, the View of RNCamera is instantiated twice (for some reason I couldn't find) but used only once. RN keeps a reference to the view in memory even after the camera is destroyed, resulting in these events getting fired and handled all the time during the app's lifetime.

* add maxZoom property to iOS.

Android: Not needed as of now. Also, zoom multiplier behaves different on Android and can't be used with the same value as iOS.

* add auto exposure option.
This branch is temporary from the other changes until the proper changes from https://github.com/react-native-community/react-native-camera/pull/2423/files are merged.

* allow for expose POI to also be cleared

* Add ultra-wide lense support. Requires XCode with SDK for iOS 13

* check that video capture device is ready before capturing, fix for string cameraId assignment

* add missing ios 13 camera types and exposure check.

* remove duplicates from camera id list, return its type on IOS, handle WB crash on unsupported devices.

* Do not return virtual devices (we can't really use them with the library), update zoom and flash on preset change so they are maintained while recording/restoring.

* remove redundant duplicates check, add SDK macro check for ultra wide lenses, remove virtual cameras from query

* Add more info about deviceType and iOS camera IDs behaviour.
2019-10-10 12:01:16 -03:00
cristianoccazinsp
58f3b3edbd feat(ios): Add cameraId feature to iOS and various bug fixes (#2510)
* Impelement cameraIds for iOS, and various iOS bug fixes.

Summary:

- Implement getCameraIds and cameraId property to manually select a camera device.

- Fix the internal preset being used to properly use a photo and video preset, and check for invalid presets on camera switch.
    - This fixes a bug that would happen after recording. After a recording is complete, the camera preset was set to 4k permanently, and attempting to select any camera that does not support that preset would result in an totally unusable camera. Now, the "Photo" preset is the default which should be the highest quality option for photos, and the previously used "High" preset will be used as video default if no value is provided.
    - This also adds proper support to setting the undocumented "pictureSize" property. Setting this property will change the default photo quality to be that one.

- Minor cleanup to the camera initialization so the same code is not called as many times redundantly (start session / device happening multiple times)
    - The reduced redundant calls to start session and session updates should make the camera startup slightly faster.

- Fix for warnings issued due to misuse of the "isRecording" property. This property was defined as both as a property and a method and was both getting set manually and retrieved with a function. It should now consistently only be retrieved with a function based on the real recording status. Should have no behaivour change, but removes a pesky warning.

- Fix an issue related to the camera getting stuck after a background resume by removing the use of the queue for those two events.

- Fixes a wrong event unsubscription (UIDeviceOrientationDidChangeNotification to UIApplicationDidChangeStatusBarOrientationNotification) from a previous change. Also move event subscriptions to superview changes for consistency and so they are not used/consumed if not needed. After testing, the View of RNCamera is instantiated twice (for some reason I couldn't find) but used only once. RN keeps a reference to the view in memory even after the camera is destroyed, resulting in these events getting fired and handled all the time during the app's lifetime.

* add maxZoom property to iOS.

Android: Not needed as of now. Also, zoom multiplier behaves different on Android and can't be used with the same value as iOS.
2019-10-08 12:24:21 -03:00
cristianoccazinsp
612cb65f2a feat(android): Support to enumerate and select Camera devices (#2492)
* Android only: Support to enumerate Camera devices and to select from one of them.

* No need to have the camera in running state if querying for IDs.

* Silly bug, not using string compare. Also, do not run any camera code if the actual camera doesn't change.

* Crash fix when focus coordinates are set to null/undefined not being handled. Notes about not supported flash/focus

* If a camera is not found, set the first available camera just like Camera2 does.

* missing semicolon

* Fixes to Camera2 API:

- First change is related to camera selection by ID. Some more code was required to correctly set the facing flag and characteristics
- Second change fixes a previous issue (unrelated to the PR) that was causing the preview of the camera to look upside down on rotated devices. Device rotation should not affect the display (nor set it). Device rotation should however be used for the final image (and not screen rotation). Some code was borrowed from Camera1.
2019-09-24 10:47:23 -03:00
Nathan Heinrich
38a5ffb2eb feat(ios): videoBitrate option for iOS (#2504)
* Update RNCamera.m

Add videoBitrate option for ios, setting video bitrate requires a codec to be set

* Update API documentation

* Update documentation

* Update typings
2019-09-24 09:32:22 -03:00
Rock Hu
0026b46c74 Fix jitpack.io maven link (#2497) 2019-09-23 13:43:21 -03:00
Jaideep Ghosh
1530b883b9
fix:Add CAMERA permission for Android. 2019-08-28 16:35:13 +05:30
chubakueno
b47b80d5a4 feat(ios): rectOfInterest (#1852) 2019-08-21 04:40:24 -03:00
Tadas Talaikis
a01187d0b6 fix: App name shouldn't be equal to the registered application (#2393) 2019-08-02 11:10:23 -03:00
Valentin
c748b4eccc fix(android): Support writing custom Exif tags to modified image file (#2402) 2019-08-02 11:10:10 -03:00
Laurin Quast
409d2a9eea break(androidX): upgrading to sdk 28 and androidx (#2068) (#2306)
* upgrading to sdk 28 and androidx

* revert attempt to fix build

* fixing build

* build version fix

* updating example app

* manifest update

* using stable release, instead of beta

* androidx migration doc

* migration doc update

* follow on androidx upgrade after rebase
2019-07-14 16:08:03 -03:00
Rıdvan Altun
00e9c32453 fix: LinkingLibrariesWindows.md link (#2365) 2019-07-09 17:40:01 -03:00
Elphas Tori
729aa5d57e Missing AppRegistry Import (#2308)
Added missing AppRegistry in FaCC example
2019-06-10 09:23:30 -03:00
Laurin Quast
72a8d7f34c
fix: revert breaking change upgrading to sdk 28 and androidx
This reverts commit e2a895ad1c.
2019-06-06 21:00:59 +02:00
Greg Alexander
e2a895ad1c feat(androidX): upgrading to sdk 28 and androidx (#2068)
* upgrading to sdk 28 and androidx

* revert attempt to fix build

* fixing build

* build version fix

* updating example app

* manifest update

* using stable release, instead of beta

* androidx migration doc

* migration doc update

* follow on androidx upgrade after rebase
2019-06-02 16:20:57 -03:00
Ronaldo Lima
54b03328b1 feat(docs): Add docusaurus (#2293)
* initial bootstrap on documentation

* Add EXPO_USAGE and MIgrating page

* add all pages

* add sponsors section to index

* theme

* configs

* clipboard button

* remove blog from docker

* start API.md

* minor updates
2019-06-02 16:20:35 -03:00
Mark Oates
4992572e81 Update spelling (#2217)
Some people search for "deprecated" and it was misspelled in the doc.
2019-04-18 13:21:04 -03:00
Sibelius Seraphini
c76a963026
feat(camera): remove deprecated RCTCamera, fix #1890 (#2215) 2019-04-17 22:54:48 -03:00
Daniil Ovoshchnikov
1b9fb63e56 feat(mlkit): add mlkit barcode detection ios (#2209)
extend barcode type cases for android
2019-04-16 15:33:46 -03:00
Kacper Kula
e564648b7c feat(android): support for Rationale (#2110) (#2206)
depracate permissionDialogTitle and permissionDialogMessage
add new props: androidCameraPermissionOptions and androidRecordAudioPermissionOptions
add functionality: when depracated parameters are provided, they are used instead of new ones (and the warning message is set).
2019-04-14 08:46:30 -03:00
Craig Tuttle
7bb9a1205c feat(android): autoFocusPointOfInterest, Camera & Camera2 (#1974)
* Android autoFocusPointOfInterest, Camera & Camera2

* updated example with touch to focus
2019-03-30 17:45:44 -03:00
Tushar Gupta
cc5ae2a26e Update migrationV2.md (#2159)
Just a tiny fix for peeps who will be copy-pasting! :)
2019-03-20 11:45:30 -03:00
Daniil Ovoshchnikov
4ea35e33bb add version 2.x migration guide (#2143) 2019-03-14 09:53:01 -03:00
Marius Reimer
1a89d7981a Feature: isRecordingInterrupted video promise property (#2007)
* feat(rn-camera): add isRecordingInterrupted return property

* docs(rn-camera): added isRecordingInterrupted description

* Merge branch 'master' into feat-isRecordingInterrupted
2019-03-10 14:51:51 -03:00
Dariusz Górak
04ea06a17d fix: introduce refreshAuthorizationStatus method (#2014) 2019-03-08 11:18:39 -03:00
Shahnawaz Ali Kausar
3f70e46aa2 feat(docs): added barcode-mask link (#2128) [skip ci] 2019-02-28 22:07:34 -03:00
Laurin Quast
0ef031b958
docs(q-a): add how to save video/image to camera roll (#2115) 2019-02-18 12:44:58 +01:00
Laurin Quast
74c1fbed2c
docs(q-a): add video thumbnail recommendation (#2114) [skip release] [skip ci] 2019-02-18 10:50:24 +01:00
Bora Tunca
1dfc867561 docs: update location and description of the examples (#2102) [skip ci] [skip release]
Fixes
* Update location: Examples have moved to https://github.com/react-native-community/react-native-camera/tree/master/examples .
* Remove out of date claim: In this directory there are no examples with face recognition. Only one example has been added, that doesn't have face recognition (https://github.com/react-native-community/react-native-camera/pull/1979). 
* Remove repository reference: This is not a standalone repo anymore, it is a directory in the `react-native-camera` repo.
2019-02-12 11:00:47 +01:00
Michael Ossareh
4bcf88e99a feat: add onStatusChange callback (#2003) 2019-01-31 09:29:56 +01:00
Laurin Quast
22533ed8e8
feat: allow camera scene when audio permissions are denied (#2048), Fixes #2047, Fixes #2051 2019-01-18 15:58:48 +01:00
Andrew Schenk
d93a6c7e11 feat(android): add videoBitrate option for recordAsync (#2055) [skip release] 2019-01-18 15:48:42 +01:00
Laurin Quast
62324f8898
docs: reformat documentation with prettier (#2049) [skip release] 2019-01-14 09:29:12 +01:00
Simon Arneson
2940faf871 fix(rn-camera): set default captureAudio property value to true (#2037)
Closes #2030
2019-01-08 11:29:48 +01:00
Laurin Quast
401c485db3
feat(rn-camera): deviceOrientation, videoOrientation, pictureOrientation
* feat(rn-camera): add deviceOrientation and videoOrientation to record response.

* feat(rn-camera): add deviceOrientation and pictureOrientation to take-picture-response

* fix(rn-camera): unify orientation handling for recording and takeing picture

* fix(types): adjust typescript types

* docs(rn-camra): document new properties

* fix(android): respect actual boolean value instead of only checking if it is present.

* feat(android): implement orientation prop for takePictureAsync

* feat(android): implement orientation prop for recordVideoAsync

* docs(rn-camera): adjust documentation

* fix(types): unmark properties as ios only

* fix(android): use constants
2018-12-12 15:04:08 +01:00
Laurin Quast
515bccb7f5
docs(rn-camera): remove unimplemented property (#1987) [skip ci]
Fixes #1978
2018-12-11 12:01:16 +01:00
Benas Svipas
54fedeedd3 feat(ios): add new method isRecording (#1969)
* feat: isRecording() to RNCamera which returns boolean

* docs: update RNCamera and typings
2018-12-05 17:38:33 +01:00
Leonardo Cardoso
dd843bd358 docs: remove unused import from example [skip ci] (#1957) 2018-11-30 11:11:29 +01:00
Tomas Zaicevas
e18d52d204 docs: fix typo [skip ci] (#1945) 2018-11-26 10:16:38 +01:00
SimonErm
b1d91eb91a docs: barcode bounds differences on ios and android (#1936)
[skip ci]
2018-11-20 22:24:26 +01:00
Cosmo Wolfe
d69d28b400 feat(qr-code): return raw barcode data if available (#1904) 2018-11-07 08:53:56 +01:00
Ruben Maher
f6f9f2916d feat: add property pauseAfterCapture to takePictureAsync (#1641) 2018-11-06 13:18:48 +01:00
Robert van Kints
7ee140bbdc feat(android): add inverted google vision barcode scanning (#1896) 2018-11-01 22:27:23 +01:00
Ruben Velazquez Calva
09828cdf1e fix(rn-camera) prevent camera-flickering on ios by introducing new property defaultVideoQuality (#1886)
* Adding defaultVideoQuality property for iOS

* Remove quality in Readme

* Restore preset when cleanup the camera

* Validate isRecording to stopRecording

* Update the quality only if has changed.

* Fix AVCaptureSessionPreset type
2018-10-29 15:59:57 +01:00
Tadas Talaikis
2906ae1563 Fixed first example (#1853)
Solves many repeated Android permissions and taking pictures error reports, ex: #1708
2018-10-19 09:30:24 -03:00
João Guilherme Fidelis
20aed99c38
Merge pull request #1843 from react-native-community/add-slide-up-zoom-recipe
docs: add slide-up zoom recipe
2018-10-17 21:52:41 -03:00
João Guilherme Fidelis
66b683f938
Merge pull request #1847 from romeldris/update_captureaudio_docs
Docs: Remove iOS only for captureAudio prop
2018-10-17 21:52:13 -03:00
Diego Medina
69807f585f
specify code jsx 2018-10-17 15:19:42 -04:00
romeldris
2d3e161b5a Remove iOS only for captureAudio prop 2018-10-10 23:37:38 -07:00
Laurin Quast
737a5a2ef5
docs: add slide-up zoom recipe 2018-10-10 12:28:33 +02:00