Skip to content

feat: start card spectrogram playback at the touched point before Play is pressed - #594

Merged
dthaler merged 2 commits into
orcasound:mainfrom
kauereinbold:fix/591-touch-to-play
Aug 13, 2026
Merged

feat: start card spectrogram playback at the touched point before Play is pressed#594
dthaler merged 2 commits into
orcasound:mainfrom
kauereinbold:fix/591-touch-to-play

Conversation

@kauereinbold

Copy link
Copy Markdown
Member

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.

@kauereinbold kauereinbold added enhancement New feature or request moderator portal Issues pertaining to ModeratorPortal at https://aifororcas.azurewebsites.net labels Aug 13, 2026
@kauereinbold
kauereinbold requested a balanced review from Copilot August 13, 2026 13:14

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread ModeratorFrontEnd/AIForOrcas/AIForOrcas.Client.Web/wwwroot/js/ai-for-orcas.js Outdated
@kauereinbold

Copy link
Copy Markdown
Member Author

@dthaler ready for review. Small one from Dave Bain's request in #591: touching a card spectrogram before pressing Play now starts playback at the touched point, same as the details spectrogram already does. Tested on Android Chrome portrait and desktop.

@kauereinbold kauereinbold self-assigned this Aug 13, 2026

@dthaler dthaler left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. I tested and verified locally.

@dthaler
dthaler merged commit e39d204 into orcasound:main Aug 13, 2026
21 checks passed
@kauereinbold
kauereinbold deleted the fix/591-touch-to-play branch August 13, 2026 16:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request moderator portal Issues pertaining to ModeratorPortal at https://aifororcas.azurewebsites.net

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Touching the candidate spectrogram does nothing until Play is pressed

3 participants