CONTROL

Camera

Camera captures one still photo from the device camera. Permission is requested only when the user starts capture, and the resulting local URL is delivered to the selected function.

PORTABLE CAPTURE

One photo contract, three targets

The same start, capture, and error events are generated for web, iOS, and Android.

PLAYGROUND

Start with an explicit user action

The preview keeps the permission boundary visible. Dowe does not open the camera while the page is loading.

Take photo

Status:

Use the capture callback item in the surrounding workflow.

dowe
fn cameraStart
  set cameraStatus value:"Camera started"
fn cameraCapture
  set cameraStatus value:"Photo captured"
Camera facing:"user" label:"Take photo" onStart:cameraStart onCapture:cameraCapture onError:cameraError

EVENTS

Use the item in fn

onStart receives source, kind, and facing. onCapture also includes mimeType, url, width, and height. onError receives a stable source, kind, and error value.

The URL is a browser object URL on web, a temporary file URL on iOS, and a cache URI on Android. Dowe does not upload the file automatically.

API

Props

Camera also accepts common spacing, sizing, border, visibility, and accessibility props.

Prop
Type
Default

No data

There are no records to display