developmentseed / bioacoustics-frontend

Frontend code for the Google Bioacoustics project that's used by A2O Search
https://search.acousticobservatory.org/
MIT License
1 stars 0 forks source link

fix: Use currentTime state for player-position update #132

Closed oliverroick closed 1 year ago

oliverroick commented 1 year ago

Fixes #51

Update player position in hook, instead of callback, so we always have access to the current time.

geohacker commented 1 year ago

@oliverroick I'm not quite sure what I should expect here. Should I expect to be able to move the player position while clicking the spectrogram? Is it expected to seek the clip by dragging the position on the spectrogram?

I'm able to seek by using the seekbar on the player but nothing seems to happen on the spectrogram.

bio-seek-bar

oliverroick commented 1 year ago

@geohacker Sorry, yeah the ticket isn't precise.

So here's how to reproduce the issue on main

  1. Load a audio
  2. Zoom in on the spectrogram
  3. Play the audio, and wait until to see the red marker
  4. Drag the spectrogram

You'll see that, for a short time, the red marker jumps back to the position where it was when you started dragging.

This shouldn't happen with the changes in this PR