Agora Java API Reference for Android

Public Member Functions | Public Attributes | Static Public Attributes | List of all members
io.agora.rtc2.video.WatermarkConfig Class Reference

Used to configure watermark-related information. More...

## Public Member Functions
String | getId ()
| Retrieves the unique ID of the watermark. More...
int | getType ()
| Gets the type of the watermark. More...
WatermarkBuffer | getBuffer ()
| Gets the watermark buffer. More...
String | getImageUrl ()
| Gets the URL of the watermark image. More...
WatermarkOptions | getOptions ()
| Retrieves watermark display options. More...

## Public Attributes
String | id
int | type
WatermarkBuffer | buffer = new WatermarkBuffer()
String | imageUrl
WatermarkOptions | options = new WatermarkOptions()

## Static Public Attributes
static final int | WATERMARK_TYPE_IMAGE = 0
static final int | WATERMARK_TYPE_BUFFER = 1

## Detailed Description

Used to configure watermark-related information.

Since
  4.6.0

## Member Function Documentation

## ◆ getId()

String io.agora.rtc2.video.WatermarkConfig.getId | ( |  | ) |

Retrieves the unique ID of the watermark.

Since
  4.6.0

Used to obtain the unique identifier of the watermark from a `WatermarkBuffer` or `WatermarkConfig` instance.

Returns
  When the method call succeeds, it returns the unique ID of the watermark. When it fails, it returns an empty string.

## ◆ getType()

int io.agora.rtc2.video.WatermarkConfig.getType | ( |  | ) |

Gets the type of the watermark.

Since
  4.6.0

Used to get the type information in the current watermark configuration.

Returns
  If the method call succeeds, returns the watermark type.
  - `WATERMARK_TYPE_IMAGE`: Image watermark.
  - `WATERMARK_TYPE_BUFFER`: Buffer watermark.

## ◆ getBuffer()

WatermarkBuffer io.agora.rtc2.video.WatermarkConfig.getBuffer | ( |  | ) |

Gets the watermark buffer.

Since
  4.6.0

Returns
  The buffer containing the watermark image data.

## ◆ getImageUrl()

String io.agora.rtc2.video.WatermarkConfig.getImageUrl | ( |  | ) |

Gets the URL of the watermark image.

Since
  4.6.0

Returns
  When the method call succeeds, it returns the URL of the watermark image. When it fails, it returns an empty string.

## ◆ getOptions()

WatermarkOptions io.agora.rtc2.video.WatermarkConfig.getOptions | ( |  | ) |

Retrieves watermark display options.

Since
  4.6.0

Used to retrieve the currently configured watermark display options.

Returns
  The `WatermarkOptions` object, if the method call succeeds.

## Member Data Documentation

## ◆ WATERMARK_TYPE_IMAGE

final int io.agora.rtc2.video.WatermarkConfig.WATERMARK_TYPE_IMAGE = 0
| static

Specifies the watermark type as image.

## ◆ WATERMARK_TYPE_BUFFER

final int io.agora.rtc2.video.WatermarkConfig.WATERMARK_TYPE_BUFFER = 1
| static

Specifies the watermark type as buffer.

## ◆ id

String io.agora.rtc2.video.WatermarkConfig.id

Unique identifier for the watermark, usually generated using UUID.

## ◆ type

int io.agora.rtc2.video.WatermarkConfig.type

Type of the watermark:

- `WATERMARK_TYPE_IMAGE`: image type.
- `WATERMARK_TYPE_BUFFER`: Buffer type.

## ◆ buffer

WatermarkBuffer io.agora.rtc2.video.WatermarkConfig.buffer = new WatermarkBuffer()

Buffer containing watermark image data. See `WatermarkBuffer`.

## ◆ imageUrl

String io.agora.rtc2.video.WatermarkConfig.imageUrl

URL address used to load the watermark image.

## ◆ options

WatermarkOptions io.agora.rtc2.video.WatermarkConfig.options = new WatermarkOptions()

Options defining the position and size of the watermark. See `WatermarkOptions`.