javascriptwebrtcsimple-peer

WebRTC: data transfer issue


I'm trying to send ArrayBuffer using WebRTC and simple-peer package. And I got these issues:

But everything is fine when:

I use peer.send(data) and peer.on('data', callback) functions from simple-peer and code is really simple so I have no idea what's going wrong.


Solution

  • According to THAT article, there are a message size limitations. The conclusion is:

    All In all, the takeaway is that a 16 Kbyte message size is the one allowing for the highest throughput, while also being the most portable one. By the way, in some WebRTC tutorials and literature, the authors recommend using 16 Kbytes but they don’t tell you why. Well now you know.