Auto Video Quality on `stream.attachVideo`

Description
stream.attachVideo currently takes a required videoQuality parameter that can be one of 90P/180P/360P/720P/1080P resolution values. In addition to these options, can we please have an Auto option where Zoom decides the best resolution to render the video based on network/device capabilities? This shall be similar to ZoomVideoSDKVideoPreferenceMode_Balance mode of the Android/iOS VideoSDK.

For our custom web-app, where calls are between 2 participants, we are showing a video quality control to render the remote participant video. We provide options for Auto, FHD-1080, HD-720, SD-360. While, the other three resolutions are straight forward with Web VideoSDK, for Auto we are implementing a custom solution where we are checking network quality with stream.getNetworkQuality() every minute and adjusting the video resolution if network quality drops.

Problem starts when stream.getNetworkQuality() frequently returns downlink: -1 poor quality rating on even good networks, so our Auto mode decreases video quality to the lowest resolution; whereas if we select FHD-1080, then zoom is able to consistently render high quality FHD videos even if it still recognises our network quality as -1

So, the request is,

  • can we please have an Auto option on the VideoQuality enum? where on passing this value to stream.attachVideo, Zoom shall adjust the rendered video resolution automatically based on network/device capabilities.
  • can we improve the stream.getNetworkQuality() implementation or make its logic more transparent? as we are consistently seeing good quality networks frequently rated as -1

Which Web Video SDK version?
2.1.10

Video SDK Code Snippets

const getAutoResolution = ({ downlink }: NetworkQuality) => {
  // downlink: 4, 5
  let resolution = VideoQuality.Video_1080P;

  switch (true) {
    case downlink === 3:
      resolution = VideoQuality.Video_720P;
      break;
    case downlink === 2 || downlink === 1:
      resolution = VideoQuality.Video_360P;
      break;
    case downlink < 1:
      resolution = VideoQuality.Video_180P;
      break;
    default:
      break;
  }

  return resolution;
};

...

setInterval(() => {
  getAutoResolution(stream.getNetworkQuality());
}, 60000); // 1 minute

Device (please complete the following information):

  • OS: macOS and Windows
  • Browser: All

Hi @James_Ashok,

The VideoQuality enum you pass to stream.attachVideo is the desired/target quality for your app. Zoom will intelligently downgrade the quality in case the network deteriorates to keep the video consistent. For your use-case you can set the enum to the highest target value and leave the switching logic to us.

thanks @ekaansh.zoom!

  1. so, does that mean for my use-case, the Auto and FHD-1080 options are one and the same?
  2. when I pass the VideoQuality enum, I am actually setting the max quality and not the exact quality.. is that right?

@James_Ashok

Thanks for the update and the request regarding auto video quality selection.

To ensure high-quality video rendering, you should enable HD support and explicitly request Full HD in your video capture options before starting the video:

const isHD = stream.isSupportHD(); // Check if HD is supported
const videoCaptureOptions = {
  fullHd: true,     // Request Full HD
  hd: isHD          // Enable HD based on support
};

await stream.startVideo(videoCaptureOptions);

Also, when attaching remote video, explicitly set the desired quality:

stream.attachVideo(participantId, VideoQuality.Video_1080P);

This helps maintain consistent Full HD video rendering.

Fully support the suggestion to introduce an Auto option in the VideoQuality enum for stream.attachVideo(), allowing the SDK to automatically adjust resolution based on network and device capabilities—similar to the Balance mode in the Android/iOS SDK.