fix: update transport button state when seeking auto-starts playback

Fixed issue where Play/Pause buttons didn't update after clicking on
waveform or timeline slider.

Problem:
- seek() in useAudioPlayer hook only updated currentTime
- But player.seek() now auto-starts playback
- React state (isPlaying, isPaused) wasn't updated
- Transport buttons showed wrong state (Play instead of Pause)

Solution:
- Update isPlaying = true and isPaused = false in seek callback
- Now transport buttons correctly show Pause icon when seeking
- UI state matches actual playback state

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2025-11-17 17:27:12 +01:00
parent 19bf7dc68a
commit 9aac873b53

View File

@@ -164,6 +164,9 @@ export function useAudioPlayer(): UseAudioPlayerReturn {
await player.seek(time);
setCurrentTime(time);
// Seek now auto-starts playback, so update state accordingly
setIsPlaying(true);
setIsPaused(false);
},
[player]
);