@@ -144,6 +144,55 @@ If the specified video device is being used by another process, or if it is disa
144
144
- A call to the ` localVideoStream.switchSource() ` method will cause ` cameraStartFailed ` to be set to true.
145
145
Our Call Diagnostics guide provides additional information on how to diagnose call related issues.
146
146
147
+ To check or verify if the local video is on or off, you can use isLocalVideoStarted API which returns true or false:
148
+ ``` js
149
+ // Check if local video is on or off
150
+ call .isLocalVideoStarted ;
151
+ ```
152
+
153
+ To listen for changes to the local video, you can subscribe and unsubscribe to the isLocalVideoStartedChanged event
154
+ ``` js
155
+ // Subscribe to local video event
156
+ call .on (' isLocalVideoStartedChanged' , () => {
157
+ // Callback();
158
+ });
159
+ // Unsubscribe from local video event
160
+ call .off (' isLocalVideoStartedChanged' , () => {
161
+ // Callback();
162
+ });
163
+ ```
164
+
165
+
166
+
167
+ ## Start and stop screen sharing while on a call
168
+ To start and stop screen sharing while on a call, you can use asynchronous APIs startScreenSharing and stopScreenSharing respectively:
169
+
170
+ ``` js
171
+ // Start screen sharing
172
+ await call .startScreenSharing ();
173
+
174
+ // Stop screen sharing
175
+ await call .stopScreenSharing ();
176
+ ```
177
+
178
+ To check or verify if screen sharing is on or off, you can use isScreenSharingOn API which returns true or false:
179
+ ``` js
180
+ // Check if screen sharing is on or off
181
+ call .isScreenSharingOn ;
182
+ ```
183
+
184
+ To listen for changes to the screen share, you can subscribe and unsubscribe to the isScreenSharingOnChanged event
185
+ ``` js
186
+ // Subscribe to screen share event
187
+ call .on (' isScreenSharingOnChanged' , () => {
188
+ // Callback();
189
+ });
190
+ // Unsubscribe from screen share event
191
+ call .off (' isScreenSharingOnChanged' , () => {
192
+ // Callback();
193
+ });
194
+ ```
195
+
147
196
## Render remote participant video streams
148
197
149
198
To list the video streams and screen sharing streams of remote participants, inspect the ` videoStreams ` collections:
0 commit comments