mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-10-30 17:27:09 +00:00
fix(studio): a timeline scrubs when its host omits sessionEpoch (#4742)
* fix(studio): a timeline scrubs when its host omits sessionEpoch * fix(studio): drop the added comment for the comment ratchet
This commit is contained in:
@@ -108,4 +108,11 @@ describe("Timeline ruler origin", () => {
|
||||
expect(origin).toBe("80px");
|
||||
expect(published).toBe("80");
|
||||
});
|
||||
|
||||
it("seeks on a press when the host omits sessionEpoch after a session began", async () => {
|
||||
usePlayerStore.getState().beginTimelineSession("host-project");
|
||||
expect(usePlayerStore.getState().timelineSessionEpoch).toBeGreaterThan(0);
|
||||
const { time, tickTime } = await seekOnFirstTick({}, false);
|
||||
expect(time).toBeCloseTo(tickTime, 1);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -66,7 +66,7 @@ export function useTimelineProviderState({
|
||||
showAudioEffects = true,
|
||||
showKeyframes = true,
|
||||
trackPadding,
|
||||
sessionEpoch = 0,
|
||||
sessionEpoch: sessionEpochProp,
|
||||
previewIframeRef,
|
||||
onZIndexReorder,
|
||||
}: TimelineProps = {}): TimelineContextValue {
|
||||
@@ -108,6 +108,7 @@ export function useTimelineProviderState({
|
||||
const currentTime = usePlayerStore((s) => s.currentTime);
|
||||
const beatDragging = usePlayerStore((s) => s.beatDragging);
|
||||
const timelineSessionEpoch = usePlayerStore((s) => s.timelineSessionEpoch);
|
||||
const sessionEpoch = sessionEpochProp ?? timelineSessionEpoch;
|
||||
const setFocusedEaseSegment = usePlayerStore((s) => s.setFocusedEaseSegment);
|
||||
const { zoomMode, manualZoomPercent, setZoomMode, setManualZoomPercent } = useTimelineZoom();
|
||||
const playheadRef = useRef<HTMLDivElement>(null);
|
||||
|
||||
Reference in New Issue
Block a user