Basic-Video-Call icon indicating copy to clipboard operation
Basic-Video-Call copied to clipboard

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

Open vol-and opened this issue 3 years ago • 3 comments

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?

vol-and avatar Mar 25 '21 14:03 vol-and

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.

plutoless avatar Mar 27 '21 15:03 plutoless

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 avatar Mar 29 '21 07:03 vol-and

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);
});

vol-and avatar Mar 29 '21 07:03 vol-and