Skip to content

Commit 0a3a41a

Browse files
Merge pull request #294390 from sloanster/patch-31
Update video-constraints-javascript.md
2 parents 7462140 + fd48597 commit 0a3a41a

File tree

1 file changed

+20
-4
lines changed

1 file changed

+20
-4
lines changed

articles/communication-services/quickstarts/voice-video-calling/includes/video-constraints/video-constraints-javascript.md

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ titleSuffix: An Azure Communication Services document
55
description: In this quickstart, you learn how to set video constraints in your existing web calling app using Azure Communication Services.
66
author: sloanster
77
services: azure-communication-services
8-
ms.date: 03/29/2024
8+
ms.date: 02/10/2025
99
ms.topic: include
1010
ms.service: azure-communication-services
1111
ms.subservice: calling
@@ -94,7 +94,7 @@ When setting video constraints, the SDK chooses the nearest value that falls wit
9494

9595
> [!NOTE]
9696
> For all `bitrate`, `frameHeight` and `frameRate`, the constraint value is a `max` constraint, which means the actual value in the call can be the specified value or smaller.
97-
> There is no guarantee that the sent video resolution will remain at the specified resolution.
97+
> There's no guarantee that the sent video resolution remains at the specified resolution.
9898
9999
The `frameHeight` in `VideoSendConstraints` has a different meaning when a mobile device is in portrait mode. In portrait mode, this value indicates the shorter side of the device. For example, specifying `frameHeight.max` value with 240 on a 1080(W) x 1920(H) device in portrait mode, the constraint height is on the 1080(W) side. When the same device is in landscape mode (1920(W) x 1080(H)), the constraint is on the 1080(H) side.
100100

@@ -143,13 +143,29 @@ await currentCall.setConstraints({
143143
});
144144
```
145145
> [!NOTE]
146-
> Setting constraint value as `0` will unset any previously set constraints. You can use this way to reset or remove constraints.
146+
> Setting constraint value as `0` unsets any previously set constraints. You can use this way to reset or remove constraints.
147147
148148
<br/>
149149

150150
## Receive video constraints
151-
To control resolution on the receiver side using Azure Communication Services Web Calling SDK, you can adjust size of the renderer of that video. The calling SDK automatically adjusts received resolution based on the dimensions of the renderer. The SDK won't request an incoming video stream (width and height) that can fit into the renderer video window.
151+
Managing video quality for incoming streams involves understanding the Azure Communication Services resolution ladder, which is a predefined list of video resolutions with estimated upper and lower bitrate boundaries. When a client requests a specific resolution, the WebJS and backend server consults the resolution ladder to allocate the appropriate video bitrate, considering both network conditions and device capabilities.
152152

153+
Defining the video render size is a crucial step for developers aiming to control the bitrate and frame rate of an incoming video stream. The initial quality and resolution of a video stream are determined by the size of the renderer created and placed on a web page. For instance, if the renderer is small, the WebJS SDK requests a smaller resolution. Conversely, if the renderer is large, the ACS SDK aims for the best possible resolution from the server. This process ensures that the video quality is optimized based on the client's requirements and capabilities. When a client requests a specific resolution, the server consults the resolution ladder to allocate the appropriate video bitrate, considering both network conditions and device capabilities.
154+
155+
The resolution ladder table provides what the WebJS calling SDK resolution ladder consists of with the estimated incoming video bitrates for various resolutions. These details help developers understand the relationship between resolution, bit rate, and frame rate and the approximate amount of bandwidth a specific incoming video stream uses. For example, a resolution of 1280x720 streams at 30 FPS with the client using an approximate minimum bitrate of 1 MBPS and an approximate maximum bitrate of 2.5 MBPS.
156+
157+
The Azure Communication Services WebJS Calling SDK adjusts video size based on available bandwidth to ensure a consistent communication experience. WebJS Calling SDK adjusts the video size based on algorithms that monitor network conditions. When network bandwidth is sufficient, the SDK increases video resolution to its maximum level based on the render size defined on the web page. Conversely, when bandwidth is limited, it reduces video resolution to prevent buffering and maintain a stable connection.
158+
159+
The following table provides the resolution ladder and estimated bitrates for each resolution and associated FPS that will be delivered at that resolution.
160+
161+
| Height | Width | FPS | Min Bitrate (MBps) | Max Bitrate (MBps) |
162+
|--------|-------|-----|------------------|------------------|
163+
| 1080 | 1920 | 30 | 1.75 | 10 |
164+
| 720 | 1280 | 30 | 1 | 2.5 |
165+
| 540 | 960 | 30 | 0.5 | 1.125 |
166+
| 360 | 640 | 30 | 0.4 | 0.57 |
167+
| 240 | 426 | 15 | 0.125 | 0.5 |
168+
| 240 | 320 | 15 | 0.2 | 0.175 |
153169

154170

155171
## Using Media statics to understand video constraints impact

0 commit comments

Comments
 (0)