RtcImage
Image properties.
export class RtcImage {
url?: string;
x?: number;
y?: number;
width?: number;
height?: number;
zOrder?: number;
alpha?: number;
}
Used to set watermark and background image properties for live video.
Properties
- url
- 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, with the top-left corner of the output video as the origin.
- y
- The y-coordinate (px) of the image on the video frame, with the top-left corner of the output video 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
- Layer number of the watermark or background image. When adding one or more watermarks using an array, you must set a value for
zOrder, with a valid range of [1,255], otherwise the SDK will report an error. In other cases,zOrderis 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
- Transparency of the watermark or background image. Range: [0.0, 1.0]:
- 0.0: Fully transparent.
- 1.0: (Default) Fully opaque.