feat(studio): route timeline trim/move through SDK setTiming (§3.2) (#1466)

Co-authored-by: Miguel Ángel <miguel07alm@protonmail.com>
This commit is contained in:
Vance Ingalls
2026-06-17 16:40:07 -07:00
committed by GitHub
co-authored by Miguel Ángel
parent bce571c2a1
commit 39f37e8aa8
4 changed files with 173 additions and 51 deletions
+21
View File
@@ -136,6 +136,27 @@ export async function sdkCutoverPersist(
}
}
export async function sdkTimingPersist(
hfId: string,
targetPath: string,
timingUpdate: { start?: number; duration?: number; trackIndex?: number },
sdkSession: Composition | null | undefined,
deps: CutoverDeps,
options?: CutoverOptions,
): Promise<boolean> {
if (!sdkSession || !sdkSession.getElement(hfId)) return false;
try {
const before = sdkSession.serialize();
sdkSession.setTiming(hfId, timingUpdate);
await persistSdkSerialize(sdkSession, targetPath, before, deps, options);
trackStudioEvent("sdk_cutover_success", { hfId, opCount: 1 });
return true;
} catch (err) {
trackStudioEvent("sdk_cutover_fallback", { hfId, error: String(err) });
return false;
}
}
export async function sdkDeletePersist(
hfId: string,
originalContent: string,