Create polished demo videos without editing skills. Mac/Windows/Linux
Merge remote-tracking branch 'origin/main' into codex/clip-flow-cleanup
webadderall73edbb4e100e
diff --cc src/components/video-editor/timeline/TimelineEditor.tsxindex 6528c13b,32643bec..538337b9--- a/src/components/video-editor/timeline/TimelineEditor.tsx+++ b/src/components/video-editor/timeline/TimelineEditor.tsx@@@ -1476,18 -1519,9 +1476,15 @@@ const TimelineEditor = forwardRef<Timel}const startPos = Math.max(0, Math.min(startMs, totalMs));+ const activeClip = clipRegions.find(+ (clip) => startPos >= clip.startMs && startPos < clip.endMs,+ );- if (!activeClip) {- return false;- }+const sorted = [...zoomRegions].sort((a, b) => a.startMs - b.startMs);const nextRegion = sorted.find((region) => region.startMs > startPos);- const gapToNextClipEdge = activeClip.endMs - startPos;- const gapToNextRegion = nextRegion ? nextRegion.startMs - startPos : gapToNextClipEdge;- const gapToNext = nextRegion ? nextRegion.startMs - startPos : totalMs - startPos;++ const gapToNextClipEdge = activeClip ? activeClip.endMs - startPos : totalMs - startPos;++ const gapToNextRegion = nextRegion ? nextRegion.startMs - startPos : totalMs - startPos;+ const availableDuration = Math.min(gapToNextClipEdge, gapToNextRegion);const isOverlapping = sorted.some((region) => startPos >= region.startMs && startPos < region.endMs,@@@ -1513,7 -1547,7 +1510,7 @@@if (!canPlaceZoomAtMs(startPos)) {toast.error("Cannot place zoom here", {description:- "Place zooms inside a kept clip and leave enough room before the clip ends.",- "Zoom already exists at this location or not enough space available.",++ "Zoom already exists here or there is not enough room before the next zoom or clip end.",});return;}