简体   繁体   中英

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:

在此处输入图片说明 This is a MediaRecorder of type https://developer.mozilla.org/nl/docs/Web/API/MediaRecorder

在此处输入图片说明

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

Server:

在此处输入图片说明

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

Apps (Connected clients)

在此处输入图片说明

This console logs:

在此处输入图片说明

And:

在此处输入图片说明

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

好的,我前一段时间通过向正在发送的ByteArray添加编码来解决了这个问题

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM