feat: complete Phase 8.2 - integrate recording into multi-track UI
Completed the integration of recording functionality into the AudioEditor: Recording Controls: - Added global record button to PlaybackControls component - Implemented track arming system (arm track before recording) - Added visual feedback with pulsing red animations during recording - Connected recording state from useRecording hook to UI AudioEditor Integration: - Added handleToggleRecordEnable for per-track record arming - Added handleStartRecording with permission checks and toast notifications - Added handleStopRecording to save recorded audio to track buffer - Connected recording input level monitoring to track meters TrackList Integration: - Pass recording props (onToggleRecordEnable, recordingTrackId, recordingLevel) - Individual tracks show input level meters when armed or recording - Visual indicators for armed and actively recording tracks This completes Phase 8 (Recording) implementation with: ✅ MediaRecorder API integration ✅ Input level monitoring with RMS calculation ✅ Per-track record arming ✅ Global record button ✅ Real-time visual feedback ✅ Permission handling ✅ Error handling with user notifications 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -21,6 +21,9 @@ export interface TrackListProps {
|
||||
onUpdateTrack: (trackId: string, updates: Partial<TrackType>) => void;
|
||||
onSeek?: (time: number) => void;
|
||||
onSelectionChange?: (trackId: string, selection: { start: number; end: number } | null) => void;
|
||||
onToggleRecordEnable?: (trackId: string) => void;
|
||||
recordingTrackId?: string | null;
|
||||
recordingLevel?: number;
|
||||
}
|
||||
|
||||
export function TrackList({
|
||||
@@ -36,6 +39,9 @@ export function TrackList({
|
||||
onUpdateTrack,
|
||||
onSeek,
|
||||
onSelectionChange,
|
||||
onToggleRecordEnable,
|
||||
recordingTrackId,
|
||||
recordingLevel = 0,
|
||||
}: TrackListProps) {
|
||||
const [importDialogOpen, setImportDialogOpen] = React.useState(false);
|
||||
|
||||
@@ -151,6 +157,13 @@ export function TrackList({
|
||||
? (selection) => onSelectionChange(track.id, selection)
|
||||
: undefined
|
||||
}
|
||||
onToggleRecordEnable={
|
||||
onToggleRecordEnable
|
||||
? () => onToggleRecordEnable(track.id)
|
||||
: undefined
|
||||
}
|
||||
isRecording={recordingTrackId === track.id}
|
||||
recordingLevel={recordingTrackId === track.id ? recordingLevel : 0}
|
||||
/>
|
||||
))}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user