# Camera

<div align="left"><img src="/files/-MIxukRZovPvw4CViGdy" alt=""></div>

| Property    | Function                                                                                                                                                                           | Type                                                                                                                                                                                                                                                           |
| ----------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Fill mode   | <p>Image fill mode<br><br><strong>Actions editor:</strong><br><code>Property > Camera > Fill mode</code><br><strong>Code:</strong><br><code>widget.content.fillMode</code></p>     | <p><code>enum</code><br><br><strong>Values:</strong><br><code>Stretch</code><br><code>PreserveAspectFit</code><br><code>PreserveAspectCrop</code><br><code>Tile</code><br><code>TileVertically</code><br><code>TileHorizontally</code><br><code>Pad</code></p> |
| Device id   | <p>Camera device id<br><br><strong>Actions editor:</strong><br><code>Property > Camera > Device id</code><br><strong>Code:</strong><br><code>widget.content.deviceId</code></p>    | `string`                                                                                                                                                                                                                                                       |
| CapturedUrl | <p>Not documented<br><br><strong>Actions editor:</strong><br><code>Property > Camera > CapturedUrl</code><br><strong>Code:</strong><br><code>widget.content.capturedUrl</code></p> | `string`                                                                                                                                                                                                                                                       |
| Orientation | <p>Not documented<br><br><strong>Actions editor:</strong><br><code>Property > Camera > Orientation</code><br><strong>Code:</strong><br><code>widget.content.orientation</code></p> | `int`                                                                                                                                                                                                                                                          |
| Position    | <p>Not documented<br><br><strong>Actions editor:</strong><br><code>Property > Camera > Position</code><br><strong>Code:</strong><br><code>widget.content.position</code></p>       | `int`                                                                                                                                                                                                                                                          |

## Actions

| Property             | Function                                                                                                                                                                                             |
| -------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Capture              | <p>Save camera frame to image<br><br><strong>Actions editor:</strong><br><code>Actions > Common > Capture</code><br><strong>Code:</strong><br><code>widget.content.script.actionCapture()</code></p> |
| Turn on front camera | <p><strong>Actions editor:</strong><br><code>Actions > Common > Turn on front camera</code><br><strong>Code:</strong><br><code>widget.content.script.actionSetFrontPosition()</code></p>             |
| Turn on rear camera  | <p><strong>Actions editor:</strong><br><code>Actions > Common > Turn on rear camera</code><br><strong>Code:</strong><br><code>widget.content.script.actionSetRearPosition()</code></p>               |
| Toggle front/rear    | <p><strong>Actions editor:</strong><br><code>Actions > Common > Toggle front/rear</code><br><strong>Code:</strong><br><code>widget.content.script.actionToggleCameraPosition()</code></p>            |

## Events

| Property | Function                                                                                                                                                                                             |
| -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Captured | <p>Event when camera frame was captured<br><br><strong>Actions editor:</strong><br><code>Event > Captured</code><br><strong>Code:</strong><br><code>widget.content.script.eventCaptured()</code></p> |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.flipabit.dev/api/widget/camera.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
