Skip to content

Commit 62110cc

Browse files
committed
coderabbit
1 parent 3127103 commit 62110cc

2 files changed

Lines changed: 15 additions & 1 deletion

File tree

apps/desktop/src/routes/editor/Editor.tsx

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -462,6 +462,16 @@ function Dialogs() {
462462
),
463463
);
464464

465+
createEffect(
466+
on(
467+
() => currentSegment().index,
468+
() => {
469+
setVideoLoaded(false);
470+
},
471+
{ defer: true },
472+
),
473+
);
474+
465475
createEffect(() => {
466476
if (videoRef && videoLoaded()) {
467477
videoRef.currentTime = currentSegment().localTime;

apps/desktop/src/routes/editor/context.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,10 @@ import {
4040
type TimelineConfiguration,
4141
type XY,
4242
} from "~/utils/tauri";
43-
import { preloadCropVideoMetadata } from "./cropVideoPreloader";
43+
import {
44+
cleanup as cleanupCropVideoPreloader,
45+
preloadCropVideoMetadata,
46+
} from "./cropVideoPreloader";
4447
import type { MaskSegment } from "./masks";
4548
import type { TextSegment } from "./text";
4649
import { createProgressBar } from "./utils";
@@ -753,6 +756,7 @@ export const [EditorInstanceContextProvider, useEditorInstanceContext] =
753756

754757
onCleanup(() => {
755758
disposeWorkerReadyEffect?.();
759+
cleanupCropVideoPreloader();
756760
});
757761

758762
const [editorInstance] = createResource(async () => {

0 commit comments

Comments
 (0)