setStreamAlignmentProperty method

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

Enable or disable the stream 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 you need to align each stream through network time when playing multiple streams or mixed streams, you need to call startPublishingStream to publish the stream and forceSynchronousNetworkTime in ZegoPublisherConfig is 1 to enable 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);
}