Playing blob's recorded by javascript MediaRecorder

205 Views Asked by At

I am developing audio chat. Sounds are recorded in a browser (Firefox 91.02, javascript) using MediaRecorder that produces blobs of audio type - I have used MediaRecorder.start(timeslice) method in order to get chunks (blobs) of the sound every milliseconds. The blobs will be sent to server, which retranslate them to another clients, which will listen in their browsers.
The test version records sound and play using Audio object it in the only browser (without sending to network). Each blob that I got every milliseconds I try to play independently.
The problem I have faced is: only the first blob was played correctly, other are not played (browser says: data format is not suitable). I guess this occurs because of I try to play sounds blobs independently.
The question is: is there a solution to record sound blobs which I can play independently - not joining them for player (except for stopping the mediarecorder and restarting periodically) ?

0

There are 0 best solutions below