setMinVideoResolutionForTrafficControl method

Future<void> setMinVideoResolutionForTrafficControl(
  1. int width,
  2. int height,
  3. {ZegoPublishChannel? channel}
)

Sets the minimum video resolution threshold for traffic control.

Available since: 2.17.0 Description: When enabling traffic control enableTrafficControl, and its parameter property includes the attribute AdaptiveResolution, the minimum resolution of the video will not be lower than the value set by the setMinVideoResolutionForTrafficControl interface. A value of 0 indicates no limit. Default value: There is no control effect of the lowest threshold of video resolution. When to call: The call takes effect after the engine createEngine is created. Restrictions: The traffic control must be turned on enableTrafficControl. And its parameter property must contain AdaptiveResolution, Please refer to ZegoTrafficControlProperty for details. Related APIs: enableTrafficControl. Caution: If you need to cancel the limit of the setting value, you can set width and height to 0. Note: This function is only available in ZegoExpressVideo SDK!

  • width The flow controls the width of the lowest video resolution.
  • height The flow controls the height of the lowest video resolution.
  • channel Publish stream channel.

Implementation

Future<void> setMinVideoResolutionForTrafficControl(int width, int height,
    {ZegoPublishChannel? channel}) async {
  return await ZegoExpressImpl.instance
      .setMinVideoResolutionForTrafficControl(width, height,
          channel: channel);
}