You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To begin using video with Calling, you will need to know how to manage devices. Devices allow you to control what transmits Audio and Video to the call.
11
+
To begin using video with Calling, you need to know how to manage devices. Devices allow you to control what transmits Audio and Video to the call.
12
12
13
13
In `deviceManager`, you can enumerate local devices that can transmit your audio and video streams in a call. You can also use it to request permission to access the local device's microphones and cameras.
In `deviceManager`, you can set a default device that you'll use to start a call. If client defaults aren't set, Communication Services uses operating system defaults.
38
+
In `deviceManager`, you can set a default device that you use to start a call. If client defaults aren't set, Communication Services uses operating system defaults.
39
39
40
40
```js
41
41
// Get the microphone device that is being used.
@@ -72,7 +72,7 @@ Prompt a user to grant camera and/or microphone permissions:
This resolves with an object that indicates whether `audio` and `video` permissions were granted:
75
+
The output returns with an object that indicates whether `audio` and `video` permissions were granted:
76
76
77
77
```js
78
78
console.log(result.audio);
@@ -81,8 +81,8 @@ console.log(result.video);
81
81
#### Notes
82
82
- The 'videoDevicesUpdated' event fires when video devices are plugging-in/unplugged.
83
83
- The 'audioDevicesUpdated' event fires when audio devices are plugged
84
-
- When the DeviceManager is created, at first it does not know about any devices if permissions have not been granted yet, and so initially its device list is empty. If we then call the DeviceManager.askPermission() API, the user is prompted for device access and if the user clicks on 'allow' to grant the access, then the device manager will learn about the devices on the system, update it's device lists and emit the 'audioDevicesUpdated' and 'videoDevicesUpdated' events. Lets say we then refresh the page and create 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 it's device lists filled and it will not emit 'audioDevicesUpdated' nor 'videoDevicesUpdated' events.
85
-
- Speaker enumeration/selection is not supported on Android Chrome, iOS Safari, nor macOS Safari.
84
+
- When the DeviceManager is created, at first it doesn't know about any devices if permissions haven't been granted yetso 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 accessthe 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.
85
+
- Speaker enumeration/selection isn't supported on Android Chrome, iOS Safari, nor macOS Safari.
86
86
87
87
## Place a call with video camera
88
88
@@ -139,12 +139,12 @@ const camera = cameras[1];
139
139
localVideoStream.switchSource(camera);
140
140
```
141
141
142
-
If the specified video device is being used by another process, or if it is disabled in the system:
143
-
- While in a call, if your video is off and you start video using `call.startVideo()`, this method will throw with a `SourceUnavailableError` and `cameraStartFiled` will be set to true.
144
-
- A call to the `localVideoStream.switchSource()` method will cause`cameraStartFailed` to be set to true.
142
+
If the specified video device is being used by another process, or if it's disabled in the system:
143
+
- 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.
144
+
- A call to the `localVideoStream.switchSource()` method causes`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:
147
+
To verify if the local video is on or off you can use isLocalVideoStarted API, which returns true or false:
To render `RemoteVideoStream`, you have to subscribe to it's`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.
205
+
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.
206
206
207
-
Whenever availability of a remote stream changes, you can choose to destroy the whole `VideoStreamRenderer`, a specific `VideoStreamRendererView`
208
-
or keep them, but this will result in displaying blank video frame.
207
+
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.
209
208
210
209
```js
211
210
// Reference to the html's div where we would display a grid of all remote video stream from all participants.
@@ -310,6 +309,29 @@ CSS for styling the loading spinner over the remote video stream.
310
309
}
311
310
```
312
311
312
+
### Remote video quality
313
+
314
+
Starting from 1.12(beta) version, the ACS WebJS SDK provides a new feature called OptimalVideoCount (OVC). This feature can be used to inform applications at run-time how many 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. Application 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.
Example usage: Application should subscribe to changes of OVC and handle it in group calls by either creating new renderer (`createView` method) or dispose views (`dispose`)
332
+
and update layout accordingly either by removing participants from the main call screen area (often called stage or roster ) or replacing their video elements with an avatar and a name of the user.
333
+
334
+
313
335
### Remote video stream properties
314
336
315
337
Remote video streams have the following properties:
@@ -326,7 +348,7 @@ const id: number = remoteVideoStream.id;
> This API is provided as a preview for developers and may change based on feedback that we receive. To use this api please use 1.5.4-beta.1+ release of Azure Communication Services Calling Web SDK
339
361
- Will inform the application if remote video stream data is being received or not. Such scenarios are:
340
-
- I am 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 his 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 his video playing normally.
341
-
- I am viewing the video of a remote participant who is on whatever platforms. There are network issues from either side, his video start to look pretty laggy, bad quality, probbaly because of network issues, so I see the RemoteVideoStream.isReceiving flag goes to false.
342
-
- I am 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'll see a black/frozen video since they paused their camera and I'll see the RemoteVideoStream.isReceiving flag goes to false. Once they resume playing the camera, then I'll see the RemoteVideoStream.isReceiving flag goes to true.
343
-
- I am 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'll see his video frozen/black frame, and ill see RemoteVideoStream.isReceiving flag goes to false. The remote participant can get network back and reconnect and his audio/video should start flowing normally and I'll see the RemoteVideoStream.isReceiving flag to true.
344
-
- I am 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 him in the call and his video will be frozen, and so I'll 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.
345
-
- I am viewing the video of a remote participant who is on mobile browser and they locks device. I'll see the RemoteVideoStream.isReceiving flag goes to false and. Once the remote participant unlocks the device and navigates to the acs call, then ill see the flag go back to true. Same behavior when remote participant is on desktop and the desktop locks/sleeps
362
+
- I am 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.
363
+
- I am 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.
364
+
- I am 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.
365
+
- I am 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.
366
+
- I am 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.
367
+
- I am 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 acs call, then ill see the flag go back to true. Same behavior when remote participant is on desktop and the desktop locks/sleeps
346
368
- This feature improves the user experience for rendering remote video streams.
347
369
- 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.
0 commit comments