Skip to main content

Camera

The Camera component allows users to capture photos and record videos directly from their camera. It provides device selection, fullscreen mode, and controls for capturing images or recording video. In this document, we'll go through all the configuration options for the Camera component.

Properties

Property
Description
Expected Value
ContentDetermines whether the component captures images or videos.Select either Image or Video from the dropdown.

Events

EventDescription
On recording startTriggers when the user starts recording video (only applicable when Content is set to Video).
On recording saveTriggers when the user saves the recorded video (only applicable when Content is set to Video).
On image saveTriggers when the user saves a captured image (only applicable when Content is set to Image).
info

Check Action Reference docs to get detailed information about all the Actions.

Component Specific Actions (CSA)

The following actions of the component can be controlled using the component-specific actions (CSA), you can trigger it using an event or use a RunJS query.

Action
Description
How To Access
resetVideo()Clears the recorded video and resets the video data.components.camera1.resetVideo()
resetImage()Clears the captured image and resets the image data.components.camera1.resetImage()
setVisibility()Sets the visibility of the component.components.camera1.setVisibility(false)
setDisable()Disables the component.components.camera1.setDisable(true)

Exposed Variables

VariableDescriptionHow To Access
imageDataURLHolds the captured image as a data URL (base64 encoded).{{components.camera1.imageDataURL}}
videoDataURLHolds the recorded video as a data URL (base64 encoded).{{components.camera1.videoDataURL}}
isVisibleIndicates if the component is visible.{{components.camera1.isVisible}}
isDisabledIndicates if the component is disabled.{{components.camera1.isDisabled}}

Additional Actions

Action
Description
Configuration Options
VisibilityControls component visibility. Toggle or set dynamically.Enable/disable the toggle button or dynamically configure the value by clicking on fx and entering a logical expression.
DisableEnables or disables the component. Toggle or set dynamically.Enable/disable the toggle button or dynamically configure the value by clicking on fx and entering a logical expression.
TooltipProvides additional information on hover. Set a string value for display.String (e.g., Capture photos or record videos. ).

Devices

Property
Description
Expected Value
Show on desktopMakes the component visible in desktop view.You can set it with the toggle button or dynamically configure the value by clicking on fx and entering a logical expression.
Show on mobileMakes the component visible in mobile view.You can set it with the toggle button or dynamically configure the value by clicking on fx and entering a logical expression.

Styles

Recorder

Style Property
Description
Configuration Options
Text colorSets the color of the text displayed in the component.Select the color or click on fx and input code that programmatically returns a Hex color code.
Accent colorSets the accent color used for buttons and controls.Select the color or click on fx and input code that programmatically returns a Hex color code.

Container

Style Property
Description
Configuration Options
BackgroundSets the background color of the component.Select the color or click on fx and input code that programmatically returns a Hex color code.
BorderSets the border color of the component.Select the color or click on fx and input code that programmatically returns a Hex color code.
Border radiusModifies the border radius of the component.Enter a number or click on fx and enter a code that programmatically returns a numeric value.
Box shadowSets the box shadow properties of the component.Select the box shadow color and adjust the related properties or set it programmatically using fx.