> For the complete documentation index, see [llms.txt](https://docs.flipabit.dev/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.flipabit.dev/api/widget/camera.md).

# 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
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
