mirror of
https://github.com/webadderallorg/Recordly.git
synced 2026-09-27 00:05:39 +00:00
Refresh paused previews after zoom edits
This commit is contained in:
@@ -40,6 +40,7 @@ function clampPercent(value: number) {
|
||||
return Math.min(100, Math.max(0, value));
|
||||
}
|
||||
|
||||
/** Render an annotation in preview space with editor drag and resize controls. */
|
||||
export function AnnotationOverlay({
|
||||
annotation,
|
||||
isSelected,
|
||||
|
||||
@@ -1252,6 +1252,9 @@ const VideoPlayback = forwardRef<VideoPlaybackRef, VideoPlaybackProps>(
|
||||
|
||||
useEffect(() => {
|
||||
zoomRegionsRef.current = zoomRegions;
|
||||
if (!isPlayingRef.current) {
|
||||
shouldSnapPausedFrameRef.current = true;
|
||||
}
|
||||
}, [zoomRegions]);
|
||||
|
||||
useEffect(() => {
|
||||
|
||||
@@ -27,6 +27,10 @@ interface VideoEventHandlersParams {
|
||||
speedRegionsRef: React.MutableRefObject<SpeedRegion[]>;
|
||||
}
|
||||
|
||||
/**
|
||||
* Bind media events to the preview's presented-frame clock while honoring trim
|
||||
* and speed regions.
|
||||
*/
|
||||
export function createVideoEventHandlers(params: VideoEventHandlersParams) {
|
||||
const {
|
||||
video,
|
||||
|
||||
@@ -15,6 +15,7 @@ import {
|
||||
} from "@/components/video-editor/types";
|
||||
import { drawSquircleOnCanvas } from "@/lib/geometry/squircle";
|
||||
|
||||
/** Draw the active caption using the same typography and timing as preview. */
|
||||
export function renderCaptions(
|
||||
ctx: CanvasRenderingContext2D,
|
||||
cues: CaptionCue[],
|
||||
|
||||
@@ -1661,6 +1661,7 @@ export class FrameRenderer {
|
||||
};
|
||||
}
|
||||
|
||||
/** Advance the export camera from the shared scene target at this media time. */
|
||||
private updateAnimationState(timeMs: number): number {
|
||||
if (!this.cameraContainer || !this.layoutCache) return 0;
|
||||
|
||||
|
||||
@@ -3343,6 +3343,7 @@ export class FrameRenderer {
|
||||
}
|
||||
}
|
||||
|
||||
/** Advance the export camera from the shared scene target at this media time. */
|
||||
private updateAnimationState(timeMs: number): number {
|
||||
if (!this.cameraContainer || !this.layoutCache) {
|
||||
return 0;
|
||||
|
||||
@@ -2096,6 +2096,7 @@ export class ModernVideoExporter {
|
||||
);
|
||||
}
|
||||
|
||||
/** Build deterministic per-frame camera transforms for native compositors. */
|
||||
private getNativeStaticLayoutZoomTelemetry(
|
||||
layout: ReturnType<typeof computePaddedLayout>,
|
||||
totalFrames: number,
|
||||
|
||||
Reference in New Issue
Block a user