feat(02-03): build transport UI and waveform canvas
- Replace timeline placeholder with waveform canvas + playback cursor - Replace transport placeholder with full transport bar controls - Add play/pause/stop buttons, seek slider, time display, audio path input - Add drawWaveform(), loadWaveform(), updatePosition(), formatTime() to app.js - Dispatch msg.type=tick to updatePosition in handleMessage - Wire transport buttons via WebSocket commands - Add transport/waveform styles to style.css using existing CSS variables - Deploy via ~/bin/deploy.sh
This commit is contained in:
@@ -48,13 +48,33 @@
|
||||
</aside>
|
||||
|
||||
<main class="main-area">
|
||||
<div class="panel" id="timeline-panel" style="flex: 1; display: flex; align-items: center; justify-content: center;">
|
||||
<span>[ TIMELINE — PHASE 2+ ]</span>
|
||||
<div class="panel" id="timeline-panel" style="flex: 1; display: flex; flex-direction: column;">
|
||||
<div class="panel-header">TIMELINE</div>
|
||||
<div class="waveform-container" style="flex: 1; position: relative; min-height: 100px;">
|
||||
<canvas id="waveform-canvas" style="width: 100%; height: 100%;"></canvas>
|
||||
<div id="playback-cursor" class="playback-cursor"></div>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
<footer class="transport-bar" id="transport-panel">
|
||||
<span>[ TRANSPORT — PHASE 2+ ]</span>
|
||||
<div class="transport-controls">
|
||||
<button id="btn-play" class="transport-btn" title="Play">▶</button>
|
||||
<button id="btn-pause" class="transport-btn" title="Pause" style="display:none">▮▮</button>
|
||||
<button id="btn-stop" class="transport-btn" title="Stop">■</button>
|
||||
</div>
|
||||
<div class="transport-time">
|
||||
<span id="time-current">0:00.0</span>
|
||||
<span class="text-dim">/</span>
|
||||
<span id="time-duration">0:00.0</span>
|
||||
</div>
|
||||
<div class="transport-seek">
|
||||
<input type="range" id="seek-bar" min="0" max="100" value="0" step="0.1" class="seek-slider">
|
||||
</div>
|
||||
<div class="transport-file">
|
||||
<input type="text" id="audio-path" placeholder="Audio file path on server..." class="audio-path-input">
|
||||
<button id="btn-load" class="transport-btn" title="Load audio">LOAD</button>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user