diff --git a/index.html b/index.html
index 1bbfad7..191c226 100644
--- a/index.html
+++ b/index.html
@@ -1536,11 +1536,8 @@ function nextTrack() {
waveformWrap.addEventListener('click', (e) => {
if (!audio.duration) return;
if (e.target !== waveformCanvas) return;
- const t = tracks[currentIndex];
- if (!t || !t.waveform) return;
const rect = waveformCanvas.getBoundingClientRect();
- const x = e.clientX - rect.left + waveformWrap.scrollLeft;
- const pct = x / t.waveform.length;
+ const pct = (e.clientX - rect.left) / rect.width;
audio.currentTime = pct * audio.duration;
});
volumeSlider.addEventListener('input', () => {