increase number of consumers in mediasoup-demo

Hi,
I’m working on a Online class App. This is the scenario:
I have a teacher and 30 students.
I have changed Room.js of mediasoup-demo server and made it like this:

  1. Teacher can consume all student if he wants. (at the first when students connect they all silence).
  2. Teacher can produce.
  3. Students can consume teacher.
  4. Students can produce himself if teacher wants.(at the first when students connect they all silence).
    I have to mention that I do not want to have all student’s video and audio. JUST one of them or two.
    It’s working fine now, but I have a problem :frowning:
    Assume 3 students already joined. When the fourth student wants to connect, one of students loses teacher’s video and audio immediately.
    How can I fix it?
    I mean, there is no limitation here? Maybe I made a mistake somewhere.

That’s a bug in your code. No limitation here.

1 Like

Thank you.
Yes that was my bad.
Another question. When 5 or 6 people are connected everything is OK and my send speed is about 1.5Mbs. But when it increases to more than 15 users my send speed goes down and reach to 200-300 Kbs. Why?
In addition I have to say all users’s webcam and mic are disabled and when I need, I made them resume.
My server is Ubuntu and has 4CPU and 8G RAM.
Like the previous one I made mistake somewhere :slight_smile:?

You think something is wrong with my server’s bandwidth? If I got this I can change my server. Please help me. Thank you.

I found that it was my network issue that sometimes it happens. But when internet got better my uplink never went back, at all. I have to refresh the page.
What should I have to do?

When the uplink drops down I disable and enable the webcam with this code:

await roomClient.disableWebcam();
await roomClient.enableWebcam();

and after that producer uplink gets better like when we started and the consumer’s video gets a quick blink. I know I made a mistake somewhere in configuration and I have no idea.
Or there is a way to update “sendTransport.produce”?

I disabled Simulcast, everything is OK now and I’m so happy. :slight_smile:
Thank you for everything.

Hello, the script you created is a really good idea. Can you share these codes for my students too? We can also make improvements and share them with you. Thanks