How to receive data quickly? #1132
-
Hi! |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 3 replies
-
Hey I have had similar issues for a while now without any real fix, as far as reproduction goes, I've tested using https://webrtc.github.io/samples/src/content/datachannel/filetransfer/ and it seems that datachannels transferring packets larger than the MTU is slow on android even to itself locally. The example is also using a very similiar chunking system that peerjs is using. At first I thought I need to run it through compression but the provided example worked perfectly fine on ios and desktop. I wanted to test what would happen if I upgrade the maxMessageSize in the SDP but I was having issues using a forked version of this. I changed the peerjs package json to have this in scripts "prepare": "npm run build" but started running into this: And so thus far, these are my findings if anyone finds them useful. I will be trying to simply transplant peerjs into my project and make these changes instead of relying on the forking methodology for now but assistance for that would be nice :). |
Beta Was this translation helpful? Give feedback.
-
I hava simlar issue。Seems all the send done, then the data start to recevied. |
Beta Was this translation helpful? Give feedback.
-
I suspect this had to do with the I just published PeerJS Please let me know if encoding makes any difference for your use-case. |
Beta Was this translation helpful? Give feedback.
I suspect this had to do with the
EncodingQueue
. Sometimes chunks were processed in a suboptimal order, resulting in never freeing the first full object of data.I just published PeerJS
v1.5
. It comes fixes this and comes with a much faster BinaryPack implementation and support for the even faster CBOR and MessagePack formats.Please let me know if encoding makes any difference for your use-case.