setPublishWatermark method

Future<void> setPublishWatermark(
  1. {ZegoWatermark? watermark,
  2. bool? isPreviewVisible,
  3. ZegoPublishChannel? channel}
)

Sets up the stream watermark before stream publishing (for the specified channel).

Available since: 1.1.0 Description: Set watermark for publish stream screen. Use cases: It is often used to identify the source of the publish. When to call: After creating the engine through createEngine function. Caution: The layout of the watermark cannot exceed the video encoding resolution of the stream. It can be set at any time before or during the publishing stream. Note: This function is only available in ZegoExpressVideo SDK!

  • watermark The upper left corner of the watermark layout is the origin of the coordinate system, and the area cannot exceed the size set by the encoding resolution. If it is null, the watermark is cancelled. It supports Flutter assets resources, just set the 'imageURL' parameter of the watermark object to the prefix of 'flutter-asset://' and append the relative path of the resource file declared in 'pubspec.yaml'. For example, assuming that 'assets: - images/logo.png' is declared in 'pubspec.yaml', then set 'imageURL' parameter to 'flutter-asset://images/logo.png'.
  • isPreviewVisible the watermark is visible on local preview
  • channel Publish stream channel.

Implementation

Future<void> setPublishWatermark(
    {ZegoWatermark? watermark,
    bool? isPreviewVisible,
    ZegoPublishChannel? channel}) async {
  return await ZegoExpressImpl.instance.setPublishWatermark(
      watermark: watermark,
      isPreviewVisible: isPreviewVisible,
      channel: channel);
}