Skip to content

Create polished demo videos without editing skills. Mac/Windows/Linux

fix: address settings and extensions review feedback

webadderalle5dd20bf8214
diff --git a/src/components/video-editor/SettingsPanel.tsx b/src/components/video-editor/SettingsPanel.tsx
index 33a990d4..e3f1d4ca 100644
--- a/src/components/video-editor/SettingsPanel.tsx
+++ b/src/components/video-editor/SettingsPanel.tsx
@@ -2188,10 +2188,16 @@ export function SettingsPanel({
<div className="flex items-center justify-between gap-3 rounded-lg bg-white/[0.03] px-2.5 py-2">
<div>
<div className="text-[11px] font-medium text-slate-200">
- Auto-apply fresh recording zooms
+ {tSettings(
+ "effects.autoApplyFreshRecordingZooms",
+ "Auto-apply fresh recording zooms",
+ )}
</div>
<div className="mt-0.5 text-[10px] text-slate-500">
- Suggest cursor-follow zooms automatically when you open a new recording.
+ {tSettings(
+ "effects.autoApplyFreshRecordingZoomsDescription",
+ "Suggest cursor-follow zooms automatically when you open a new recording.",
+ )}
</div>
</div>
<Switch
@@ -2203,10 +2209,13 @@ export function SettingsPanel({
<div className="flex items-center justify-between gap-3 rounded-lg bg-white/[0.03] px-2.5 py-2">
<div>
<div className="text-[11px] font-medium text-slate-200">
- Connect neighboring zooms
+ {tSettings("effects.connectZooms", "Connect neighboring zooms")}
</div>
<div className="mt-0.5 text-[10px] text-slate-500">
- Smooth consecutive zoom regions into a continuous camera move.
+ {tSettings(
+ "effects.connectZoomsDescription",
+ "Smooth consecutive zoom regions into a continuous camera move.",
+ )}
</div>
</div>
<Switch
@@ -2267,7 +2276,7 @@ export function SettingsPanel({
: "text-slate-400 hover:text-slate-200",
)}
>
- Auto
+ {tSettings("zoom.modeAuto", "Auto")}
</button>
<button
type="button"
@@ -2279,13 +2288,19 @@ export function SettingsPanel({
: "text-slate-400 hover:text-slate-200",
)}
>
- Manual
+ {tSettings("zoom.modeManual", "Manual")}
</button>
</div>
<p className="mt-1.5 text-[10px] text-slate-500">
{selectedZoomMode === "manual"
- ? "Set a fixed focus point for this zoom"
- : "Camera follows cursor automatically"}
+ ? tSettings(
+ "zoom.modeManualDescription",
+ "Set a fixed focus point for this zoom",
+ )
+ : tSettings(
+ "zoom.modeAutoDescription",
+ "Camera follows cursor automatically",
+ )}
</p>
</div>
<div className="grid grid-cols-6 gap-1.5">
@@ -2376,7 +2391,7 @@ export function SettingsPanel({
const clipSectionContent = (
<section className="flex flex-col gap-2">
<div className="flex items-center justify-between gap-3">
- <SectionLabel>Clip</SectionLabel>
+ <SectionLabel>{tSettings("clip.title", "Clip")}</SectionLabel>
{selectedClipSpeed != null && selectedClipSpeed !== 1 && (
<span className="rounded-full bg-[#06b6d4]/10 px-2 py-0.5 text-[10px] font-medium uppercase tracking-wider text-[#06b6d4]">
{selectedClipSpeed}×
@@ -2384,7 +2399,9 @@ export function SettingsPanel({
)}
</div>
<div className="flex items-center justify-between rounded-lg bg-white/[0.03] px-2.5 py-1.5">
- <span className="text-[10px] text-slate-400">Mute Audio</span>
+ <span className="text-[10px] text-slate-400">
+ {tSettings("clip.muteAudio", "Mute Audio")}
+ </span>
<Switch
checked={selectedClipMuted ?? false}
onCheckedChange={(v) => onClipMutedChange?.(v)}
@@ -2392,7 +2409,7 @@ export function SettingsPanel({
/>
</div>
<div className="flex items-center gap-3">
- <SectionLabel>Speed</SectionLabel>
+ <SectionLabel>{tSettings("speed.label", "Speed")}</SectionLabel>
</div>
<div className="grid grid-cols-4 gap-1.5">
{[
@@ -2441,7 +2458,7 @@ export function SettingsPanel({
className="mt-1 h-8 w-full gap-2 border border-red-500/20 bg-red-500/10 text-xs text-red-400 transition-all hover:border-red-500/30 hover:bg-red-500/20"
>
<Trash2 className="h-3 w-3" />
- Delete Clip
+ {tSettings("clip.delete", "Delete Clip")}
</Button>
)}
</section>
diff --git a/src/components/video-editor/TutorialHelp.tsx b/src/components/video-editor/TutorialHelp.tsx
index fbfa6461..c06b659e 100644
--- a/src/components/video-editor/TutorialHelp.tsx
+++ b/src/components/video-editor/TutorialHelp.tsx
@@ -22,6 +22,11 @@ const CONTACT_EMAIL = "[email protected]";
export const APP_HEADER_ACTION_BUTTON_CLASS = "h-7 px-2 text-xs text-slate-400 hover:bg-white/10 hover:text-slate-200 transition-all gap-1.5";
export const APP_HEADER_ICON_BUTTON_CLASS = "h-7 w-7 p-0 text-slate-400 hover:bg-white/10 hover:text-slate-200 transition-all";
+interface KeyboardShortcutsDialogProps {
+ triggerLabel?: string;
+ triggerClassName?: string;
+}
+
function DiscordIcon(props: React.SVGProps<SVGSVGElement>) {
return (
<svg viewBox="0 0 24 24" fill="currentColor" aria-hidden="true" {...props}>
@@ -137,7 +142,10 @@ export function FeedbackDialog() {
);
}
-export function KeyboardShortcutsDialog() {
+export function KeyboardShortcutsDialog({
+ triggerLabel,
+ triggerClassName,
+}: KeyboardShortcutsDialogProps) {
const { shortcuts, isMac, openConfig } = useShortcuts();
const t = useScopedT("editor");
const [scrollLabels, setScrollLabels] = useState({
@@ -158,11 +166,12 @@ export function KeyboardShortcutsDialog() {
<Button
variant="ghost"
size="sm"
- className={APP_HEADER_ICON_BUTTON_CLASS}
+ className={triggerClassName ?? APP_HEADER_ICON_BUTTON_CLASS}
title={t("keyboardShortcuts.trigger", "Shortcuts")}
aria-label={t("keyboardShortcuts.trigger", "Shortcuts")}
>
<Keyboard className="h-3.5 w-3.5" />
+ {triggerLabel ? <span className="font-medium">{triggerLabel}</span> : null}
</Button>
</DialogTrigger>
<DialogContent className="max-w-lg bg-[#09090b] border-white/10 [&>button]:text-slate-400 [&>button:hover]:text-white">
diff --git a/src/components/video-editor/VideoEditor.tsx b/src/components/video-editor/VideoEditor.tsx
index d9759756..a8338458 100644
--- a/src/components/video-editor/VideoEditor.tsx
+++ b/src/components/video-editor/VideoEditor.tsx
@@ -1767,17 +1767,22 @@ export default function VideoEditor() {
loadInitialData();
}, [
applyLoadedProject,
- autoApplyFreshRecordingAutoZooms,
smokeExportConfig.enabled,
smokeExportConfig.inputPath,
]);
+ useEffect(() => {
+ pendingFreshRecordingAutoZoomPathRef.current =
+ autoApplyFreshRecordingAutoZooms && videoPath ? videoPath : null;
+ }, [autoApplyFreshRecordingAutoZooms, videoPath]);
+
useEffect(() => {
saveEditorPreferences({
wallpaper,
shadowIntensity,
backgroundBlur,
zoomMotionBlur,
+ autoApplyFreshRecordingAutoZooms,
connectZooms,
zoomInDurationMs,
zoomInOverlapMs,
@@ -2657,12 +2662,14 @@ export default function VideoEditor() {
startMs: target.startMs,
endMs: Math.round(splitMs),
speed: target.speed,
+ muted: target.muted,
};
const right: ClipRegion = {
id: rightId,
startMs: Math.round(splitMs),
endMs: target.endMs,
speed: target.speed,
+ muted: target.muted,
};
return prev.flatMap((c) => (c.id === target.id ? [left, right] : [c]));
});
@@ -3579,7 +3586,7 @@ export default function VideoEditor() {
: smokeExportConfig.enabled
? (smokeExportConfig.backendPreference ??
(smokeExportConfig.useNativeExport ? "breeze" : "webcodecs"))
- : "auto";
+ : (settings.backendPreference ?? exportBackendPreference);
const supportedSourceDimensions =
await ensureSupportedMp4SourceDimensions(selectedMp4FrameRate);
const { width: exportWidth, height: exportHeight } =
@@ -5122,7 +5129,7 @@ export default function VideoEditor() {
cursorTelemetry={normalizedCursorTelemetry}
autoSuggestZoomsTrigger={autoSuggestZoomsTrigger}
onAutoSuggestZoomsConsumed={handleAutoSuggestZoomsConsumed}
- zoomRegions={effectiveZoomRegions}
+ zoomRegions={zoomRegions}
onZoomAdded={handleZoomAdded}
onZoomSuggested={handleZoomSuggested}
onZoomSpanChange={handleZoomSpanChange}
diff --git a/src/components/video-editor/projectPersistence.ts b/src/components/video-editor/projectPersistence.ts
index d5b4357f..3dc91615 100644
--- a/src/components/video-editor/projectPersistence.ts
+++ b/src/components/video-editor/projectPersistence.ts
@@ -151,7 +151,7 @@ export function normalizeExportPipelineModel(value: unknown): ExportPipelineMode
return value;
}
- return "modern";
+ return "legacy";
}
export function normalizeExportMp4FrameRate(value: unknown): ExportMp4FrameRate {
@@ -381,6 +381,7 @@ export function normalizeProjectEditor(editor: Partial<ProjectEditorState>): Pro
startMs,
endMs,
speed: isFiniteNumber(region.speed) ? region.speed : 1,
+ muted: typeof region.muted === "boolean" ? region.muted : false,
};
})
: [];
diff --git a/src/components/video-editor/timeline/TimelineEditor.tsx b/src/components/video-editor/timeline/TimelineEditor.tsx
index 144913c4..217ecd91 100644
--- a/src/components/video-editor/timeline/TimelineEditor.tsx
+++ b/src/components/video-editor/timeline/TimelineEditor.tsx
@@ -1,4 +1,4 @@
-import { useCallback, useEffect, useMemo, useRef, useState, type KeyboardEvent as ReactKeyboardEvent, type WheelEvent } from "react";
+import { forwardRef, useCallback, useEffect, useImperativeHandle, useMemo, useRef, useState, type KeyboardEvent as ReactKeyboardEvent, type WheelEvent } from "react";
import { useTimelineContext } from "dnd-timeline";
import { Button } from "@/components/ui/button";
import {
@@ -37,6 +37,7 @@ const TARGET_MARKER_COUNT = 12;
interface TimelineEditorProps {
videoDuration: number;
currentTime: number;
+ playheadTime?: number;
onSeek?: (time: number) => void;
cursorTelemetry?: CursorTelemetryPoint[];
autoSuggestZoomsTrigger?: number;
@@ -62,7 +63,7 @@ interface TimelineEditorProps {
selectedClipId?: string | null;
onSelectClip?: (id: string | null) => void;
annotationRegions?: AnnotationRegion[];
- onAnnotationAdded?: (span: Span) => void;
+ onAnnotationAdded?: (span: Span, trackIndex?: number) => void;
onAnnotationSpanChange?: (id: string, span: Span) => void;
onAnnotationDelete?: (id: string) => void;
selectedAnnotationId?: string | null;
@@ -79,11 +80,26 @@ interface TimelineEditorProps {
onAudioDelete?: (id: string) => void;
selectedAudioId?: string | null;
onSelectAudio?: (id: string | null) => void;
- aspectRatio: AspectRatio;
- onAspectRatioChange: (aspectRatio: AspectRatio) => void;
+ aspectRatio?: AspectRatio;
+ onAspectRatioChange?: (aspectRatio: AspectRatio) => void;
onOpenCropEditor?: () => void;
isCropped?: boolean;
videoPath?: string | null;
+ isPlaying?: boolean;
+ onTogglePlayPause?: () => void;
+ volume?: number;
+ onVolumeChange?: (volume: number) => void;
+ hideToolbar?: boolean;
+}
+
+export interface TimelineEditorHandle {
+ addZoom: () => void;
+ suggestZooms: () => void;
+ splitClip: () => void;
+ addAnnotation: (trackIndex?: number) => void;
+ addAudio: () => Promise<void>;
+ toggleCollapsed: () => void;
+ keyframes: { id: string; time: number }[];
}
interface TimelineScaleConfig {
@@ -625,9 +641,10 @@ function Timeline({
);
}
-export default function TimelineEditor({
+const TimelineEditor = forwardRef<TimelineEditorHandle, TimelineEditorProps>(function TimelineEditor({
videoDuration,
currentTime,
+ playheadTime,
onSeek,
cursorTelemetry = [],
autoSuggestZoomsTrigger = 0,
@@ -670,16 +687,16 @@ export default function TimelineEditor({
onAudioDelete,
selectedAudioId,
onSelectAudio,
- aspectRatio,
- onAspectRatioChange,
+ aspectRatio = 'native',
+ onAspectRatioChange = () => {},
onOpenCropEditor,
isCropped = false,
videoPath,
-}: TimelineEditorProps) {
+}, ref) {
const t = useScopedT("settings");
const initialEditorPreferences = useMemo(() => loadEditorPreferences(), []);
const totalMs = useMemo(() => Math.max(0, Math.round(videoDuration * 1000)), [videoDuration]);
- const currentTimeMs = useMemo(() => Math.round(currentTime * 1000), [currentTime]);
+ const currentTimeMs = useMemo(() => Math.round((playheadTime ?? currentTime) * 1000), [currentTime, playheadTime]);
const timelineScale = useMemo(() => calculateTimelineScale(videoDuration), [videoDuration]);
const safeMinDurationMs = useMemo(
() => (totalMs > 0 ? Math.min(timelineScale.minItemDurationMs, totalMs) : timelineScale.minItemDurationMs),
@@ -1239,7 +1256,7 @@ export default function TimelineEditor({
onAudioAdded({ start: startPos, end: startPos + actualDuration }, result.path);
}, [videoDuration, totalMs, currentTimeMs, audioRegions, onAudioAdded]);
- const handleAddAnnotation = useCallback(() => {
+ const handleAddAnnotation = useCallback((trackIndex = 0) => {
if (!videoDuration || videoDuration === 0 || totalMs === 0 || !onAnnotationAdded) {
return;
}
@@ -1253,7 +1270,7 @@ export default function TimelineEditor({
const startPos = Math.max(0, Math.min(currentTimeMs, totalMs));
const endPos = Math.min(startPos + defaultDuration, totalMs);
- onAnnotationAdded({ start: startPos, end: endPos });
+ onAnnotationAdded({ start: startPos, end: endPos }, trackIndex);
}, [videoDuration, totalMs, currentTimeMs, onAnnotationAdded, defaultRegionDurationMs]);
useEffect(() => {
@@ -1351,6 +1368,16 @@ export default function TimelineEditor({
};
}, [range, totalMs]);
+ useImperativeHandle(ref, () => ({
+ addZoom: handleAddZoom,
+ suggestZooms: handleSuggestZooms,
+ splitClip: handleSplitClip,
+ addAnnotation: handleAddAnnotation,
+ addAudio: handleAddAudio,
+ toggleCollapsed: () => {},
+ keyframes,
+ }), [handleAddAnnotation, handleAddAudio, handleAddZoom, handleSuggestZooms, handleSplitClip, keyframes]);
+
const timelineItems = useMemo<TimelineRenderItem[]>(() => {
const zooms: TimelineRenderItem[] = zoomRegions.map((region, index) => ({
id: region.id,
@@ -1510,7 +1537,7 @@ export default function TimelineEditor({
<WandSparkles className="w-4 h-4" />
</Button>
<Button
- onClick={handleAddAnnotation}
+ onClick={() => handleAddAnnotation()}
variant="ghost"
size="icon"
className="h-7 w-7 text-slate-400 hover:text-[#B4A046] hover:bg-[#B4A046]/10 transition-all"
@@ -1686,4 +1713,8 @@ export default function TimelineEditor({
</div>
</div>
);
-}
+});
+
+TimelineEditor.displayName = "TimelineEditor";
+
+export default TimelineEditor;
diff --git a/src/components/video-editor/types.ts b/src/components/video-editor/types.ts
index 91d77a37..0d71fbb7 100644
--- a/src/components/video-editor/types.ts
+++ b/src/components/video-editor/types.ts
@@ -131,6 +131,13 @@ export interface ClipRegion {
startMs: number;
endMs: number;
speed: number;
+ muted?: boolean;
+}
+
+export function getClipSourceEndMs(clip: ClipRegion): number {
+ const displayDurationMs = Math.max(0, clip.endMs - clip.startMs);
+ const speed = Number.isFinite(clip.speed) && clip.speed > 0 ? clip.speed : 1;
+ return Math.round(clip.startMs + displayDurationMs * speed);
}
/** Convert clip regions (kept segments) to trim regions (gaps to remove). */
@@ -144,7 +151,7 @@ export function clipsToTrims(clips: ClipRegion[], totalDurationMs: number): Trim
if (clip.startMs > cursor) {
trims.push({ id: `trim-gap-${trimId++}`, startMs: cursor, endMs: clip.startMs });
}
- cursor = clip.endMs;
+ cursor = getClipSourceEndMs(clip);
}
if (cursor < totalDurationMs) {
trims.push({ id: `trim-gap-${trimId++}`, startMs: cursor, endMs: totalDurationMs });
@@ -243,6 +250,7 @@ export interface AnnotationRegion {
size: AnnotationSize;
style: AnnotationTextStyle;
zIndex: number;
+ trackIndex?: number;
figureData?: FigureData;
blurIntensity?: number;
blurColor?: string;
@@ -296,6 +304,7 @@ export interface AudioRegion {
endMs: number;
audioPath: string;
volume: number;
+ trackIndex?: number;
}
export interface CaptionCue {
diff --git a/src/contexts/ShortcutsContext.tsx b/src/contexts/ShortcutsContext.tsx
index 84f14175..8b80818a 100644
--- a/src/contexts/ShortcutsContext.tsx
+++ b/src/contexts/ShortcutsContext.tsx
@@ -38,14 +38,16 @@ export function ShortcutsProvider({ children }: { children: ReactNode }) {
.then(setIsMac)
.catch(() => undefined);
- window.electronAPI
- ?.getShortcuts?.()
- .then((saved) => {
+ void (async () => {
+ try {
+ const saved = await window.electronAPI?.getShortcuts?.();
if (saved) {
setShortcuts(mergeWithDefaults(saved as Partial<ShortcutsConfig>));
}
- })
- .catch(() => undefined);
+ } catch {
+ return undefined;
+ }
+ })();
}, []);
const persistShortcuts = useCallback(
diff --git a/src/hooks/useExtensions.ts b/src/hooks/useExtensions.ts
index 1c08b5f3..0f2c4754 100644
--- a/src/hooks/useExtensions.ts
+++ b/src/hooks/useExtensions.ts
@@ -71,14 +71,25 @@ export function useExtensions(): UseExtensionsResult {
const activatingRef = useRef(new Set<string>());
const discoverAndSync = useCallback(async (): Promise<ExtensionInfo[]> => {
- if (!electronAPI?.extensionsDiscover) return [];
+ let discovered: ExtensionInfo[] = [];
- const discovered: ExtensionInfo[] = await electronAPI.extensionsDiscover();
- setExtensions(discovered);
- setReady(true);
- await extensionHost.syncConfiguredExtensions(discovered);
+ try {
+ if (!electronAPI?.extensionsDiscover) {
+ setExtensions([]);
+ return [];
+ }
+
+ discovered = await electronAPI.extensionsDiscover();
+ setExtensions(discovered);
+ await extensionHost.syncConfiguredExtensions(discovered);
- return discovered;
+ return discovered;
+ } catch (error) {
+ console.error("[extensions] Failed to discover extensions:", error);
+ return discovered;
+ } finally {
+ setReady(true);
+ }
}, []);
const refresh = useCallback(async () => {
@@ -144,7 +155,8 @@ export function useExtensions(): UseExtensionsResult {
}
}
} catch (err) {
- console.error(`[extensions] Failed to toggle ${id}:`, err); throw err; } finally {
+ console.error(`[extensions] Failed to toggle ${id}:`, err);
+ } finally {
activatingRef.current.delete(id);
}
},
diff --git a/src/i18n/locales/en/extensions.json b/src/i18n/locales/en/extensions.json
index 8678ac62..b1be4045 100644
--- a/src/i18n/locales/en/extensions.json
+++ b/src/i18n/locales/en/extensions.json
@@ -1,60 +1,60 @@
{
- "title": "Extensions",
- "tabs": {
- "browse": "Browse",
- "installed": "Installed"
- },
- "actions": {
- "submit": "Submit an extension",
- "docs": "Extension docs",
- "refresh": "Refresh",
- "openFolder": "Open extensions folder",
- "uninstall": "Uninstall",
- "install": "Install",
- "installing": "Installing",
- "add": "Add",
- "retry": "Retry",
- "close": "Close",
- "folder": "Folder"
- },
- "status": {
- "enabled": "Enabled",
- "disabled": "Disabled",
- "installed": "Installed"
- },
- "detail": {
- "by": "By {{author}}",
- "unknownAuthor": "Unknown author",
- "noDescription": "No description",
- "downloads": "{{count}} downloads",
- "preview": "Preview",
- "screenshotAlt": "Screenshot {{number}}",
- "description": "Description",
- "tags": "Tags",
- "permissions": "Permissions",
- "location": "Location",
- "error": "Error: {{message}}"
- },
- "empty": {
- "title": "No Extensions",
- "description": "Install extensions to add frames, cursor effects, and editor tools."
- },
- "search": {
- "placeholder": "Search extensions...",
- "noResults": "No extensions found",
- "noMarketplace": "No marketplace extensions available yet",
- "count": "{{count}} extension",
- "countPlural": "{{count}} extensions"
- },
- "toast": {
- "installedAndEnabled": "Extension installed and enabled",
- "uninstalled": "Uninstalled {{name}}",
- "uninstallFailed": "Failed to uninstall {{name}}",
- "searchFailed": "Failed to search marketplace",
- "refreshed": "Extensions refreshed",
- "refreshFailed": "Failed to refresh extensions",
- "marketplaceInstalled": "Installed and enabled {{name}}",
- "marketplaceInstallFailed": "Failed to install {{name}}",
- "enableFailed": "Failed to enable extension"
- }
+ "title": "Extensions",
+ "tabs": {
+ "browse": "Browse",
+ "installed": "Installed"
+ },
+ "actions": {
+ "submit": "Submit an extension",
+ "docs": "Extension docs",
+ "refresh": "Refresh",
+ "openFolder": "Open extensions folder",
+ "uninstall": "Uninstall",
+ "install": "Install",
+ "installing": "Installing",
+ "add": "Add",
+ "retry": "Retry",
+ "close": "Close",
+ "folder": "Folder"
+ },
+ "status": {
+ "enabled": "Enabled",
+ "disabled": "Disabled",
+ "installed": "Installed"
+ },
+ "detail": {
+ "by": "By {{author}}",
+ "unknownAuthor": "Unknown author",
+ "noDescription": "No description",
+ "downloads": "{{count}} downloads",
+ "preview": "Preview",
+ "screenshotAlt": "Screenshot {{number}}",
+ "description": "Description",
+ "tags": "Tags",
+ "permissions": "Permissions",
+ "location": "Location",
+ "error": "Error: {{message}}"
+ },
+ "empty": {
+ "title": "No Extensions",
+ "description": "Install extensions to add frames, cursor effects, and editor tools."
+ },
+ "search": {
+ "placeholder": "Search extensions...",
+ "noResults": "No extensions found",
+ "noMarketplace": "No marketplace extensions available yet",
+ "count": "{{count}} extension",
+ "countPlural": "{{count}} extensions"
+ },
+ "toast": {
+ "installedAndEnabled": "Extension installed and enabled",
+ "uninstalled": "Uninstalled {{name}}",
+ "uninstallFailed": "Failed to uninstall {{name}}",
+ "searchFailed": "Failed to search marketplace",
+ "refreshed": "Extensions refreshed",
+ "refreshFailed": "Failed to refresh extensions",
+ "marketplaceInstalled": "Installed and enabled {{name}}",
+ "marketplaceInstallFailed": "Failed to install {{name}}",
+ "enableFailed": "Failed to enable extension"
+ }
}
\ No newline at end of file
diff --git a/src/i18n/locales/en/settings.json b/src/i18n/locales/en/settings.json
index 0b739ddd..c384c0d7 100644
--- a/src/i18n/locales/en/settings.json
+++ b/src/i18n/locales/en/settings.json
@@ -2,7 +2,11 @@
"zoom": {
"level": "Zoom Level",
"selectRegion": "Select a zoom region to adjust",
- "deleteZoom": "Delete Zoom"
+ "deleteZoom": "Delete Zoom",
+ "modeAuto": "Auto",
+ "modeManual": "Manual",
+ "modeManualDescription": "Set a fixed focus point for this zoom",
+ "modeAutoDescription": "Camera follows cursor automatically"
},
"trim": {
"deleteRegion": "Delete Trim Region"
@@ -10,7 +14,13 @@
"speed": {
"playbackSpeed": "Playback Speed",
"selectRegion": "Select a speed region to adjust",
- "deleteRegion": "Delete Speed Region"
+ "deleteRegion": "Delete Speed Region",
+ "label": "Speed"
+ },
+ "clip": {
+ "title": "Clip",
+ "muteAudio": "Mute Audio",
+ "delete": "Delete Clip"
},
"effects": {
"title": "Video Effects",
@@ -32,6 +42,9 @@
"backgroundBlur": "Background Blur",
"zoomMotionBlur": "Zoom Motion Blur",
"connectZooms": "Connect Zooms",
+ "connectZoomsDescription": "Smooth consecutive zoom regions into a continuous camera move.",
+ "autoApplyFreshRecordingZooms": "Auto-apply fresh recording zooms",
+ "autoApplyFreshRecordingZoomsDescription": "Suggest cursor-follow zooms automatically when you open a new recording.",
"zoomGeneralTitle": "General",
"zoomGeneralDescription": "Global motion settings for every zoom transition.",
"zoomInTitle": "Zoom In",
diff --git a/src/i18n/locales/es/settings.json b/src/i18n/locales/es/settings.json
index f43a3410..6515aada 100644
--- a/src/i18n/locales/es/settings.json
+++ b/src/i18n/locales/es/settings.json
@@ -2,7 +2,11 @@
"zoom": {
"level": "Nivel de zoom",
"selectRegion": "Selecciona una región de zoom para ajustar",
- "deleteZoom": "Eliminar zoom"
+ "deleteZoom": "Eliminar zoom",
+ "modeAuto": "Auto",
+ "modeManual": "Manual",
+ "modeManualDescription": "Establece un punto de enfoque fijo para este zoom",
+ "modeAutoDescription": "La cámara sigue el cursor automáticamente"
},
"trim": {
"deleteRegion": "Eliminar región de recorte"
@@ -10,7 +14,13 @@
"speed": {
"playbackSpeed": "Velocidad de reproducción",
"selectRegion": "Selecciona una región de velocidad para ajustar",
- "deleteRegion": "Eliminar región de velocidad"
+ "deleteRegion": "Eliminar región de velocidad",
+ "label": "Velocidad"
+ },
+ "clip": {
+ "title": "Clip",
+ "muteAudio": "Silenciar audio",
+ "delete": "Eliminar clip"
},
"effects": {
"title": "Efectos de video",
@@ -32,6 +42,9 @@
"backgroundBlur": "Desenfoque de fondo",
"zoomMotionBlur": "Desenfoque de movimiento del zoom",
"connectZooms": "Conectar zooms",
+ "connectZoomsDescription": "Suaviza regiones de zoom consecutivas convirtiéndolas en un movimiento continuo de cámara.",
+ "autoApplyFreshRecordingZooms": "Aplicar automáticamente zooms a nuevas grabaciones",
+ "autoApplyFreshRecordingZoomsDescription": "Sugiere automáticamente zooms de seguimiento del cursor al abrir una nueva grabación.",
"zoomGeneralTitle": "General",
"zoomGeneralDescription": "Ajustes globales de movimiento para todas las transiciones de zoom.",
"zoomInTitle": "Entrada",
diff --git a/src/i18n/locales/ko/settings.json b/src/i18n/locales/ko/settings.json
index edf926d0..750be65f 100644
--- a/src/i18n/locales/ko/settings.json
+++ b/src/i18n/locales/ko/settings.json
@@ -2,7 +2,11 @@
"zoom": {
"level": "확대 레벨",
"selectRegion": "조정할 확대 구간을 선택하세요",
- "deleteZoom": "확대 삭제"
+ "deleteZoom": "확대 삭제",
+ "modeAuto": "자동",
+ "modeManual": "수동",
+ "modeManualDescription": "이 확대에 고정 초점을 설정합니다",
+ "modeAutoDescription": "카메라가 커서를 자동으로 따라갑니다"
},
"trim": {
"deleteRegion": "트림 구간 삭제"
@@ -10,7 +14,13 @@
"speed": {
"playbackSpeed": "재생 속도",
"selectRegion": "조정할 속도 구간을 선택하세요",
- "deleteRegion": "속도 구간 삭제"
+ "deleteRegion": "속도 구간 삭제",
+ "label": "속도"
+ },
+ "clip": {
+ "title": "클립",
+ "muteAudio": "오디오 음소거",
+ "delete": "클립 삭제"
},
"effects": {
"title": "비디오 효과",
@@ -32,6 +42,9 @@
"backgroundBlur": "배경 블러",
"zoomMotionBlur": "확대 모션 블러",
"connectZooms": "확대 구간 연결",
+ "connectZoomsDescription": "연속된 확대 구간을 하나의 부드러운 카메라 이동으로 연결합니다.",
+ "autoApplyFreshRecordingZooms": "새 녹화에 확대 자동 적용",
+ "autoApplyFreshRecordingZoomsDescription": "새 녹화를 열면 커서를 따라가는 확대를 자동으로 제안합니다.",
"zoomGeneralTitle": "일반",
"zoomGeneralDescription": "모든 확대 전환에 적용되는 전체 모션 설정입니다.",
"zoomInTitle": "확대 시작",
diff --git a/src/i18n/locales/nl/settings.json b/src/i18n/locales/nl/settings.json
index 76e5d834..78b3b33d 100644
--- a/src/i18n/locales/nl/settings.json
+++ b/src/i18n/locales/nl/settings.json
@@ -2,7 +2,11 @@
"zoom": {
"level": "Zoomniveau",
"selectRegion": "Selecteer een zoomgebied om aan te passen",
- "deleteZoom": "Zoom verwijderen"
+ "deleteZoom": "Zoom verwijderen",
+ "modeAuto": "Auto",
+ "modeManual": "Handmatig",
+ "modeManualDescription": "Stel een vast focuspunt in voor deze zoom",
+ "modeAutoDescription": "De camera volgt de cursor automatisch"
},
"trim": {
"deleteRegion": "Trimgebied verwijderen"
@@ -10,7 +14,13 @@
"speed": {
"playbackSpeed": "Afspeelsnelheid",
"selectRegion": "Selecteer een snelheidsgebied om aan te passen",
- "deleteRegion": "Snelheidsgebied verwijderen"
+ "deleteRegion": "Snelheidsgebied verwijderen",
+ "label": "Snelheid"
+ },
+ "clip": {
+ "title": "Clip",
+ "muteAudio": "Audio dempen",
+ "delete": "Clip verwijderen"
},
"effects": {
"title": "Video-effecten",
@@ -32,6 +42,9 @@
"backgroundBlur": "Achtergrondvervaging",
"zoomMotionBlur": "Zoom-bewegingsonscherpte",
"connectZooms": "Zooms verbinden",
+ "connectZoomsDescription": "Maak opeenvolgende zoomgebieden vloeiend tot een doorlopende camerabeweging.",
+ "autoApplyFreshRecordingZooms": "Zooms voor nieuwe opnames automatisch toepassen",
+ "autoApplyFreshRecordingZoomsDescription": "Stel automatisch cursor-volgende zooms voor wanneer je een nieuwe opname opent.",
"zoomGeneralTitle": "Algemeen",
"zoomGeneralDescription": "Globale bewegingsinstellingen voor elke zoomovergang.",
"zoomInTitle": "Inzoomen",
diff --git a/src/i18n/locales/zh-CN/settings.json b/src/i18n/locales/zh-CN/settings.json
index 88664a49..32e94e5c 100644
--- a/src/i18n/locales/zh-CN/settings.json
+++ b/src/i18n/locales/zh-CN/settings.json
@@ -2,7 +2,11 @@
"zoom": {
"level": "缩放级别",
"selectRegion": "选择缩放区域以调整",
- "deleteZoom": "删除缩放"
+ "deleteZoom": "删除缩放",
+ "modeAuto": "自动",
+ "modeManual": "手动",
+ "modeManualDescription": "为此缩放设置固定焦点",
+ "modeAutoDescription": "镜头会自动跟随光标"
},
"trim": {
"deleteRegion": "删除修剪区域"
@@ -10,7 +14,13 @@
"speed": {
"playbackSpeed": "播放速度",
"selectRegion": "选择变速区域以调整",
- "deleteRegion": "删除变速区域"
+ "deleteRegion": "删除变速区域",
+ "label": "速度"
+ },
+ "clip": {
+ "title": "片段",
+ "muteAudio": "静音音频",
+ "delete": "删除片段"
},
"effects": {
"title": "视频效果",
@@ -32,6 +42,9 @@
"backgroundBlur": "背景模糊",
"zoomMotionBlur": "缩放运动模糊",
"connectZooms": "连接缩放",
+ "connectZoomsDescription": "将连续的缩放区域平滑连接为一次连续的镜头移动。",
+ "autoApplyFreshRecordingZooms": "自动为新录制应用缩放",
+ "autoApplyFreshRecordingZoomsDescription": "打开新录制时自动建议跟随光标的缩放。",
"zoomGeneralTitle": "全局",
"zoomGeneralDescription": "控制所有缩放过渡的整体运动设置。",
"zoomInTitle": "进入缩放",
diff --git a/src/lib/extensions/extensionHost.ts b/src/lib/extensions/extensionHost.ts
index a93121f1..32b327df 100644
--- a/src/lib/extensions/extensionHost.ts
+++ b/src/lib/extensions/extensionHost.ts
@@ -294,15 +294,16 @@ export class ExtensionHost {
executeRenderHooks(phase: RenderHookPhase, context: RenderHookContext): void {
const hooks = this.renderHooks.filter((h) => h.phase === phase);
for (const hook of hooks) {
+ context.ctx.save();
try {
- context.ctx.save();
hook.hook(context);
- context.ctx.restore();
} catch (err) {
console.warn(
`[extensions] Render hook error (${hook.extensionId}, ${phase}):`,
err,
);
+ } finally {
+ context.ctx.restore();
}
}
}
@@ -313,13 +314,14 @@ export class ExtensionHost {
executeCursorEffects(context: CursorEffectContext): boolean {
let anyActive = false;
for (const effect of this.cursorEffects) {
+ context.ctx.save();
try {
- context.ctx.save();
const stillActive = effect.effect(context);
- context.ctx.restore();
if (stillActive) anyActive = true;
} catch (err) {
console.warn(`[extensions] Cursor effect error (${effect.extensionId}):`, err);
+ } finally {
+ context.ctx.restore();
}
}
return anyActive;