# Rendering of Subsessions

**URL:** <https://devforum.zoom.us/t/rendering-of-subsessions/125500>\
**Category:** Web\
**Created:** [January 29, 2025, 10:00am UTC](https://devforum.zoom.us/t/rendering-of-subsessions/125500 "2025-01-29T10:00:19Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Lennart](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/lennart/32/66739_2.png) [@Lennart](https://devforum.zoom.us/u/Lennart)\
**Post date:** [January 29, 2025, 10:00am UTC](https://devforum.zoom.us/t/rendering-of-subsessions/125500/1 "2025-01-29T10:00:20Z")

</div>

**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)**

1. 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!
2. 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**

1. 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.
2. Next I receive an empty user-removed event and thats it.
3. This leaves me unable to determine that this user was added to a subsession and which subsession.

**My fix:**

1. 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.
2. 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!

---

<div class="post-metadata">

**Author:** ![ekaansh.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/ekaansh.zoom/32/55004_2.png) [@ekaansh.zoom](https://devforum.zoom.us/u/ekaansh.zoom)\
**Post date:** [February 3, 2025, 1:17pm UTC](https://devforum.zoom.us/t/rendering-of-subsessions/125500/2 "2025-02-03T13:17:12Z")

</div>

Hi @Lennart have you tried the [`getCurrentSubsession`](https://marketplacefront.zoom.us/sdk/custom/web/modules/SubsessionClient.html#getCurrentSubsession) method on the [`SubsessionClient`](https://marketplacefront.zoom.us/sdk/custom/web/modules/SubsessionClient.html)?

It should return `{ subsessionId: string; subsessionName: string; userStatus: SubsessionUserStatus }`

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/6/1/614bdd549b610bbaa46ff934617683a02bdaa03c.png) [@system](https://devforum.zoom.us/u/system)\
**Post date:** [March 5, 2025, 11:17pm UTC](https://devforum.zoom.us/t/rendering-of-subsessions/125500/3 "2025-03-05T23:17:40Z")

</div>

Closed on March 5, 2025, 11:17pm UTC

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
