Participants from different subsessions can interact with each other

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:

  1. Opens all subsessions
  2. Inserts the user into the subsession corresponding to the group with the same title
  3. 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)

Hey @dev_lxpead

Thanks for your feedback.

From the phenomenon you described, it appears that participants were only assigned to the subsession but did not join it.

In the openSubsessions method, there is an option to control whether participants automatically enter the subsession after being assigned, with the default value set to false. In this case, participants assigned to a subsession will receive the subsession-invite-to-join event, and in the callback for handling this event, the joinSubsession method can be called to join the assigned subsession.

Of course, if automatic join into the subsession is needed, you can specify the isAutoJoinSubsession option as true in the openSubsessions method.

Thanks
Vic

1 Like

@dev_lxpead - Vic is referring to the join subsession function mentioned in the below link