From 2cde2e76a60e10a5bb12ecab259f8e88f2ccd659 Mon Sep 17 00:00:00 2001 From: simistern Date: Wed, 25 Dec 2019 16:00:52 -0500 Subject: [PATCH] Docs: Added several properties and collected the methods into an index --- docs/API.md | 82 ++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 81 insertions(+), 1 deletion(-) diff --git a/docs/API.md b/docs/API.md index 155956302..2197a16b0 100644 --- a/docs/API.md +++ b/docs/API.md @@ -2,9 +2,89 @@ id: api title: Work in progress --- -## API props +## Props Index [**wip**] +- [`zoom`](API.md#zoom) +- [`maxZoom`](API.md#maxZoom) +- [`type`](API.md#type) +- [`cameraId`](API.md#cameraId) +- [`flashMode`](API.md#flashMode) +- [`exposure`](API.md#exposure) +- [`whiteBalance`](API.md#whiteBalance) +- [`autoFocus`](API.md#autoFocus) +- [`ratio`](API.md#ratio) +- [`focusDepth`](API.md#focusDepth) +- [`onMountError`](API.md#onMountError) +- [`onCameraReady`](API.md#onCameraReady) + +## Methods Index +- [`takePictureAsync`](API.md#takePictureAsync()) +- [`recordAsync`](API.md#recordAsync) +- [`refreshAuthorizationStatus`](API.md#refreshAuthorizationStatus) +- [`stopRecording`](API.md#stopRecording) +- [`pausePreview`](API.md#pausePreview) +- [`resumePreview`](API.md#resumePreview) +- [`getAvailablePictureSizes`](API.md#getAvailablePictureSizes) +- [`getSupportedRatiosAsync`](API.md#getSupportedRatiosAsync) +- [`isRecording`](API.md#isRecording) + +## Props +--- +### `zoom` + +This property specifies the zoom value of the camera. Ranges from 0 to 1. Default to 0. + +| Type | Default Value | +| ---- | -------- | +| number | 0 | + +--- +### `maxZoom` + +The maximum zoom value of the camera. Defaults to 0. + +| Type | Default Value | +| ---- | -------- | +| number | 0 | + +--- +### `type` + +This property defines which camera on the phone the component is using. +Possible values: +- `front` +- `back` + +| Type | Default Value | +| ---- | -------- | +| number | 'back' | + +--- +### `cameraId` + +For selecting from multiple cameras on Android devices. See [2492](https://github.com/react-native-community/react-native-camera/pull/2492) for more info. Can be retrieved with `getCameraIds()` + +| Type | Default Value | Platform | +| ---- | -------- | -------- | +| String | `null` | Android | + +--- +### `flashMode` + +Determines the state of the camera flash. Has the following possible states. + ```off: '1', + on: 'auto', + auto: 'torch', + torch: 'off' + ``` + +| Type | Default Value | +| ---- | -------- | +| object | `{ off: 1 }` | + +--- + ## Methods ## takePictureAsync()