wrtc_kit supports group calls. Connecting several users with each other is almost as easy as making regular calls. You need however implement some additional functions to support group calls in your client.
Set wrtc.maxNrCalls to a value higher than 1 to indicate your client supports group calls. There will be two video streams created for each new member in the group so group calls with many members will have a high impact on your system's performance. An average PC can support group calls with up to about 10-15 users.
To start a group call you first need to make regular calls to the users you want to connect. So if you want a group call with users A, B and yourself you need to first make a regular call to user A, another regular call to user B, and then connect everyone into a group call using wrtc.inviteGroup()
As an alternative method you can make a regular call to user A and then make a call to user B using wrtc.call("B" ,{callGroup:true}). wrtc_kit will then call user B and create a group call with users A, B and you.
You can also create group calls "from scratch" using wrtc.callGroup(["A", "B"]). It will call all listed participants and connect them to a group call.
Or you can use wrtc.adv.newGroupLink() to create a unique URL link that you can send to all participants. When they click on that link they will join the group call. You can prepare and email the link several days ahead.
Once a group call has been established you can add additional members to a group call either by first making a regular call to the new user and then using wrtc.addToGroupCall() or by using wrtc.call("C" ,{callGroup:true}).
As an alternative method you can use wrtc.adv.newGroupLink(true, wrtc.adv.groupID) to obtain a URL link you can send to users. When they click on that link they will be connected to the group call.
If you want to leave a group call use wrtc.endGroupCall(). (Please note that call.hangup() is not ending group calls.)
If you want to kick out somebody else from the group use wrtc.removeFromGroupcall().
You can forcefully mute someone's mic or cam in a group (a great way of cutting off coughers) using call.adv.mutePartner().
To avoid overloading the CPU with so many video streams going on it is essential to keep video bandwidth down. You should consider using call.adv.setVideoEncoding() in wrtc.onIsTalking() to dynamically raise your transmitted video bitrate when you are speaking and lower it while somebody else is speaking. You may set call.adv.setVideoEncoding(750) when you are speaking and lower to call.adv.setVideoEncoding(100) when somebody else is without major degradation of image quality.
There are a couple of new events you need to implement to be able to properly support group calls.
wrtc.onNewCallObject() is an event that occurs each time a new member is added to the group call. A web client that supports only one call at a time can have a static HTML video element that displays the remote user's video stream. Group calls however can have multiple video streams to multiple users, thus the HTML video elements needs to be created dynamically for each new group member. This event is used to be able to create those, and other dynamic elements you might need.
wrtc.onEndCallObject() is an event that occurs each time a member is removed from the group call. Then you can remove the dynamic HTML video element you created in wrtc.onNewCallObject(). Using these two events you can add and remove dynamic elements needed for each user in a group call.
wrtc.onIsTalking() is an event that occurs each time a new user starts to talk in a group call. You can use this event to visually highlight who is currently talking in a group call so users can easier see it. Adding a rectangle around the current talker's video, making it larger, or similar indication.
wrtc.onMultiuserChanged() is an event you can use to keep track of and display who are currently in the group call.
wrtc.onInviteGroupProgress() is an event you can use to keep track of and display status information about the group call.
In mixed environments it might happen that some of the clients are not group call capable. They have wrtc.maxNrCalls set to 1 and are only capable of handling one single call at a time.
If such a client is invited into a group call it connects to the voice bridge at IXNX and establishes an audio-only connection with the group call. You can also create a workaround solution that switches to a group-call-capable client instead in such scenarios.