setTrafficControlFocusOn method

Future<void> setTrafficControlFocusOn(
  1. ZegoTrafficControlFocusOnMode mode,
  2. {ZegoPublishChannel? channel}
)

Set the factors of concern that trigger traffic control for the specified publish channel.

Available since: 2.4.0 Description: Use this interface to control whether to start traffic control due to poor remote network conditions. Default value: Default is disable. When to call: After the engine is created createEngine, Called before startPublishingStream can take effect. Restrictions: The traffic control must be turned on enableTrafficControl. Related APIs: [enableTrafficControl.

  • mode When LOCAL_ONLY is selected, only the local network status is concerned. When choosing REMOTE, also take into account the remote network.
  • channel Publish stream channel.

Implementation

Future<void> setTrafficControlFocusOn(ZegoTrafficControlFocusOnMode mode,
    {ZegoPublishChannel? channel}) async {
  return await ZegoExpressImpl.instance
      .setTrafficControlFocusOn(mode, channel: channel);
}