> For the complete documentation index, see [llms.txt](https://docs.facephi.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.facephi.com/docs.facephi-en/sdks/sdk-web/componentes/selphid-documentos/propiedades/cameratype.md).

# cameraType

## Details

**Attribute:** `camera-type`

**Type:** `CameraType`

**Default value:** `CameraType.Environment`

### CameraType

| Member        | Value | Description   |
| ------------- | ----- | ------------- |
| `User`        | `0`   | Front camera. |
| `Environment` | `1`   | Rear camera.  |

## Morphology

```typescript
import { CameraType } from '@facephi/selphid-web-component';

selphid.cameraType = CameraType.User;
```

## Description

Select the front or rear camera used by `facephi-selphid-widget` to capture the document.

### Additional information

**Recommended property:** use `cameraPreferred` in new integrations. Unlike `cameraType`, `cameraPreferred` **do not** use the enum `CameraType`, but rather its own text enum `CameraPreferred`:

| Member  | Value     | Equivalent to            |
| ------- | --------- | ------------------------ |
| `Front` | `'FRONT'` | `CameraType.User`        |
| `Back`  | `'BACK'`  | `CameraType.Environment` |

**Precedence:** if you define `cameraType` and `cameraPreferred` at the same time, wins `cameraPreferred` wins and a precedence warning is emitted in the console.

**Deprecation:** `cameraType` is still operational in this Version, but will be removed in the next major version. Use only `cameraType` issues a deprecation warning in the console.

***

## Example

```jsx
import { CameraType } from '@facephi/selphid-web-component';

<facephi-selphid-widget
    cameraType={CameraType.Environment}
/>
```
