I am trying to use getUserMedia() to create a react + electron recorder app. There’s a scenario when a user could change their input device while recording is ongoing and I want it to be handled. I know that there’s an event listener that can track this event. Over there I’ve tried stopping recording and starting again while keeping pushing recorded chunks to an array that later forms a recording file. Unfortunately the output file doesn’t work with this implementation. What could be a solution here?
Device change from laptop to bluetooth earphones.
I’ve gotten this to work on a Swift app by writing recorded data to a buffer that was converting audio to standardized sample rate, format and bit rate. But I haven’t been able to find online anything related to the problem.
I am building for Windows and I am willing to consider npms that do not require installing any software.
Tried handling device change by stopping and starting recording all over.
1