Record your screen, ship a demo. Free and open-source, GPU-accelerated, no watermarks, no subscriptions. Windows, macOS, Linux. Actively maintained.
TypeScript cross-platformelectronffmpegopen-sourceproduct-demorustscreen-capturescreen-recorderscreen-recordingscreen-studioscreencastspeech-to-texttypescriptvideo-editingvideo-editorwaylandwgpuwhisper
feat: add 'No Webcam' layout preset to hide webcam in final recording
Ayusman Singhalada1f434f708
diff --git a/src/components/video-editor/SettingsPanel.tsx b/src/components/video-editor/SettingsPanel.tsxindex 76ff762dd..6cadead0e 100644--- a/src/components/video-editor/SettingsPanel.tsx+++ b/src/components/video-editor/SettingsPanel.tsx@@ -821,6 +821,7 @@ export function SettingsPanel({<SelectContent>{WEBCAM_LAYOUT_PRESETS.filter((preset) => {if (preset.value === "picture-in-picture") return true;+ if (preset.value === "no-webcam") return true;if (preset.value === "vertical-stack") return isPortraitCanvas;return !isPortraitCanvas;}).map((preset) => (@@ -829,7 +830,9 @@ export function SettingsPanel({? t("layout.pictureInPicture"): preset.value === "vertical-stack"? t("layout.verticalStack")- : t("layout.dualFrame")}+ : preset.value === "no-webcam"+ ? t("layout.noWebcam")+ : t("layout.dualFrame")}</SelectItem>))}</SelectContent>diff --git a/src/components/video-editor/projectPersistence.ts b/src/components/video-editor/projectPersistence.tsindex 8d134282d..aec570f9d 100644--- a/src/components/video-editor/projectPersistence.ts+++ b/src/components/video-editor/projectPersistence.ts@@ -100,6 +100,7 @@ function computeNormalizedWebcamLayoutPreset(): WebcamLayoutPreset {switch (webcamLayoutPreset) {case "picture-in-picture":+ case "no-webcam":return webcamLayoutPreset;case "vertical-stack":return isPortraitAspectRatio(normalizedAspectRatio)diff --git a/src/i18n/locales/en/settings.json b/src/i18n/locales/en/settings.jsonindex 557fb14e8..aeac04f88 100644--- a/src/i18n/locales/en/settings.json+++ b/src/i18n/locales/en/settings.json@@ -35,6 +35,7 @@"pictureInPicture": "Picture in Picture","verticalStack": "Vertical Stack","dualFrame": "Dual Frame",+ "noWebcam": "No Webcam","webcamShape": "Camera Shape","webcamSize": "Webcam Size"},diff --git a/src/lib/compositeLayout.ts b/src/lib/compositeLayout.tsindex e6db73375..93161c068 100644--- a/src/lib/compositeLayout.ts+++ b/src/lib/compositeLayout.ts@@ -15,7 +15,11 @@ export interface Size {height: number;}-export type WebcamLayoutPreset = "picture-in-picture" | "vertical-stack" | "dual-frame";+export type WebcamLayoutPreset =+ | "picture-in-picture"+ | "vertical-stack"+ | "dual-frame"+ | "no-webcam";/** Webcam size as a percentage of the canvas reference dimension (10–50). */export type WebcamSizePreset = number;@@ -126,6 +130,21 @@ const WEBCAM_LAYOUT_PRESET_MAP: Record<WebcamLayoutPreset, WebcamLayoutPresetDef},shadow: null,},+ "no-webcam": {+ label: "No Webcam",+ transform: {+ type: "overlay",+ marginFraction: 0,+ minMargin: 0,+ minSize: 0,+ },+ borderRadius: {+ max: 0,+ min: 0,+ fraction: 0,+ },+ shadow: null,+ },};export const WEBCAM_LAYOUT_PRESETS = Object.entries(WEBCAM_LAYOUT_PRESET_MAP).map(@@ -172,6 +191,17 @@ export function computeCompositeLayout(params: {} = params;const { width: canvasWidth, height: canvasHeight } = canvasSize;const { width: screenWidth, height: screenHeight } = screenSize;++ // "no-webcam" preset: hide the webcam entirely, screen fills the canvas normally+ if (layoutPreset === "no-webcam") {+ const screenRect = centerRect({+ canvasSize,+ size: screenSize,+ maxSize: maxContentSize,+ });+ return { screenRect, webcamRect: null };+ }+const webcamWidth = webcamSize?.width;const webcamHeight = webcamSize?.height;const preset = getWebcamLayoutPresetDefinition(layoutPreset);