setQuality method

Future<void> setQuality(
  1. 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; with MaxResolution.SD, HIGH gets the middle layer and MEDIUM and LOW the bottom one.

Returns

  • A Future<void> that completes once the native SDK accepts the request, or throws a VideoSDKError carrying its code and name.

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);
}