All integrations were made following the Zoom Video SDK documentation.
I’m having some unsolved issues in the documentation.
Even if participants are in different subsessions, they can hear, view cameras and share screens from participants in another subsession.
In addition to inserting participants into different subsessions, is it necessary to take any other action so that they are in separate environments? The idea is that the participant can only hear, see the camera and share the screen of the participants in the same subsession.
I created a logic that, based on the group that a user has in my system, subsessions were created and when entering the session the participants were already inserted in them. For this to work I needed to implement a step by step that:
- Opens all subsessions
- Inserts the user into the subsession corresponding to the group with the same title
- Closes all subsessions
The code snippet that does this is this:
const checkOrCreateSubsession = async (client, subsessionClient, userGroup, userId) => {
if (subsessionClient && userGroup) {
const currentSubsessionClient = client.getSubsessionClient()
const subsessionsList = currentSubsessionClient.getSubsessionList()
if (currentSubsessionClient) {
const groupExists = subsessionsList?.find(i => i?.subsessionName === userGroup)
if (!groupExists) {
const response = await handleCreateSubsessions(subsessionClient, userGroup)
const newSubsessionId = response[0]?.subsessionId
if (newSubsessionId && userId) {
await currentSubsessionClient.openSubsessions(subsessionClient.getSubsessionList())
await assignUserToSubsession(currentSubsessionClient, userId, newSubsessionId)
await closeSubsessions(subsessionClient)
}
}
}
}
}
Below is more information about the versions and system I am using:
Video SDK version: 1.12.5
React version: 18
Next JS version: 14.2.2
OS: Windows 11
Browser: Google Chrome
Browser Version 129.0.6668.70 (Official Build) (64 bits)