setQuality method
- VideoQuality quality
Chooses the quality at which you receive this participant's video.
- It changes which simulcast layer is delivered to you, not what the participant sends, so it can save your bandwidth on a small tile. Has no effect on the local participant.
Parameters
-
quality: The desired video quality level.With
MaxResolution.HD(the default) VideoQuality.LOW, VideoQuality.MEDIUM and VideoQuality.HIGH get the bottom, middle and top simulcast layers; withMaxResolution.SD,HIGHgets the middle layer andMEDIUMandLOWthe bottom one.
Returns
- A
Future<void>that completes once the native SDK accepts the request, or throws a VideoSDKError carrying itscodeandname.
Example
// Set participant video quality to high
await participant.setQuality(VideoQuality.HIGH);
Implementation
Future<void> setQuality(VideoQuality quality) async {
_preferredQuality = quality;
if (isLocal) return;
await _setConsumerQuality(id, quality.wire);
}