mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-09-03 04:38:33 +00:00
fix(studio,producer): post-merge regressions and open issues (#1643)
- fix gsapDragCommit.test.ts import for commitGsapPositionFromDrag - add generateId() helper with insecure-context fallback (fixes #1637) - enable STUDIO_KEYFRAMES_ENABLED by default - prevent clock duration from shrinking during playback (fixes #1636) - add maxRetries to rmSync cleanup calls to handle ENOTEMPTY race (fixes #1644)
This commit is contained in:
@@ -2259,15 +2259,14 @@ export function initSandboxRuntimeModular(): void {
|
||||
bindMediaMetadataListeners();
|
||||
}
|
||||
|
||||
// Keep clock duration in sync with the resolved timeline duration.
|
||||
// Catches async timeline rebinds that happen outside the 60-tick
|
||||
// branch (metadata hydration, deferred setTimeout). Note: this reads
|
||||
// the DOM each tick (duration floors query authored windows + the
|
||||
// root's declared data-duration), which also keeps live edits to
|
||||
// data-duration in the studio reflected without a rebind.
|
||||
// Sync clock duration with the resolved timeline each tick (catches async
|
||||
// rebinds, live data-duration edits). Never shrink while playing — transient
|
||||
// short reads cause reachedEnd() → playhead jumps to end (#1636).
|
||||
if (state.capturedTimeline) {
|
||||
const dur = getSafeTimelineDurationSeconds(state.capturedTimeline, 0);
|
||||
if (dur > 0) clock.setDuration(dur);
|
||||
if (dur > 0 && (!clock.isPlaying() || dur >= clock.getDuration())) {
|
||||
clock.setDuration(dur);
|
||||
}
|
||||
}
|
||||
|
||||
// Audio-master clock: three tiers of timing precision.
|
||||
|
||||
Reference in New Issue
Block a user