Skip to content

feat(player): repeat frame steps while holding transport buttons - #65

Merged
Leftium merged 3 commits into
mainfrom
continuum/62-hold-frame-stepping
Oct 14, 2026
Merged

Leftium merged 3 commits into
mainfrom
continuum/62-hold-frame-stepping

Conversation

@Leftium

@Leftium Leftium commented Oct 14, 2026 •

Copy link
Copy Markdown
Owner

Refs #62, PR 3. Builds on merged #63 and #64. Keep #62 open for Clip-settings PR 4; watch reveal/docking remains #15. Do not merge as part of this task.

This PR follows the Continuum protocol at 9aea333.

Summary

Prev Frame and Next Frame now pause and request one nominal time step on a tap, or repeat while held. Repeat begins after 350 ms and runs every 200 ms. Releasing stops repeat without another step and leaves playback paused. Both directions honor A/B in Clip Only and source limits in VIDEO. Loop wraps across those limits; Once stops at them.

Previously each step read a provider timestamp that could lag behind the last request. The new stepper accumulates integer quanta from a fractional logical anchor, so late or quantized YouTube observations cannot overwrite the logical stepping position. Provider seeks run at most once per 200 ms; rapid taps replace one pending target instead of accumulating commands. The final queued target is sent within that interval, and other navigation discards it.

Changes

  • Share one pointer/keyboard repeat owner across both buttons. Handle outside release, pointer cancellation, lost capture, secondary touch, blur, visibility changes, history/source changes, disabled controls, other interactions, and component cleanup. Prevent native release-click and keyboard-repeat double stepping; preserve ordinary assistive-technology activation.
  • Honor the selected playback scope and Loop/Once in both directions. In Clip Only, Loop wraps Next past B to A and Prev before A to B; Once clamps and stops at A/B. VIDEO uses the same policy at the source limits. Taps and holds preserve bounds, URLs, Loop/Once, and scope. Switching scope cancels repeat and pending frame seeks. Timeline/video scrubbing can still inspect outside A:B; Play re-enters the clip when necessary.
  • Preserve the existing player/iframe, provider focus handling, video gestures, timeline geometry, endpoint preview and A/B swap behavior.
  • Document the nominal 30 fps default and provider limits. The pure helper accepts alternative supplied quanta, including 24/25/29.97/60 fps; no FPS inference or selector was added. YouTube and Video.js document time seeks without an exact-frame operation. Requested time is not a decoded-frame acknowledgement, and visible frames may repeat or skip.

Verification

The GitHub verification run passed for f4abfbf, including production-mode hosting/social checks and the routine browser gate. Vercel deployed successfully.

Local checks:

  • pnpm check: no errors or warnings.
  • pnpm lint and pnpm build: passed.
  • pnpm test:clip: 30 passed, including seven new fake-timer/math checks covering both A/B edges, Loop wrapping, Once stopping, reversal, outside-clip positions and scope resets.
  • pnpm test:share-url: 24 passed; pnpm test:metadata: 18 passed.
  • pnpm test:browser:frames: 4 passed across Chromium/WebKit, with external requests blocked. Covers mobile-width mouse/touch/keyboard/AT activation, delay/cadence, stale observations, release/cancel, history/source change, teardown, both-direction A/B tap/hold wrapping in Loop and stopping in Once, whole-source limits in VIDEO, scope-switch cleanup, Clip Only re-entry, unchanged bounds/URL and provider identity.
  • pnpm test:browser:timeline: 8 passed across Chromium/WebKit on the previous implementation revision; timeline/scrub behavior is unchanged by the scope update.
  • pnpm test:browser: 36 passed, unchanged gate membership.

Test lifecycle: the seven cheap Node checks remain permanent because stale-provider accumulation, repeat ownership and cancellation are recurring transport risks. The two new browser cases are probationary through Clip-settings PR 4 in #62 and excluded from routine gates. Reviewed all four existing timeline cases: capture/swap, keyboard restoration and editor/watch scrub cleanup still cover distinct browser contracts, so retain them through the same PR 4 review point. No existing test became obsolete, and routine gate membership is unchanged. Broader live-provider/advisory coverage was not run.

Follow-ups

Physical iPhone Safari/Android and real YouTube stepping latency remain pending manual verification, especially in unbuffered regions and long videos. Mocked WebKit verifies application and adapter behavior, not decoded-frame accuracy or physical-device compatibility.

@vercel

vercel Bot commented Oct 14, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
youloop Ready Ready Preview Oct 14, 2026 9:24pm UTC

@Leftium

Leftium commented Oct 14, 2026

Copy link
Copy Markdown
Owner Author

This PR was claimed

@Leftium

Leftium commented Oct 14, 2026

Copy link
Copy Markdown
Owner Author

This PR's claim 6178425919 was released at 0de9c1c

@Leftium
Leftium marked this pull request as ready for review October 14, 2026 21:10
@Leftium
Leftium marked this pull request as draft October 14, 2026 21:19
@Leftium

Leftium commented Oct 14, 2026

Copy link
Copy Markdown
Owner Author

This PR was claimed

@Leftium

Leftium commented Oct 14, 2026

Copy link
Copy Markdown
Owner Author

This PR's claim 6178736719 was released at f4abfbf

@Leftium
Leftium marked this pull request as ready for review October 14, 2026 21:24
@Leftium
Leftium merged commit 568bed0 into main Oct 14, 2026
3 checks passed
@Leftium
Leftium deleted the continuum/62-hold-frame-stepping branch October 14, 2026 21:33

This branch was successfully deployed

1 active deployment
Preview — f4abfbfa Deployed Oct 14, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant