react-native-camera/Example
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
..
android fix example 2017-02-27 21:26:21 +02:00
assets Android support for recording video (#262) 2016-08-27 21:49:46 -04:00
ios Update Example to RN 0.34 and Xcode 8 2016-09-23 16:08:56 -04:00
.buckconfig Add example 2016-05-30 11:19:43 -04:00
.flowconfig Update Example to RN 0.34 and Xcode 8 2016-09-23 16:08:56 -04:00
.watchmanconfig Add example 2016-05-30 11:19:43 -04:00
Example.js iOS: minor focus and zoom changes (#578) 2017-04-23 14:01:04 -07:00
index.android.js Add example 2016-05-30 11:19:43 -04:00
index.ios.js Add example 2016-05-30 11:19:43 -04:00
package.json Update Example to RN 0.34 and Xcode 8 2016-09-23 16:08:56 -04:00
README.md Android support for recording video (#262) 2016-08-27 21:49:46 -04:00

Run example

From project root run through cli:

  • cd Example/
  • npm install

For Android:

  • adb reverse tcp:8081 tcp:8081 or in Dev Settings input COMPUTER_IP:8081 for debug server
  • react-native run-android

For iOS build:

  • Open Example.xcodeproj with XCode
  • Change IP for jsCodeLocation in AppDelegate.m file
  • Run from XCode