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:
Miguel Ángel
2026-04-22 01:51:41 +02:00
committed by GitHub
parent 0ba56f9187
commit 1aea1415c4
11 changed files with 302 additions and 36 deletions
+12
View File
@@ -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", () => {