feat(02-03): redesign frontend — browser audio element, beat markers, animation selector
- index.html: add <audio id=player> (hidden), beat-indicator dot in header - index.html: animation selector panel with Beat Pulse/Strobe/Color Wave/Rainbow options - index.html: remove seek slider + time display (browser audio element has native controls) - index.html: upload button + file selector remain in transport bar - app.js: wire <audio> element — play/pause/seeked/timeupdate events send WS ticks - app.js: 10Hz setInterval tick loop (supplements native timeupdate ~4Hz) - app.js: WS beat message -> flashBeatIndicator() animation - app.js: loadWaveformAndBeats() draws waveform peaks + beat marker lines on canvas - app.js: loadSelectedFile() sets audio.src=/shows/filename, fetches beats+waveform - app.js: upload response caches beat data returned from server immediately - style.css: .beat-indicator with .beat-flash (yellow glow animation) - style.css: .animation-select-input for the animations panel dropdown
This commit is contained in:
@@ -337,3 +337,35 @@ button:hover {
|
||||
transition: left 0.1s linear;
|
||||
z-index: 10;
|
||||
}
|
||||
|
||||
/* Beat indicator in header */
|
||||
.beat-indicator {
|
||||
width: 10px;
|
||||
height: 10px;
|
||||
border-radius: 50%;
|
||||
background: var(--text-dim);
|
||||
flex-shrink: 0;
|
||||
transition: background 0.05s ease;
|
||||
}
|
||||
|
||||
.beat-indicator.beat-flash {
|
||||
background: #ffcc00;
|
||||
box-shadow: 0 0 8px #ffcc00;
|
||||
}
|
||||
|
||||
/* Animation selector */
|
||||
.animation-select-input {
|
||||
background: var(--bg-primary);
|
||||
color: var(--text-primary);
|
||||
border: 1px solid var(--border-dim);
|
||||
padding: 4px 8px;
|
||||
font-family: var(--font-mono);
|
||||
font-size: var(--font-size);
|
||||
width: 100%;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.animation-select-input:focus {
|
||||
border-color: var(--border-bright);
|
||||
outline: none;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user