From 1ca5e4a3a86bfda9fecf109b06aeed3d9c2a2692 Mon Sep 17 00:00:00 2001 From: Your Name Date: Tue, 19 May 2026 20:45:15 -0400 Subject: [PATCH] simplify --- clio-ui/components/RecordingDetail.jsx | 139 ++++++------------------- 1 file changed, 31 insertions(+), 108 deletions(-) diff --git a/clio-ui/components/RecordingDetail.jsx b/clio-ui/components/RecordingDetail.jsx index 45e22cb..a650f26 100644 --- a/clio-ui/components/RecordingDetail.jsx +++ b/clio-ui/components/RecordingDetail.jsx @@ -279,17 +279,6 @@ function RecordingDetail({ recording: r, data, onBack, allHighlights, setAllHigh 'follow-up': 'var(--amber-dim)', meeting: 'var(--green)', personal: 'var(--text2)', work: 'var(--teal)', }; - const progressPct = (currentTime / totalSeconds) * 100; - - // Waveform: fake bars - const waveformBars = 120; - const waveHeights = useRefRD(null); - if (!waveHeights.current) { - const rand = (seed) => { let s = seed; return () => { s = (s * 16807) % 2147483647; return (s - 1) / 2147483646; }; }; - const rng = rand(r.id * 42); - waveHeights.current = Array.from({ length: waveformBars }, () => 0.1 + rng() * 0.9); - } - const qualityDetails = [ { label: 'Quality', value: r.quality, cls: `q-${r.quality}` }, { label: 'Sample Rate', value: `${r.sampleRate / 1000} kHz`, cls: '' }, @@ -407,110 +396,44 @@ function RecordingDetail({ recording: r, data, onBack, allHighlights, setAllHigh {/* Left: Player + Transcript */}
- {/* Player */} + {/* Player - simplified with native controls */}
- {/* Waveform */} -
- {waveHeights.current.map((h, i) => { - const barPct = i / waveformBars; - const barTime = barPct * totalSeconds; - const isPast = barPct <= progressPct / 100; - const isActive = Math.abs(barPct - progressPct / 100) < 0.015; + {audioLoading && ( +
+ Loading audio... +
+ )} - // Check if bar is within any highlight range (or near a point highlight) - const inHighlight = recHighlights.some(hl => { - if (hl.endSeconds != null) { - // Range highlight - check if bar is within range - return barTime >= hl.startSeconds && barTime <= hl.endSeconds; - } else { - // Point highlight - check if near - return Math.abs(hl.startSeconds - barTime) < (totalSeconds / waveformBars); - } - }); + {/* Native audio element with controls */} + {audioBlobUrl && ( +