Skip to content

Commit

Permalink
Docs: Added several properties and collected the methods into an index
Browse files Browse the repository at this point in the history
  • Loading branch information
simistern committed Dec 25, 2019
1 parent 44661fc commit 2cde2e7
Showing 1 changed file with 81 additions and 1 deletion.
82 changes: 81 additions & 1 deletion docs/API.md
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 2cde2e7

Please sign in to comment.