mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-09-03 04:38:33 +00:00
fix: smooth scrubber end seeking (#386)
* fix: smooth scrubber end seeking * fix: stop timeline auto-scroll in fit mode * feat: use percentage-based timeline zoom * fix: sync timeline playhead on zoom changes * fix: reset timeline scroll when returning to fit * fix: keep timeline controls pinned
This commit is contained in:
@@ -262,6 +262,18 @@ describe("createRuntimePlayer", () => {
|
||||
player.seek(NaN);
|
||||
expect(deps.onDeterministicSeek).toHaveBeenCalledWith(0);
|
||||
});
|
||||
|
||||
it("seeks to the exact safe duration without snapping back a frame", () => {
|
||||
const timeline = createMockTimeline({ duration: 8 });
|
||||
const deps = createMockDeps(timeline);
|
||||
deps.getSafeDuration.mockReturnValue(8);
|
||||
const player = createRuntimePlayer(deps);
|
||||
player.seek(8);
|
||||
expect(timeline.pause).toHaveBeenCalled();
|
||||
expect(timeline.totalTime).toHaveBeenCalledWith(8, false);
|
||||
expect(deps.onDeterministicSeek).toHaveBeenCalledWith(8);
|
||||
expect(deps.onSyncMedia).toHaveBeenCalledWith(8, false);
|
||||
});
|
||||
});
|
||||
|
||||
describe("renderSeek", () => {
|
||||
|
||||
Reference in New Issue
Block a user