# Auto Video Quality on \`stream.attachVideo\`

**URL:** <https://devforum.zoom.us/t/auto-video-quality-on-stream-attachvideo/134098>\
**Category:** Web\
**Created:** [June 17, 2025, 11:12am UTC](https://devforum.zoom.us/t/auto-video-quality-on-stream-attachvideo/134098 "2025-06-17T11:12:02Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![James\_Ashok](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/james_ashok/32/69492_2.png) [@James\_Ashok](https://devforum.zoom.us/u/James_Ashok)\
**Post date:** [June 17, 2025, 11:12am UTC](https://devforum.zoom.us/t/auto-video-quality-on-stream-attachvideo/134098/1 "2025-06-17T11:12:02Z")

</div>

**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**

```auto
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

```

 ![stream.attachVideo](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/2/0/20459f83a9216972e262239fcaf9552c0f9b29a9.png)

**Device (please complete the following information):**

- OS: macOS and Windows
- Browser: All

---

<div class="post-metadata">

**Author:** ![ekaansh.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/ekaansh.zoom/32/55004_2.png) [@ekaansh.zoom](https://devforum.zoom.us/u/ekaansh.zoom)\
**Post date:** [June 17, 2025, 11:53am UTC](https://devforum.zoom.us/t/auto-video-quality-on-stream-attachvideo/134098/2 "2025-06-17T11:53:47Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![James\_Ashok](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/james_ashok/32/69492_2.png) [@James\_Ashok](https://devforum.zoom.us/u/James_Ashok)\
**Post date:** [June 17, 2025, 12:03pm UTC](https://devforum.zoom.us/t/auto-video-quality-on-stream-attachvideo/134098/3 "2025-06-17T12:03:56Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![freelancer.nak](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/freelancer.nak/32/40968_2.png) [@freelancer.nak](https://devforum.zoom.us/u/freelancer.nak)\
**Post date:** [June 17, 2025, 12:12pm UTC](https://devforum.zoom.us/t/auto-video-quality-on-stream-attachvideo/134098/4 "2025-06-17T12:12:16Z")

</div>

@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:

```auto
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:

```auto
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.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/6/1/614bdd549b610bbaa46ff934617683a02bdaa03c.png) [@system](https://devforum.zoom.us/u/system)\
**Post date:** [June 17, 2026, 12:12pm UTC](https://devforum.zoom.us/t/auto-video-quality-on-stream-attachvideo/134098/5 "2026-06-17T12:12:27Z")

</div>

Closed on June 17, 2026, 12:12pm UTC

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
