How to limit participants in a conference room

Hello,

How can I limit each confference room with only max 2 participants?

Users can only connect to an OpenVidu session with a token. You just generate as many tokens as users you want to join. Tokens are single-use only. For connecting 2 users to a session, generate 2 tokens for that session. No other users will be able to join that session if you don’t generate more tokens for that session.

Hello,

I am new to OpenVidu, but I did play with the demos and looked over the documentation. I am trying to build a conference room like you describe here, but I did not find any tutorials or ducomentations on that.
Can anyone point me in the right dirrection please(NodeJS+Angular if possible)?

Kind regards,
Mihai.

You can check the tutorials of our docs:

https://docs.openvidu.io/en/2.14.0/tutorials/openvidu-insecure-angular/

https://docs.openvidu.io/en/2.14.0/tutorials/openvidu-js-node/

https://docs.openvidu.io/en/2.14.0/demos/openvidu-call/

Thank you CSantos for your prompt reply.

I did read and tested the “openvidu-insecure-angular” and I am currently working on transforming the “openvidu-library-angular” tutorial into something else: 2 sessions side-by-side; one as a classic chatroom and another as a conferenceroom where only the admin shares his video stream and everyone else has to only subscribe.

But nowhere in these tutorials I can understand how one can subscribe to a session without becomming a publisher.

I tried to simply not creating the publisher for any user that is not a specific name, but that makes that the frontend does not have a publisher, thus it does not display any video what so ever.

So, in other words, how can I set the “this.mainStreamManager” as a publisher defined in another client instance ?
Or how to modify the HTML to automatically detect if there is a publisher in my session and display that user video by default ?

Kind regards,
Mihai.

The use cases that you’re describing can be also read in OpenVidu Docs. Using OpenVidu API you can create a only subscribe token,
https://docs.openvidu.io/en/2.14.0/reference-docs/REST-API/#post-apitokens

Besides, OpenVidu Classroom demo is doing it.
https://docs.openvidu.io/en/2.14.0/demos/openvidu-classroom/

By the way, open a new forum post for your question.

Cheers