From 19bf7dc68a683c817bf10486d0b2989b602a4459 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Kr=C3=BCger?= Date: Mon, 17 Nov 2025 17:24:31 +0100 Subject: [PATCH] fix: seek now auto-starts playback for intuitive interaction MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Changed seek behavior to match user expectations: - Clicking on waveform now immediately starts playing from that position - Dragging timeline slider starts playback at the selected position - No need to click Play button after seeking Previous behavior: - seek() only continued playback if music was already playing - Otherwise it just set isPaused = true - User had to seek AND THEN click play button New behavior: - seek() always starts playback automatically - Click anywhere → music plays from that position - Much more intuitive UX matching common audio editors 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- lib/audio/player.ts | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/lib/audio/player.ts b/lib/audio/player.ts index 65f4e98..4c669b6 100644 --- a/lib/audio/player.ts +++ b/lib/audio/player.ts @@ -114,22 +114,18 @@ export class AudioPlayer { } /** - * Seek to a specific time + * Seek to a specific time and start playback */ async seek(time: number): Promise { if (!this.audioBuffer) return; - const wasPlaying = this.isPlaying; const clampedTime = Math.max(0, Math.min(time, this.audioBuffer.duration)); this.stop(); this.pauseTime = clampedTime; - if (wasPlaying) { - await this.play(clampedTime); - } else { - this.isPaused = true; - } + // Always start playback after seeking + await this.play(clampedTime); } /**