Agora Java API Reference for Android
Classes | Public Member Functions | Public Attributes | List of all members
io.agora.rtc2.video.WatermarkOptions Class Reference

Represents the configuration options for setting a watermark on the video stream. More...

Classes

class  Rectangle
 Defines the position and size of the watermark image. More...
 

Public Member Functions

int[] getPositionInLandscapeMode ()
 Gets the position of the watermark in landscape mode. More...
 
int[] getPositionInPortraitMode ()
 Gets the position of the watermark in portrait mode. More...
 
boolean isVisibleInPreview ()
 Checks whether the watermark is visible in the local video preview. More...
 
int getzOrder ()
 Gets the z-order of the watermark image. More...
 

Public Attributes

boolean visibleInPreview = true
 
Rectangle positionInLandscapeMode = new Rectangle()
 
Rectangle positionInPortraitMode = new Rectangle()
 
int zOrder = 0
 The z-order of the watermark image. More...
 

Detailed Description

Represents the configuration options for setting a watermark on the video stream.

Since
4.6.0

You can use this class to configure the watermark image, including its position, size, and visibility.

Member Function Documentation

◆ getPositionInLandscapeMode()

int [] io.agora.rtc2.video.WatermarkOptions.getPositionInLandscapeMode ( )

Gets the position of the watermark in landscape mode.

Since
4.6.0
Returns
An integer array of four elements representing the x, y, width, and height of the watermark rectangle.

◆ getPositionInPortraitMode()

int [] io.agora.rtc2.video.WatermarkOptions.getPositionInPortraitMode ( )

Gets the position of the watermark in portrait mode.

Since
4.6.0
Returns
An integer array of four elements representing the x, y, width, and height of the watermark rectangle.

◆ isVisibleInPreview()

boolean io.agora.rtc2.video.WatermarkOptions.isVisibleInPreview ( )

Checks whether the watermark is visible in the local video preview.

Since
4.6.0
Returns
true: The watermark is visible in preview; false: The watermark is not visible in preview.

◆ getzOrder()

int io.agora.rtc2.video.WatermarkOptions.getzOrder ( )

Gets the z-order of the watermark image.

Since
4.6.0
Returns
The z-order index of the watermark image.

Member Data Documentation

◆ visibleInPreview

boolean io.agora.rtc2.video.WatermarkOptions.visibleInPreview = true

Sets whether or not the watermark image is visible in the local video preview:

  • true: (Default) The watermark image is visible in preview.
  • false: The watermark image is not visible in preview.

◆ positionInLandscapeMode

Rectangle io.agora.rtc2.video.WatermarkOptions.positionInLandscapeMode = new Rectangle()

The watermark position in the landscape mode. See Rectangle. See details for the landscape mode in the advanced guide Rotate the Video.

◆ positionInPortraitMode

Rectangle io.agora.rtc2.video.WatermarkOptions.positionInPortraitMode = new Rectangle()

The watermark position in the portrait mode. See Rectangle. See details for the portrait mode in the advanced guide Rotate the Video.

◆ zOrder

int io.agora.rtc2.video.WatermarkOptions.zOrder = 0

The z-order of the watermark image.

The z-order specifies the stacking order of the watermark image relative to other overlays on the video.

Since
4.6.0