Skip to content

Commit 121a736

Browse files
authored
docs: add a note about participant list truncation and livestreaming use case (#1559)
1 parent 52d7a61 commit 121a736

File tree

3 files changed

+7
-1
lines changed

3 files changed

+7
-1
lines changed

packages/client/docusaurus/docs/javascript/02-guides/03-call-and-participant-state.mdx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,8 @@ const subscription = call.state.participants$.subscribe((participants) => {
151151
subscription.unsubscribe();
152152
```
153153

154+
In a call with many participants, the value of the `participants$` call state observable is truncated to 250 participants. The participants who are publishing video, audio, or screen sharing have priority over the other participants in the list. This means, for example, that in a livestream with one host and many viewers, the host is guaranteed to be in the list.
155+
154156
## Client state
155157

156158
The client state can be accessed by `client.state`.

packages/react-native-sdk/docusaurus/docs/reactnative/03-core/03-call-and-participant-state.mdx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,10 +205,12 @@ const hosts = participants.filter((p) => p.roles.includes('host'));
205205

206206
// participants that publish video and audio
207207
const videoParticipants = participants.filter(
208-
(p) => hasVideo(p) && hasAudio(p),
208+
(p) => hasVideo(p) && hasAudio(p)
209209
);
210210
```
211211

212+
In a call with many participants, the list returned by the `useParticipants` call state hook is truncated to 250 participants. The participants who are publishing video, audio, or screen sharing have priority over the other participants in the list. This means, for example, that in a livestream with one host and many viewers, the host is guaranteed to be in the list.
213+
212214
## Client state
213215

214216
To observe client state you need to provide a `StreamVideoClient` instance to the `StreamVideo` context provider.

packages/react-sdk/docusaurus/docs/React/02-guides/03-call-and-participant-state.mdx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,8 @@ const videoParticipants = participants.filter(
207207
);
208208
```
209209

210+
In a call with many participants, the list returned by the `useParticipants` call state hook is truncated to 250 participants. The participants who are publishing video, audio, or screen sharing have priority over the other participants in the list. This means, for example, that in a livestream with one host and many viewers, the host is guaranteed to be in the list.
211+
210212
## Client state
211213

212214
To observe client state you need to provide a `StreamVideoClient` instance to the `StreamVideo` context provider.

0 commit comments

Comments
 (0)