Description
I am trying to implement the subsession feature for the most recent Zoom VideoSDK Web-Version. Creating the subsession, assigning users to them and finally opening the sessions works fine. I am using auto-join! My issue is with the rendering of the subsession participants on the video-player-container element.
So when the subsessions start the following happens:
Host (opened the subsessions)
- The user (host) that created and opened the subsessions receives some user-removed events for all the participants that were assigned to the subessions. I use this to remove the participants from the video container. Everything as it should!
- Next the host receives user-added events that include a subsession id. I just ignore these events. This also results in a correct video container.
Normaler user assigned to subsession
- Next I look at what happens on the side of a normal user. This user only receives an add-user event that includes himself, but no subsession id.
- Next I receive an empty user-removed event and thats it.
- This leaves me unable to determine that this user was added to a subsession and which subsession.
My fix:
- I tried to use the connection-change event. By looking for the ‘join breakout room’ reason I can now detect that the user is beeing added to a breakout room.
- If that happens, I clear the whole video-container and re-initalize it by calling client.getAllUser(); and listening to the user-added event. This also seems to result in a correct video container.
My issue is the following: How do I determine which subsession the user is in? Neither the connection-change, nor the user-added events contain a subsessionId and client.getCurrentUserInfo(); returnes undefined for a while (I could work around this using a timeout…)
How do I properly detect that the user now joined a subsession and which subsession he joined? I couldn’t find an event that helps me detect this. It feels like this is a basic requirement to implement subsession, so what am I missing here?
Thank in advance!