Updated docs, exported constants
This commit is contained in:
parent
0228634bb5
commit
4249927da1
|
@ -146,6 +146,7 @@ import { Camera, CameraType } from 'react-native-camera-kit';
|
|||
| `resetFocusWhenMotionDetected` | Boolean | iOS only. Dismiss tap to focus when focus area content changes. Native iOS feature, see documentation: https://developer.apple.com/documentation/avfoundation/avcapturedevice/1624644-subjectareachangemonitoringenabl?language=objc). Default `true`. |
|
||||
| `saveToCameraRoll` | Boolean | Using the camera roll is slower than using regular files stored in your app. On an iPhone X in debug mode, on a real phone, we measured around 100-150ms processing time to save to the camera roll. _<span style="color: red">**Note:**</span> This only work on real devices. It will hang indefinitly on simulators._ |
|
||||
| `saveToCameraRollWithPhUrl` | Boolean | iOS only. If true, speeds up photo taking by about 5-50ms (measured on iPhone X) by only returning a [rn-cameraroll-compatible](https://github.com/react-native-community/react-native-cameraroll/blob/a09af08f0a46a98b29f6ad470e59d3dc627864a2/ios/RNCAssetsLibraryRequestHandler.m#L36) `ph://..` URL instead of a regular `file://..` URL. | |
|
||||
| `onOrientationChange` | Function | Callback when physical device orientation changes. Returned event contains `orientation`. Ex: `onOrientationChange={(event) => console.log(event.nativeEvent.orientation)}`. Use `import { Orientation } from 'react-native-camera-kit'; if (event.nativeEvent.orientation === Orientation.PORTRAIT) { ... }` to understand the new value |
|
||||
|
||||
### Barcode Props (Optional)
|
||||
|
||||
|
|
|
@ -34,8 +34,4 @@ const Camera = React.forwardRef((props, ref) => {
|
|||
/>);
|
||||
});
|
||||
|
||||
const { PORTRAIT, PORTRAIT_UPSIDE_DOWN, LANDSCAPE_LEFT, LANDSCAPE_RIGHT } = RNCameraKitModule.getConstants();
|
||||
|
||||
export { PORTRAIT, PORTRAIT_UPSIDE_DOWN, LANDSCAPE_LEFT, LANDSCAPE_RIGHT };
|
||||
|
||||
export default Camera;
|
||||
|
|
|
@ -5,6 +5,14 @@ import CameraScreen, { CameraType } from './CameraScreen';
|
|||
|
||||
const { CameraKit } = NativeModules;
|
||||
|
||||
// Start with portrait/pointing up, increment while moving counter-clockwise
|
||||
export const Orientation = {
|
||||
PORTRAIT: 0, // ⬆️
|
||||
LANDSCAPE_LEFT: 1, // ⬅️
|
||||
PORTRAIT_UPSIDE_DOWN: 2, // ⬇️
|
||||
LANDSCAPE_RIGHT: 3, // ➡️
|
||||
};
|
||||
|
||||
export default CameraKit;
|
||||
|
||||
export { Camera, CameraScreen, CameraType };
|
||||
|
|
Loading…
Reference in New Issue