Interface: WebcamOptions
Configuration options for the Webcam component.
Extends
Properties
| Property | Type | Description |
|---|---|---|
align? | Align | - |
background? | string | Optional background fill color behind the video. Defaults to var(--sr-surface-subtle, #1e293b). |
blur? | number | Blur in virtual pixels (default: 0). |
brightness? | number | Brightness multiplier (default: 1). |
className? | string | - |
color? | string | Foreground CSS color (default: component/theme color). |
customPositioned? | boolean | Whether this element manages its own CSS transform / positioning (disables stage translate3d). |
cycleOnClick? | boolean | Double-click webcam to cycle through connected cameras. Defaults to true. |
deviceId? | string | Explicit device ID or camera label substring. |
enterDelay? | number | Delay in seconds before entering scene transition begins. |
enterDuration? | number | Duration in seconds for entering scene transition. |
exitDelay? | number | Delay in seconds before exiting scene transition begins. |
exitDuration? | number | Duration in seconds for exiting scene transition. |
facingMode? | "user" | "environment" | Camera orientation: "user" (front selfie) |
fit? | ImageFit | Sizing fit: "cover" (default, ideal for round avatars) |
height? | Size | Height in stage units or CSS length (default: content size). |
id? | string | - |
idealHeight? | number | Ideal video capture height in pixels. Defaults to 720. |
idealWidth? | number | Ideal video capture width in pixels. Defaults to 1280. |
mirror? | boolean | Mirror horizontally so presenter movement feels natural. Defaults to true for "user" camera. |
onActivate? | () => void | - |
onDeactivate? | () => void | - |
onMount? | () => void | - |
onUnmount? | () => void | - |
opacity? | number | Whole-element opacity from 0 to 1 (default: 1). |
origin? | ElementAnchor | Which point of the element sits on its coordinate (default: "top-left"). |
position? | Position | - |
rotation? | number | Rotation in degrees (default: 0). |
scale? | number | Scale multiplier (default: 1). |
size? | Size | Both dimensions in stage units or CSS length (default: unset). |
style? | Properties<0 | string & object, string & object> | - |
theme? | Partial<ThemeConfig> | - |
width? | Size | Width in stage units or CSS length (default: content size). |
x? | PositionCoord | Horizontal position in stage units (default: 0). |
y? | PositionCoord | Vertical position in stage units (default: 0). |