Curious why mediasoup-client and libmediasoupclient require separate transports for send/receive

I saw in the docs and on the forum that the server supports sending and receiving on a single transport, but that mediasoup-client and libmediasoupclient do not. I was curious why that limitation exists.

I’m currently using my own wrapper around the native chromium libwebrtc library, and wasn’t sure if I would run into this same limitation too or not. Ideally I’d love to use a single transport for each client that handles both send and receive, but I’d love to know why that is or isn’t possible before I get too far down one path or another.

Max

A follow-up question on this. Is the limitation that a transport can’t be bidirectional or do these libraries also require a transport for every individual consumer? ie if I have a room with 10 people in it, does every client have 10 transports (1 for sending + 9 for receiving every other stream?)

Also, if that’s the case, do you think it would be reasonable to use an SCTP data channel for the signaling part of adding/removing streams (and their transports)? I can use a websocket for the initial signaling, but I’d prefer to close it once a client is connected to the room.

Max

Thais has been explained many times in this forum:

  1. We use separate transports to avoid annoying SDP related issues and complexity.
  2. Nowhere is said that you need one transport per consumer.

My apologies. I run a software support community too and can appreciate how much of a burden it is. fwiw I did spend a while searching the forums in order to try to answer this. All I could find is that it was not possible, but not why it was not possible. Thanks for the information.

Link to one of the other threads for folks who find this one: What are the design limitations leading to separate send/receive transports on the client and can we lift them?

Basically it’s impossible to deal with a single peer connection and bidirectional m sections without ugly results.

Yeah that makes sense. To be honest, after reading your post on SDP and ORTC I’m surprised SDP has stuck around this long. Sounds like an absolute nightmare. Thanks for handling that piece for us :slight_smile:

Yep, that’s a good thread.