Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is there an option of creating multiple rooms in Agora Console? #266

Open
vol-and opened this issue Mar 25, 2021 · 3 comments
Open

Is there an option of creating multiple rooms in Agora Console? #266

vol-and opened this issue Mar 25, 2021 · 3 comments

Comments

@vol-and
Copy link

vol-and commented Mar 25, 2021

Hi there,

I have an account by Agora for videochat. For now there are 2 rooms with unique App Ids.
What I need is: when users come to a website, by button click they can enter a videochat room. Users can be unknown mulltiple number, but they have to be devided into unknown quantity of rooms.

Is it possible without manually creating in Agora console multiple rooms with unique ids?

@plutoless
Copy link
Contributor

i don't quite get it. you can specify channel name when call joinChannel api. it's up to you how to divide the user group.

@vol-and
Copy link
Author

vol-and commented Mar 29, 2021

To make it straight: I want rooms to have 10 to 12 users each. But I don't know how many users will come, lets say 30 to 80 at once.
I have 3 Projects in my account. That means there can be only 3 rooms to chat, right?
You say that with joinChannel I can create any amount of rooms as long as previous are full? Is there an example code to this?

@vol-and
Copy link
Author

vol-and commented Mar 29, 2021

This is how I use it:
(this is one room with unknown number of users)

room = 'Roomname'; //  <-  this comes from Agora Account and is hardcoded

clientInit = '463lrkgdv8z5w34ofvn3p943m4ct9muvnilsc943'; //  <-  this comes from Agora Account and is hardcoded

let client = AgoraRTC.createClient({
      mode: "rtc",
      codec: "vp8",
 });
  client.init(clientInit);
  client.join(token, room, null, (uid) => { // uid - > null
    let localStream = AgoraRTC.createStream({
        audio: true,
        video: true
    });
  localStream.init(() => {
        localStream.play("wrapper");
        client.publish(localStream, handleError);
        enableUiControls(localStream);
    }, handleError);


   client.on("stream-added", function (evt) {
    client.subscribe(evt.stream, handleError);
});

client.on("stream-subscribed", function (evt) {
    let stream = evt.stream;
    let streamId = String(stream.getId());
    addVideoStream(streamId);
    stream.play(streamId);
});

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants