feat: start card spectrogram playback at the touched point before Play is pressed - #594
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Enables card spectrogram playback from the touched position, addressing #591.
Changes:
- Adds touch-position handling for uninitialized card players.
- Passes detection metadata through the card overlay.
- Seeks before playback begins.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
ai-for-orcas.js |
Creates and seeks card playback from touch input. |
DetectionComponent.razor |
Connects card overlay clicks to playback initialization. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Member
Author
dthaler
approved these changes
Aug 13, 2026
dthaler
left a comment
Collaborator
There was a problem hiding this comment.
Looks good. I tested and verified locally.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #591.
Touching a candidate's spectrogram before pressing Play now creates the player and starts playback at the touched point, the same way the details spectrogram already behaves. Once the player exists, wavesurfer's own click-to-seek keeps handling touches as before.
The card image overlay passes the touch position as a fraction of its width into
CardSpectrogram, which seeks there before playing. The Play button and the details modal are unchanged, and the single-active-player behavior stays: touching another card stops the current one and starts the new one at the touched point.Tested on Android Chrome (portrait) and desktop: fresh-card touch, touch inside a detection shade, seek after Play, Play button from the start, switching cards mid-playback, and the details modal.