Skip to content

Record your screen, ship a demo. Free and open-source, GPU-accelerated, no watermarks, no subscriptions. Windows, macOS, Linux. Actively maintained.

fix(camera): fall back to the given shape's own default roundness

EtienneLescot32c937042a08
diff --git a/src/lib/compositeLayout.ts b/src/lib/compositeLayout.ts
index 044270ce9..891361213 100644
--- a/src/lib/compositeLayout.ts
+++ b/src/lib/compositeLayout.ts
@@ -429,7 +429,9 @@ export function computeCompositeLayout(params: {
webcamSizePreset = 25,
webcamAnchor = "bottom-right",
webcamMaskShape = "rectangle",
- webcamRoundness = DEFAULT_WEBCAM_ROUNDNESS.rectangle,
+ webcamRoundness = DEFAULT_WEBCAM_ROUNDNESS[
+ webcamMaskShape === "square" || webcamMaskShape === "circle" ? "square" : "rectangle"
+ ],
frame = "none",
} = params;
const { width: canvasWidth, height: canvasHeight } = canvasSize;