Repository navigation
Add startTime to gotoTrack for atomic seek-on-goto - #26
Conversation
gotoTrack(index, playImmediately, startTime) now seeks to startTime (default 0) as part of the GOTO transition, eliminating the need for a separate pendingSeekTime mechanism. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Deploying gapless with
|
| Latest commit: |
7027a98
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://2d8794a1.gapless-e1l.pages.dev |
| Branch Preview URL: | https://add-start-time-to-goto.gapless-e1l.pages.dev |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a9b880cc33
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| 'cancelAllGapless', | ||
| 'gotoTrackIndex', | ||
| 'seekCurrentToZero', | ||
| 'seekCurrentToStartTime', |
There was a problem hiding this comment.
Apply the start time before immediate playback
When playImmediately is true, every guarded GOTO branch calls activateAndPlayCurrent without calling seekCurrentToStartTime; the new seek action is only present in the non-immediate fallback branches. Consequently, gotoTrack(2, true, 30) starts track 2 at its existing/default position rather than at 30 seconds. Add the seek after gotoTrackIndex and before activateAndPlayCurrent in each play-immediately branch.
Useful? React with 👍 / 👎.
The play-immediate GOTO branches were missing seekCurrentToStartTime, so gotoTrack(index, true, startTime) would ignore the startTime. Add the seek after gotoTrackIndex and before activateAndPlayCurrent in all four state branches (idle, playing, paused, ended). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Summary
startTimeparameter togotoTrack(index, playImmediately, startTime)and theGOTOeventseekCurrentToZero→seekCurrentToStartTime, which readsstartTimefrom the event (defaults to 0)pendingSeekTimeneededTest plan
gotoTrack(2, true, 30)starts track 2 at 30sgotoTrack(2, false)still seeks to 0 (backward compat)gotoTrack(2, true, 0)behaves identically togotoTrack(2, true)🤖 Generated with Claude Code