Search code examples
javascriptsocket.ioaudio-streamingweb-audio-apijavascript-audio-api

Play blob stream from MediaRecorder?


I want to play a stream of audio blobs that came from a MediaRecorder
I have a website containing this piece of javascript angular code:

enter image description here This is a MediaRecorder of type https://developer.mozilla.org/nl/docs/Web/API/MediaRecorder

enter image description here

This sends the data from the MediaRecorder in 'audio/webm' format to the server

Server:

enter image description here

All this does is relay the blobs coming in from the MediaRecorder to all the connected clients

Apps (Connected clients)

enter image description here

This console logs:

enter image description here

And:

enter image description here

How can I play this audio blob stream on the client side?


Solution

  • OK, I solved this one some time ago by adding an encoding to the ByteArrays which were being sent