feat(simulations/eo): waveform + timeline colorée pendant l'enregistrement (Sprint 4.6)
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
9614f9de14
commit
d8bae9520c
6 changed files with 279 additions and 0 deletions
|
|
@ -17,6 +17,8 @@ import { Download, Mic, MicOff, Square } from 'lucide-react'
|
|||
import { Button } from '@/shared/ui/Button'
|
||||
import { formatTimer } from '../lib/simulationConfig'
|
||||
import { useAudioRecorder } from '../hooks/useAudioRecorder'
|
||||
import { RecordingTimeline } from './RecordingTimeline'
|
||||
import { RecordingWaveform } from './RecordingWaveform'
|
||||
|
||||
interface Props {
|
||||
/** Durée minimale (s) avant que la soumission soit autorisée. */
|
||||
|
|
@ -136,6 +138,18 @@ export function AudioRecorder({
|
|||
</span>
|
||||
</div>
|
||||
|
||||
{isRecording && (
|
||||
<div className="mt-3">
|
||||
<RecordingWaveform stream={recorder.mediaStream} />
|
||||
</div>
|
||||
)}
|
||||
|
||||
{maxSeconds && (isRecording || isStopped) && (
|
||||
<div className="mt-3">
|
||||
<RecordingTimeline elapsedSeconds={recorder.elapsedSeconds} maxSeconds={maxSeconds} />
|
||||
</div>
|
||||
)}
|
||||
|
||||
{isRecording && remaining > 0 && (
|
||||
<p className="mt-3 text-xs text-ink-secondary">
|
||||
Minimum 30 secondes requis ({remaining} s restantes).
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue