TakePictureEventSchema
Opens the camera through the client's CameraManager and emits the captured photo downstream. Runs on the IO dispatcher.
When compression is set the bytes are re-encoded through the client's ImageCompressor (the capture is treated as image/png), with resize applied as part of the same pass (default resize options are used when resize is null). When compression is null the original bytes are emitted untouched and resize has no effect.
outputType decides the shape handed to the next events: ArrayOfBytes or a Base64 String.
incomingData consumed: not used.
Triggers fired:
OnSuccessEventTrigger— when a picture was taken and processed; the image, in the shape chosen by outputType, is passed as incomingData.OnCancelledEventTrigger— when the camera returns nothing, such as the user backing out of the capture. No data is passed downstream.OnFailureEventTrigger— when capturing or compressing throws; theThrowableis passed as incomingData.
Constructors
Properties
This event's own children — each declaring, via its own trigger, which of this event's outgoing triggers runs it. null when this event declares no children.
The condition that must occur for this event to run — matched by structural equality (data class/data object equality) against whatever trigger value fired, never by any kind of subscription or listener registry.