Avoid deriving total frames from container duration when the audio tail mismatch is below the dynamic playback stall threshold. This prevents the rendering of phantom trailing frames that the playhead cannot reach during playback.
Also adds comprehensive unit and E2E tests covering both small and large audio tail gaps.
Add an e2e spec covering restart-on-end for the frame-accurate video
player. Drives the real player to its natural end (seek near the tail,
play out the last frames) and asserts both restart triggers resume from
the start: the play/pause control and clicking the video area.
Adds seekToFrame and waitForEnded helpers to VideoPlayerPage.
Extend the backend-free video-player harness with the app's real comment↔player
wiring (onTimeUpdate capture, player.currentTime(second) seek on comment click,
and a remount to simulate a second user) and add a Playwright spec.
User A comments on 5 distinct random frames (regenerated each run); user B
reloads and clicks each comment. Asserts the seconds-based roundtrip is
loss-free: frameA -> second=frameA/fps -> seek(second) -> floor(second*fps+0.45)
== frameA, so the comment is stored at the frame the author saw and the reader
lands on that exact frame.
Add a Playwright UI integration test framework for the frame-accurate video
player. Tests run against a backend-free harness served by Bun's native HTML
bundler (matching the project's Bun-based dev/prod serving), so no database,
auth or transcode pipeline is required.
- Add @playwright/test with chromium/firefox/webkit projects; the browser is
selectable via the Playwright --project flag (webkit = Safari engine).
- Serve the harness with Bun.serve + bun-plugin-tailwind (no separate Vite
toolchain); commit a deterministic 16x16/5s/30fps fixture video and matching
AssetInfo.
- Add a play/pause spec covering both the play control and clicking the video
area, asserting the native video clock, seekbar fill and frame readout stay
frame-locked after pause (settle-aware, tolerance-based assertions).
- Mock all backend API calls (anchored /api/ and /files/ routes) for isolation.
- Exclude e2e specs from Vitest; add a separate CI job (webkit on macOS).