Skip to content

Commit aa85026

Browse files
Merge pull request #265817 from chriswhilar/patch-86
Update manage-video-web.md
2 parents 24b20be + 19e89f7 commit aa85026

File tree

1 file changed

+17
-16
lines changed

1 file changed

+17
-16
lines changed

articles/communication-services/how-tos/calling-sdk/includes/manage-video/manage-video-web.md

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ const deviceManager = await callClient.getDeviceManager();
2020

2121
### Get local devices
2222

23-
To access local devices, you can use enumeration methods on `deviceManager`. Enumeration is an asynchronous action
23+
To access local devices, you can use enumeration methods on `deviceManager`. Enumeration is an asynchronous action.
2424

2525
```js
2626
// Get a list of available video devices for use.
@@ -51,7 +51,7 @@ const defaultSpeaker = deviceManager.selectedSpeaker;
5151
await deviceManager.selectSpeaker(localSpeakers[0]);
5252
```
5353

54-
Each `CallAgent` can choose its own microphone and speakers on its associated `DeviceManager`. It is recommended that different `CallAgents` use different microphones and speakers. They should not share the same microphones nor speakers. In case of sharing them, Microphone UFDs may be triggered and microphone will stop working depending on the browser / os.
54+
Each `CallAgent` can choose its own microphone and speakers on its associated `DeviceManager`. It is recommended that different `CallAgents` use different microphones and speakers. They should not share the same microphones nor speakers. In case of sharing them, Microphone UFDs may be triggered and the microphone stops working depending on the browser / os.
5555

5656
### Local video stream properties
5757

@@ -71,7 +71,7 @@ const type: MediaStreamType = localVideoStream.mediaStreamType;
7171

7272
### Local camera preview
7373

74-
You can use `deviceManager` and `VideoStreamRenderer` to begin rendering streams from your local camera. This stream won't be sent to other participants; it's a local preview feed.
74+
You can use `deviceManager` and `VideoStreamRenderer` to begin rendering streams from your local camera. This stream is not sent to other participants; it's a local preview feed.
7575

7676
```js
7777
// To start viewing local camera preview
@@ -102,9 +102,9 @@ console.log(result.audio);
102102
console.log(result.video);
103103
```
104104
#### Notes
105-
- The 'videoDevicesUpdated' event fires when video devices are plugging-in/unplugged.
106-
- The 'audioDevicesUpdated' event fires when audio devices are plugged
107-
- When the DeviceManager is created, at first it doesn't know about any devices if permissions haven't been granted yet so initially its device list will be empty. If we then call the DeviceManager.askPermission() API, the user is prompted for device access. When the user clicks on 'allow' to grant the access the device manager learns about the devices on the system, update it's device lists and emit the 'audioDevicesUpdated' and 'videoDevicesUpdated' events. If a user refreshes the page and creates a device manager, the device manager will be able to learn about devices because user has already previously granted access, and so it will initially it will have its device lists filled and it will not emit 'audioDevicesUpdated' nor 'videoDevicesUpdated' events.
105+
- `videoDevicesUpdated` event fires when video devices are plugging-in/unplugged.
106+
- `audioDevicesUpdated` event fires when audio devices are plugged.
107+
- When the DeviceManager is created, at first it doesn't know about any devices if permissions are not granted yet, so initially its device list is empty. If we then call the DeviceManager.askPermission() API, the user is prompted for device access. When the user clicks on 'allow' to grant the access the device manager learns about the devices on the system, update it's device lists and emit the 'audioDevicesUpdated' and 'videoDevicesUpdated' events. If a user refreshes the page and creates a device manager, the device manager is able to learn about devices because user has already previously granted access. It will initially it will have its device lists filled and it will not emit 'audioDevicesUpdated' nor 'videoDevicesUpdated' events.
108108
- Speaker enumeration/selection isn't supported on Android Chrome, iOS Safari, nor macOS Safari.
109109

110110
## Place a call with video camera
@@ -160,8 +160,8 @@ const camera = cameras[1];
160160
localVideoStream.switchSource(camera);
161161
```
162162

163-
If the specified video device is being used by another process, or if it's disabled in the system:
164-
- While in a call, if your video is off and you start video using `call.startVideo()`, this method throws a `SourceUnavailableError` and `cameraStartFiled` will be set to true.
163+
If the specified video device is being used by another process, or if it is not enabled in the system:
164+
- While in a call, if your video is off and you start video using `call.startVideo()`, this method throws a `SourceUnavailableError` and `cameraStartFiled` user facing diagnostic is set to true.
165165
- A call to the `localVideoStream.switchSource()` method causes `cameraStartFailed` to be set to true.
166166
Our Call Diagnostics guide provides additional information on how to diagnose call related issues.
167167

@@ -171,7 +171,7 @@ To verify if the local video is on or off you can use isLocalVideoStarted API, w
171171
call.isLocalVideoStarted;
172172
```
173173

174-
To listen for changes to the local video, you can subscribe and unsubscribe to the isLocalVideoStartedChanged event
174+
To listen for changes to the local video, you can subscribe and unsubscribe to the isLocalVideoStartedChanged event:
175175
```js
176176
// Subscribe to local video event
177177
call.on('isLocalVideoStartedChanged', () => {
@@ -209,7 +209,7 @@ To verify if screen sharing is on or off, you can use isScreenSharingOn API, whi
209209
call.isScreenSharingOn;
210210
```
211211

212-
To listen for changes to the screen share, you can subscribe and unsubscribe to the isScreenSharingOnChanged event
212+
To listen for changes to the screen share, you can subscribe and unsubscribe to the isScreenSharingOnChanged event:
213213
```js
214214
// Subscribe to screen share event
215215
call.on('isScreenSharingOnChanged', () => {
@@ -261,7 +261,7 @@ const streamType: MediaStreamType = remoteVideoStream.mediaStreamType;
261261

262262
To render `RemoteVideoStream`, you have to subscribe to its `isAvailableChanged` event. If the `isAvailable` property changes to `true`, a remote participant is sending a stream. After that happens, create a new instance of `VideoStreamRenderer`, and then create a new `VideoStreamRendererView` instance by using the asynchronous `createView` method. You can then attach `view.target` to any UI element.
263263

264-
Whenever availability of a remote stream changes, you can destroy the whole `VideoStreamRenderer` or a specific `VideoStreamRendererView`. If you do decided to keep them will result in displaying blank video frame.
264+
Whenever availability of a remote stream changes, you can destroy the whole `VideoStreamRenderer` or a specific `VideoStreamRendererView`. If you do decided to keep them, then the view displays a blank video frame.
265265

266266
```js
267267
// Reference to the html's div where we would display a grid of all remote video stream from all participants.
@@ -364,7 +364,7 @@ CSS for styling the loading spinner over the remote video stream.
364364

365365
### Remote video quality
366366

367-
The Azure Communication Services WebJS SDK, starting in version [1.15.1](https://github.com/Azure/Communication/blob/master/releasenotes/acs-javascript-calling-library-release-notes.md#1153-stable-2023-08-18), provides a feature called Optimal Video Count (OVC). This feature can be used to inform applications at run-time how many incoming videos from different participants can be optimally rendered at a given moment in a group call (2+ participants). This feature exposes a property `optimalVideoCount` that is dynamically changing during the call based on the network and hardware capabilities of a local endpoint. The value of `optimalVideoCount` details how many videos from different participants application should render at a given moment. Applications should handle these changes and update number of rendered videoes accordingly to the recommendation. There's a cooldown period (around 10s), between updates that to avoid too frequent of changes.
367+
The Azure Communication Services WebJS SDK, starting in version [1.15.1](https://github.com/Azure/Communication/blob/master/releasenotes/acs-javascript-calling-library-release-notes.md#1153-stable-2023-08-18), provides a feature called Optimal Video Count (OVC). This feature can be used to inform applications at run-time how many incoming videos from different participants can be optimally rendered at a given moment in a group call (2+ participants). This feature exposes a property `optimalVideoCount` that is dynamically changing during the call based on the network and hardware capabilities of a local endpoint. The value of `optimalVideoCount` details how many videos from different participants application should render at a given moment. Applications should handle these changes and update number of rendered videoes accordingly to the recommendation. There's a cooldown period (around 10 s), between updates that to avoid too frequent of changes.
368368

369369
**Usage**
370370
The `optimalVideoCount` feature is a call feature
@@ -408,12 +408,12 @@ const isAvailable: boolean = remoteVideoStream.isAvailable;
408408
```
409409

410410
- `isReceiving`:
411-
- Will inform the application if remote video stream data is being received or not. Such scenarios are:
411+
- Informs the application if remote video stream data is being received or not. Such scenarios are:
412412
- I'm viewing the video of a remote participant who is on mobile browser. The remote participant brings the mobile browser app to the background. I now see the RemoteVideoStream.isReceiving flag goes to false and I see their video with black frames / frozen. When the remote participant brings the mobile browser back to the foreground, I now see the RemoteVideoStream.isReceiving flag to back to true, and I see their video playing normally.
413413
- I'm viewing the video of a remote participant who is on whatever platforms. There are network issues from either side, their video start to have bad quality, probably because of network issues, so I see the RemoteVideoStream.isReceiving flag goes to false.
414414
- I'm viewing the video of a Remote participant who is On macOS/iOS Safari, and from their address bar, they click on "Pause" / "Resume" camera. I see a black/frozen video since they paused their camera and I see the RemoteVideoStream.isReceiving flag goes to false. Once they resume playing the camera, then I see the RemoteVideoStream.isReceiving flag goes to true.
415-
- I'm viewing the video of a remote participant who in on whatever platform. And for whatever reason their network disconnects. This will actually leave the remote participant in the call for a little while and I see their video frozen/black frame, and see RemoteVideoStream.isReceiving flag goes to false. The remote participant can get network back and reconnect and their audio/video should start flowing normally and I see the RemoteVideoStream.isReceiving flag to true.
416-
- I'm viewing the video of a remote participant who is on mobile browser. The remote participant terminates/kills the mobile browser. Since that remote participant was on mobile, this will actually leave the participant in the call for a little while and I will still see them on the call and their video will be frozen, and so I see the RemoteVideoStream.isReceiving flag goes to false. At some point, service will kick participant out of the call and I would just see that the participant disconnected from the call.
415+
- I'm viewing the video of a remote participant who is on any platform and their network disconnects. The remote participant will stay in the call for about two minutes and I see their video frozen/black frame. The RemoteVideoStream.isReceiving flag goes to false. The remote participant can get network back and reconnect and their audio/video should start flowing normally and I see the RemoteVideoStream.isReceiving flag to true.
416+
- I'm viewing the video of a remote participant who is on mobile browser. The remote participant terminates/kills the mobile browser. Since that remote participant was on mobile, this will actually leave the participant in the call for about two minutes. I will still see them on the call and their video will be frozen. The RemoteVideoStream.isReceiving flag goes to false. At some point, service will kick participant out of the call and I would just see that the participant disconnected from the call.
417417
- I'm viewing the video of a remote participant who is on mobile browser and they lock the device. I see the RemoteVideoStream.isReceiving flag goes to false. Once the remote participant unlocks the device and navigates to the Azure Communication Services call, then I'll see the flag go back to true. Same behavior when remote participant is on desktop and the desktop locks/sleeps
418418
- This feature improves the user experience for rendering remote video streams.
419419
- You can display a loading spinner over the remote video stream when isReceiving flag changes to false. You don't have to do a loading spinner, you can do anything you desire, but a loading spinner is the most common usage for better user experience.
@@ -486,7 +486,8 @@ await callObj2.muteIncomingAudio();
486486
await callObj2.mute();
487487
```
488488
Limitations:
489-
- This must be done with two different call agents with different identities, hence the code snippet shows two call agents being used.
489+
- This must be done with two different call agents with different identities, hence the code snippet shows two call agents being used, each with its own Call object.
490+
- In the code example, both CallAgents are joining the same call (same call Ids). You can also join different calls with each agent and send one video on one call and a different video on the other call.
490491
- Sending the same camera in both CallAgent, isn't supported. They must be two different cameras.
491492
- Sending two different cameras with one CallAgent is currently not supported.
492493
- On macOS Safari, background blur video effects (from @azure/communication-effects), can only be applied to one camera, and not both at the same time.

0 commit comments

Comments
 (0)