Reuse consumer for a specific producer across client

Hi

I just started using mediasoup for a webrtc application and while I now understand the general approach, some things aren’t yet clear which brings me to this question.

I would like to know if I can reuse the same consumer for a given producer for different clients or do I have to recreate a consumer each time a client has to consume.

I understand that to create a consumer, after creating a recvtransport, i have to signal to the server to create a consumer for a specific producer. And in return use the response from the server to create the corresponding consumer on the client. My question is when a different client wants to consume the same producer, is it possible to send thesame consumer that has already been created on the server, so they can create a corresponding consumer on the client, this way we dont have multiple consumer for thesame producer. It makes sense to me to do it this way, i dont know if there is something i am missing.

You cannot reuse same consumer for different clients. Consumers are created in transports and obviously you cannot share same transport with different clients.

1 Like

I totally missed the part where the consumers are created using the recvtransport on the server. This makes sense. Thank you for the quick response.