Send JSON data by mediasoup continuously like a track.

I have JSON data that I want to send it by mediasoup like a track. The data will refresh in every 1 second and the size of data could be about 10-500 KBs. Is it possible to send it continuously?
If there is document please help me to find it.
Thank you.

“Continuously” is a sensitive word in the discrete world of digital data transmission. :smiley:

You could just use DataChannels with a 1-second setTimeout() to send whatever data you want.

1 Like

Great thank you.
When I send my data the dataProducer will be closed. I found that if I send data more then default value of maxSctpMessageSize (262144) it closes the dataProducer.
I set my maxSctpMessageSize value to a large amount in WebRtcTransportOptions but it doesn’t effect on that.
How can I set maxSctpMessageSize or anything that fixes the problem?

Is there a method like setMaxIncomingBitrate for maxSctpMessageSize?

That might be the max sctp message size allowed by the browser.

1 Like

If you read the documentation of mediasoup you’d realize of many limitations in SCTP message maximum size due to browsers implementation. I cannot explain here what is already documented.

1 Like