enableTrafficControl method
Enables or disables the traffic control for the specified publish channel.
Available since: 1.5.0 Description: Enabling traffic control allows the SDK to adjust the audio and video streaming bitrate according to the current upstream network environment conditions, or according to the counterpart's downstream network environment conditions in a one-to-one interactive scenario, to ensure smooth results. At the same time, you can further specify the attributes of traffic control to adjust the corresponding control strategy. Default value: Enable. When to call: After the engine is created createEngine, Called before startPublishingStream can take effect. Restrictions: Only support RTC publish.
enableWhether to enable traffic control. The default is ture.propertyAdjustable property of traffic control, bitmask format. Should be one or the combinations of ZegoTrafficControlProperty enumeration.AdaptiveFPSas default.channelPublish stream channel.
Implementation
Future<void> enableTrafficControl(bool enable, int property,
{ZegoPublishChannel? channel}) async {
return await ZegoExpressImpl.instance
.enableTrafficControl(enable, property, channel: channel);
}