🟧 Input Camera
🟧 Input Camera
The Visual Capture block allows you to capture images via the device camera, access the photo gallery or upload an image file, providing modern multimedia interaction to enrich interactive stories.
This block breaks with traditional textual interfaces by providing access to the hardware functionalities of the device (camera, gallery) to integrate visual media directly into the application flow.
📥 Entries
- source (Optional - Text): Allows you to force the acquisition source (eg: "Gallery", "Front camera", "Rear camera"). Without specification, the user chooses the default source.
- Incoming Stream: This block is activated via a standard incoming stream, without requiring other mandatory parameters.
📤 Outings
- capture (Image Resource): Provides the captured or selected image in the form of a resource that can be used directly by other blocks (eg: display, AI processing).
- completed (Stream): Signal indicating that the capture or upload process is completed and that the resource is ready in memory.
💡 Example of use
Scenario: Creating a custom avatar for a role-playing game
- The player arrives on the character customization screen.
- A pop-up message invites him to “Take a photo or choose an image from his gallery”.
- The Visual input block is triggered via an incoming flow (e.g.: “Add a photo” button).
- After validation of permissions by the browser/OS, the player takes a selfie or selects an existing image.
- The capture output is passed to an Image View block to preview the avatar.
- Exiting done activates a confirmation animation ("Avatar saved!").
⚙️ Technical Details
- Permissions management: This block requires explicit authorizations (camera/gallery) via a prior HTTPS request. Without consent, the block silently fails.
- Compatibility: Works in web environment (PWA recommended) and on mobile (iOS/Android). Browser/OS restrictions may limit certain sources (e.g. front camera only).
- Storage: The image resource is managed in asynchronous memory and can be used directly by other blocks without technical manipulation (base64, blob, etc.).
Updated on: 04/03/2026
Thank you!
