Reasons for having separate transports for producing and consuming media

Thank you so much for your help. I finally got to build a WebRTC connection using mediasoup. But is there any reason why you designed a user to create separate sendTransport and recvTransport for producing and consuming respectively?

If a WebRTC transport represents a network path negotiated by both, a WebRTC endpoint and mediasoup, I feel like it could be more efficient to have a single transport handle both producing and consuming.

By having separate Peerconnectios to send and receive we avoid the incredibly painful bidirectionality of Unified-Plan and so much hell in SDP O/A. And we can safely decide which codecs to use for each producer and consumer.

2 Likes