use-media-recorder
use-media-recorder copied to clipboard
onStop callback never called
The onStop callback is never called, so there is no way to get the last audio chunk and it's unfortunately lost. This is because the event listener for handleStop() is removed in stopRecording(), preventing it to be called by the media recorder.
[line 254] mediaRecorder.current.removeEventListener('stop', handleStop);
[verified on Chrome 116 and FF 116]