Janus VideoRoom Plugin

I want to create an app where up to 6 participants can be in the same video room. And then I also want to allow other users to join in the video room but they cannot publish their streams but instead can only subscribe to the 6 participants already in the video room. But is the number of viewers (those who joins the room and only subscribe to others’ streams and cannot publish their own stream) counted in the limit stated in the videoroom configuration?:
publishers = 6
In the above configuration does it mean only 6 participants can be in the video room? Or does it mean only 6 participants can publish their streams but other users are still allowed to enter and subscribe?

publishers only impacts active publishers, not subscribers.

2 Likes

So this means I can have 6 publishers and as many subscribers as I want?

Hi Lorenzo. I was trying to implement my usecase where there are 2 publishers in a video room and then have other users join the room as subscribers but then I keep getting this error:
Missing mandatory element (feed)

This is the code I have used for sending the joining request as subscriber:
let register = {
request: “join”,
room: myroom,
ptype: “subscriber”,
display: username,
id: parseInt(userId)
};
myusername = escapeXmlTags(username);
sfutest.send({
message: register
});

I think I am supposed to pass the ids of the feed I want to subscribe to when joining but then how do I get the list of feeds that are available in a specific video call room? Thanks in advance for the help.

Join as a publisher just to get the list of active streams. If you don’t publish, you don’t count for the max_publishers. This is explained in the documentation.