From 4a1870d1d0cc4676797add05762ed196decd339d Mon Sep 17 00:00:00 2001 From: skal Date: Thu, 12 Feb 2026 08:44:42 +0100 Subject: feat: timeline editor playback improvements - Add red bar playback indicator on waveform (synced with timeline) - Fix playback continuation after double-click seek (async/await) - Improve stopPlayback() to preserve jump positions - Add error handling to startPlayback() - Update waveform click-to-seek to match double-click behavior - Sync waveform indicator scroll with timeline - Display time in both seconds and beats on seek - Update documentation with new features handoff(Claude): Timeline editor now has dual playback indicators and seamless seeking. Co-Authored-By: Claude Sonnet 4.5 --- tools/timeline_editor/index.html | 261 ++++++++++++++++++++++++++++++--------- 1 file changed, 206 insertions(+), 55 deletions(-) (limited to 'tools/timeline_editor/index.html') diff --git a/tools/timeline_editor/index.html b/tools/timeline_editor/index.html index c9385ad..b6e9223 100644 --- a/tools/timeline_editor/index.html +++ b/tools/timeline_editor/index.html @@ -105,7 +105,7 @@ .timeline-container { background: #252526; border-radius: 8px; - padding: 20px; + padding: 0; position: relative; height: calc(100vh - 280px); min-height: 500px; @@ -118,6 +118,7 @@ overflow-x: auto; overflow-y: auto; position: relative; + padding: 0 20px 20px 20px; /* Hide scrollbars while keeping scroll functionality */ scrollbar-width: none; /* Firefox */ -ms-overflow-style: none; /* IE/Edge */ @@ -134,10 +135,11 @@ } .sticky-header { - position: relative; + position: sticky; + top: 0; background: #252526; z-index: 100; - padding-bottom: 10px; + padding: 20px 20px 10px 20px; border-bottom: 2px solid #3c3c3c; flex-shrink: 0; } @@ -154,20 +156,27 @@ padding: 8px 12px; } - #waveformCanvas { + .waveform-container { position: relative; height: 80px; - width: 100%; + overflow: hidden; background: rgba(0, 0, 0, 0.3); border-radius: 4px; cursor: crosshair; } + #waveformCanvas { + position: absolute; + left: 0; + top: 0; + height: 80px; + display: block; + } + .playback-indicator { position: absolute; top: 0; width: 2px; - height: 100%; background: #f48771; box-shadow: 0 0 4px rgba(244, 135, 113, 0.8); pointer-events: none; @@ -476,12 +485,20 @@ color: #858585; } + #messageArea { + position: fixed; + top: 80px; + right: 20px; + z-index: 2000; + max-width: 400px; + } + .error { background: #5a1d1d; color: #f48771; padding: 10px; border-radius: 4px; - margin-bottom: 10px; + box-shadow: 0 2px 8px rgba(0,0,0,0.3); } .success { @@ -489,7 +506,7 @@ color: #89d185; padding: 10px; border-radius: 4px; - margin-bottom: 10px; + box-shadow: 0 2px 8px rgba(0,0,0,0.3); } @@ -519,6 +536,10 @@ 100% 120 +