RtcImage

Image properties.

export class RtcImage {
  
  url?: string;
  
  x?: number;
  
  y?: number;
  
  width?: number;
  
  height?: number;
  
  zOrder?: number;
  
  alpha?: number;
}

Used to set the watermark and background image properties for live video.

Properties

url
The HTTP/HTTPS URL of the image on the live video. The character length must not exceed 1024 bytes.
x
The x-coordinate (px) of the image on the video frame, using the top-left corner of the output video frame as the origin.
y
The y-coordinate (px) of the image on the video frame, using the top-left corner of the output video frame as the origin.
width
The width (px) of the image on the video frame.
height
The height (px) of the image on the video frame.
zOrder
The z-order of the watermark or background image. When adding one or more watermarks using an array, you must assign a value to zOrder, with a valid range of [1,255], otherwise the SDK will report an error. In other cases, zOrder is optional, with a valid range of [0,255], where 0 is the default. 0 indicates the bottom layer, and 255 indicates the top layer.
alpha
The transparency of the watermark or background image. Valid range is [0.0, 1.0]:
  • 0.0: Fully transparent.
  • 1.0: (Default) Fully opaque.