Skip to content

Commit 8484858

Browse files
authored
Added receive video constraints
1 parent 0b8b9e6 commit 8484858

File tree

2 files changed

+19
-27
lines changed

2 files changed

+19
-27
lines changed

articles/communication-services/concepts/voice-video-calling/video-constraints.md

Lines changed: 5 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -15,34 +15,18 @@ ms.subservice: calling
1515

1616
# Video constraints
1717

18-
[!INCLUDE [Public Preview Disclaimer](../../includes/public-preview-include.md)]
19-
20-
The Video Constraints API is a powerful tool that enables developers to control the video quality from within their video calls. With this API, developers can set maximum video resolutions, frame rate, and bitrate used so that the call is optimized for the user's device and network conditions. The Azure Communication Services video engine is optimized to allow the video quality to change dynamically based on devices ability and network quality. But there might be certain scenarios where you would want to have tighter control of the video quality that end users experience. For instance, there may be situations where the highest video quality is not a priority, or you may want to limit the video bandwidth usage in the application. To support those use cases, you can use the Video Constraints API to have tighter control over video quality.
18+
The Video constraints API is a powerful tool that enables developers to control the video quality from within their video calls. With this API, developers can set maximum video resolutions, frame rate, and bitrate used so that the call is optimized for the user's device and network conditions. The ACS video engine is optimized to allow the video quality to change dynamically based on devices ability and network quality. But there might be certain scenarios where you would want to have tighter control of the video quality that end users experience. For instance, there may be situations where the highest video quality is not a priority, or you may want to limit the video bandwidth usage in the application. To support those use cases, you can use the Video Constraints API to have tighter control over video quality.
2119

2220
Another benefit of the Video Constraints API is that it enables developers to optimize the video call for different devices. For example, if a user is using an older device with limited processing power, developers can set constraints on the video resolution to ensure that the video call runs smoothly on that device
2321

24-
## Send constraints
25-
Azure Communication Services Web Calling SDK supports setting the maximum video resolution, framerate, or bitrate that a client sends. The sender video constraints are supported on Desktop browsers (Chrome, Edge, Firefox) and when using iOS Safari mobile browser or Android Chrome mobile browser.
26-
27-
Azure Communication Services Native Calling SDK (Android, iOS, Windows) supports setting the maximum values of video resolution and framerate for outgoing video streams.
28-
29-
## Receive constraints
30-
Azure Communication Services Web Calling SDK does not have a dedicated API to control setting the maximum video resolution that client can receive for a given video.
31-
Instead to control resolution on the receiver side, application can adjust size of the renderer of that video, as SDK will automatically try to adjust received resolution based on the dimensions of the renderer, in practice - SDK will not request more stream (width/height) than it can fit into the renderer.
32-
33-
Azure Communication Services Native Calling SDK (Android, iOS, Windows) supports setting the maximum resolution for incoming video streams.
34-
35-
3622
## Supported constraints
3723

38-
These constraints can be set at the start of the call and during the call.
39-
4024
| Platform | Supported Constraints |
4125
| ----------- | ----------- |
42-
| Web | Outgoing video: resolution, framerate, bitrate |
43-
| Android | Incoming video: resolution<br />Outgoing video: resolution, framerate |
44-
| iOS | Incoming video: resolution<br />Outgoing video: resolution, framerate |
45-
| Windows | Incoming video: resolution<br />Outgoing video: resolution, framerate |
26+
| **Web** | **Incoming video**: resolution<br />**Outgoing video**: resolution, framerate, bitrate |
27+
| **Android** | **Incoming video**: resolution<br />**Outgoing video**: resolution, framerate |
28+
| **iOS** | **Incoming video**: resolution<br />**Outgoing video**: resolution, framerate |
29+
| **Windows** | **Incoming video**: resolution<br />**Outgoing** video: resolution, framerate |
4630

4731
## Next steps
4832
For more information, see the following articles:

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

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,13 @@ ms.subservice: calling
1313

1414
You can set video constraints in your calls to control the video quality based on resolution or frameRate or bitrate in your video calls. In this quickstart guide, we'll illustrate how to set video constraints at the start of a call and how to use our `setConstraints` method on the call object to set video constraints dynamically during the call.
1515

16-
> [!NOTE]
17-
> Currently, we only support setting video send constraints. You cannot set video constraints on incoming videos at this point of time.
1816

19-
## Setting video constraints at the start of a call
17+
[!INCLUDE [Public Preview](../../../../includes/public-preview-include-document.md)]
18+
19+
## Send video constraints
20+
Azure Communication Services Web Calling SDK supports setting the maximum video resolution, framerate, or bitrate that a client sends. The sender video constraints are supported on Desktop browsers (Chrome, Edge, Firefox) and when using iOS Safari mobile browser or Android Chrome mobile browser.
21+
22+
### Setting video constraints at the start of a call - outgoing (send) video
2023
The video constraints setting is implemented on the `Call` interface. To use the Video Constraints, you can specify the constraints from within `CallOptions` when you make a call, accept a call, or join a call. You will also have to specify `localVideoStreams` in `videoOptions`. <br/>
2124
Do note that constraints don't work if you join a call with audio only option and turn on the camera later. In this case, you can set video constraints dynamically using the `setConstraints` method on the `Call` interface (guide below).
2225

@@ -94,7 +97,7 @@ The `frameHeight` in `VideoSendConstraints` has a different meaning when a mobil
9497

9598
If you use MediaStats API to track the sent video resolution, you may find out that the sent resolution can change during the call. It can go up and down, but should be equal or smaller than the constraint value you provide. This resolution change is an expected behavior. The browser also has some degradation rule to adjust sent resolution based on cpu or network conditions.
9699

97-
## Setting video constraints during the call
100+
### Setting video constraints during the call - outgoing (send) video
98101
You can set video constraints during the call by using the `setConstraints` method on the `Call` object.
99102
```javascript
100103
// For eg, when you've started a call,
@@ -141,7 +144,12 @@ await currentCall.setConstraints({
141144
142145
<br/>
143146

144-
### Media stats
147+
## Receive video constraints
148+
To control resolution on the receiver side usingAzure Communication Services Web Calling SDK you can adjust size of the renderer of that video. The calling SDK will automatically adjust received resolution based on the dimensions of the renderer. The SDK will not request more stream (width annd height) than it can fit into the renderer video window.
149+
150+
151+
152+
## Using Media statics to understand video constraints impact
145153
To evaluate and compare the video quality after applying the video constraints, you can access [MediaStats API](../../../../concepts/voice-video-calling/media-quality-sdk.md) to get video resolution and bitrate information of the sending stream. The media stats also include other granular stats related to the streams, such as jitter, packet loss, round trip time, etc.
146154

147155
```javascript
@@ -152,4 +160,4 @@ mediaStatsCollector.on('sampleReported', (sample: SDK.MediaStatsReportSample) =>
152160
// process the stats for the call.
153161
console.log(sample);
154162
});
155-
```
163+
```

0 commit comments

Comments
 (0)