Skip to content

Commit 6dfa892

Browse files
authored
fix: add docs for broadcast constraints (#582)
* fix: add docs for broadcast constraints * fix: broadcast docs
1 parent d7f53e1 commit 6dfa892

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

sdks/react/broadcast/Root.mdx

+17-1
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,10 @@ the video first, then streams media to the server upon activation.
113113
Controls whether audio is enabled initially for the broadcast. The default is
114114
`true`. Set to `false` to start the broadcast without requesting an audio track.
115115

116+
This can be an object that adheres to the structure of
117+
[`MediaTrackConstraints`](https://developer.mozilla.org/en-US/docs/Web/API/MediaTrackConstraints), which will
118+
constrain the audio track used in the broadcast.
119+
116120
```tsx
117121
<Broadcast.Root audio={false}>{...}</Broadcast.Root>
118122
```
@@ -122,8 +126,20 @@ Controls whether audio is enabled initially for the broadcast. The default is
122126
Controls whether video is enabled initially for the broadcast. The default is
123127
`true`. Set to `false` to start the broadcast without requesting a video track.
124128

129+
This can be an object that adheres to the structure of
130+
[`MediaTrackConstraints`](https://developer.mozilla.org/en-US/docs/Web/API/MediaTrackConstraints), which will
131+
constrain the video track used in the broadcast. This is usually used to limit the resolution of the video
132+
and improve bandwidth usage.
133+
125134
```tsx
126-
<Broadcast.Root video={false}>{...}</Broadcast.Root>
135+
<Broadcast.Root video={{
136+
width: {
137+
ideal: 1920,
138+
},
139+
height: {
140+
ideal: 1080,
141+
},
142+
}}>{...}</Broadcast.Root>
127143
```
128144

129145
### `hotkeys`

0 commit comments

Comments
 (0)