Device pickers are intentionally locked during an active recording (README: "Device switching is locked while recording"). Podcasts run long; batteries die and USB mics get bumped.
Why it's locked: the MediaRecorder is bound to the original tracks; naive replacement corrupts the chunk stream.
Sketch
- Either restart the recorder on a new stream and mark a segment boundary (the assembler already understands chunk indexes — a segment concept would extend
server/src/jobs/ assembly), or
- Use
RTCRtpSender.replaceTrack for the live call immediately and only segment the local recording.
- The separate 48kHz WAV PCM worklet (
web/src/lib/recorder/pcm-recorder.ts) needs the same treatment.
Done when: switching mic or camera mid-take produces a complete, gapless (or explicitly segmented) track, and the live call follows the new device within a second or two.
Device pickers are intentionally locked during an active recording (README: "Device switching is locked while recording"). Podcasts run long; batteries die and USB mics get bumped.
Why it's locked: the MediaRecorder is bound to the original tracks; naive replacement corrupts the chunk stream.
Sketch
server/src/jobs/assembly), orRTCRtpSender.replaceTrackfor the live call immediately and only segment the local recording.web/src/lib/recorder/pcm-recorder.ts) needs the same treatment.Done when: switching mic or camera mid-take produces a complete, gapless (or explicitly segmented) track, and the live call follows the new device within a second or two.