Create polished demo videos without editing skills. Mac/Windows/Linux
Address CodeRabbit review feedback
webadderall872fc0560657
diff --git a/src/components/launch/LaunchWindow.tsx b/src/components/launch/LaunchWindow.tsxindex 3863751e..4344b7c5 100644--- a/src/components/launch/LaunchWindow.tsx+++ b/src/components/launch/LaunchWindow.tsx@@ -1477,8 +1477,15 @@ export function LaunchWindow() {<DropdownItemicon={<RefreshCw size={16} />}onClick={() => {- void window.electronAPI.previewUpdateToast();setActiveDropdown("none");+ void window.electronAPI+ .previewUpdateToast()+ .catch((error) => {+ console.warn(+ "Failed to preview update toast:",+ error,+ );+ });}}>{t("recording.previewUpdateUi", "Preview Update UI")}diff --git a/src/components/video-editor/SettingsPanel.tsx b/src/components/video-editor/SettingsPanel.tsxindex e7fe287d..51b1a0c7 100644--- a/src/components/video-editor/SettingsPanel.tsx+++ b/src/components/video-editor/SettingsPanel.tsx@@ -157,6 +157,7 @@ function WallpaperVideoPreview({ src }: { src: string }) {useEffect(() => {let cancelled = false;+ setResolvedSrc(src);void (async () => {try {diff --git a/src/components/video-editor/VideoPlayback.tsx b/src/components/video-editor/VideoPlayback.tsxindex 6bcb7549..c6c50f0b 100644--- a/src/components/video-editor/VideoPlayback.tsx+++ b/src/components/video-editor/VideoPlayback.tsx@@ -1012,11 +1012,12 @@ const VideoPlayback = forwardRef<VideoPlaybackRef, VideoPlaybackProps>(const bgVideo = bgVideoRef.current;if (!bgVideo) return;+ const clipTimelineTime = currentTime;const videoDuration =Number.isFinite(bgVideo.duration) && bgVideo.duration > 0 ? bgVideo.duration : null;const targetTime = videoDuration- ? currentTime % videoDuration- : clampMediaTimeToDuration(currentTime, videoDuration);+ ? clipTimelineTime % videoDuration+ : clampMediaTimeToDuration(clipTimelineTime, videoDuration);const activeSpeedRegion = speedRegionsRef.current.find((region) => currentTime * 1000 >= region.startMs && currentTime * 1000 < region.endMs,@@ -1036,7 +1037,8 @@ const VideoPlayback = forwardRef<VideoPlaybackRef, VideoPlaybackProps>(const previousTimelineTime = lastBackgroundSyncTimeRef.current;const timelineJumped =- previousTimelineTime === null || Math.abs(targetTime - previousTimelineTime) > 0.25;+ previousTimelineTime === null ||+ Math.abs(clipTimelineTime - previousTimelineTime) > 0.25;const driftThreshold = isPlaying ? 0.35 : 0.01;if (timelineJumped || Math.abs(bgVideo.currentTime - targetTime) > driftThreshold) {try {@@ -1055,7 +1057,7 @@ const VideoPlayback = forwardRef<VideoPlaybackRef, VideoPlaybackProps>(bgVideo.pause();}- lastBackgroundSyncTimeRef.current = targetTime;+ lastBackgroundSyncTimeRef.current = clipTimelineTime;}, [currentTime, isPlaying]);useEffect(() => {