I am fetching audio chunks, with .webm extension, from S3 bucket and want to concatenate all audio chunks into a single audio file which I can download.
I have already tried concatenateBlob.js but couldn't achieve what I want, it did combine all audio files and works fine when I play it in the browser but when I download the audio file and play the audio, only the first audio chunk is played even though size of the concatenated file is correct.
I believe it has to do something with the header of final blob as explained in this thread but it talks about modifying headers of only wav files which is diff from webm files. Kindly help me sort this out
P.S. I want to do this concatenation in the browser, not on the backend
You can pass the individual segments of the single file to Media Source Extensions for playback, and simultaneously capture and record an
<audio>element withHTMLMediaElement.captureStream()andMediaRecorder().