When the number of participants is small (e.g., 10 or fewer), if a participant unpublishes all their tracks, their videoTrack
and audioTrack
become null
in the room.remoteParticipants
list of other users. This works as expected, and new participants who join later cannot subscribe to the unpublished participant.
However, when the number of participants exceeds 20-30-40, …, unpublishing does not work as expected. The participant who unpublishes still has video and audio tracks in the room.remoteParticipants
object for other users.
- The unsubscribed signal does trigger for existing participants in the meeting, and they correctly unsubscribe from the unpublished participant.
- However, when a new participant joins the room, they are still able to subscribe to the unpublished participant’s tracks, even though the tracks were unpublished earlier.
- Why does this issue happen only when the participant count is high?
- Why do existing participants correctly receive the unsubscribe event, but new participants can still subscribe to the unpublished user?
- Is there a way to force all remote participants, including new joiners, to update and recognize when a user has unpublished all their tracks?
- Could this be related to LiveKit’s track subscription management for scalability?
- What’s the best way to ensure that a new participant does not subscribe to an unpublished user?
Any insights or solutions would be greatly appreciated! Thanks in advance.