Fundamentals Question

I’m just getting started with mediasoup and I have a question regarding the transporting concept.

If I want to receive, video and audio, do I require that a “peer” have separate producer transports for video and audio, and that I need to have also have two consumer transports to receive?

Or will one producer/consumer transport will suffice?

One transport can handle multiple media tracks so you only need one.

Transports are also unidirectional (consumers in recvTransports and producers on sendTransports).

I see. If there’s 3 producers. (3 different peers), should the next peer have 3 consumers to consume 3 producers?

Yes the next peer will need one transport and would need to call consume three times, thus three consumers.

So 1 consumer transport, then call consume on it 3 times with different producer ids.

Yes .

Keep in mind that this is an SFU (client-server model) - all clients are connected to a monolithic mediasoup server (unless you build multiple servers). There’s no actual peer to peer like you would get with a WebRTC mesh model.