setStreamAlignmentProperty method

Future<void> setStreamAlignmentProperty(
  1. int alignment,
  2. ZegoPublishChannel channel
)

Enable or disable the stream mixing precision alignment function.

Available since: 2.11.0. Description: Use this interface to enable stream alignment, the SDK will attach network time information to the stream when publishing it for accurate stream alignment. Use case: Generally used in scenarios such as KTV where stream mixing alignment is required. When to call: After the engine is created createEngine. Caution: If mixed flow need time for alignment, the flow through the network push flow need to call startPublishingStream and ZegoPublisherConfig.forceSynchronousNetworkTime = 1, for open network time synchronization. Related APIs: startMixerTask, startAutoMixerTask

  • alignment Whether to enable the stream mixing precision alignment function.
  • channel Publish stream channel

Implementation

Future<void> setStreamAlignmentProperty(
    int alignment, ZegoPublishChannel channel) async {
  return await ZegoExpressImpl.instance
      .setStreamAlignmentProperty(alignment, channel);
}