Watermark configuration takes effect on both the original stream and the transcoded stream.
Creates watermark templates for the specified entry point.
PATCH https://api.agora.io/v1/projects/{appid}/fls/entry_points/{entry_point}/settings/watermark
Parameter | Type | Description |
---|---|---|
appid |
String | Required. The App ID retrieved from Agora Console. |
entry_point |
String | Required. The entry point name. |
The request body is in the JSON Object type, and contains the following fields:
Field | Type | Description |
---|---|---|
watermarkSet |
JSON Array of WaterMark | Required. Watermark configuration sets. You can add a maximum of five configuration sets. |
If the returned HTTP status code is 200, the request is successful.
If the returned HTTP status code is not 200, the request fails. You can refer to the HTTP status codes for possible reasons.
Request line
PATCH https://api.agora.io/v1/projects/{your_appid}/fls/entry_points/live/settings/watermark HTTP/1.1
Request body
{
"waterMarkSet": [
{
"url": "http://pngimg.com/uploads/egg/egg_PNG40777.png",
"x": 0,
"y": 0,
"width": 200,
"height": 200,
"zOrder": 2
},
{
"url": "http://pngimg.com/uploads/egg/egg_PNG40777.png",
"x": 0,
"y": 0,
"width": 300,
"height": 300,
"zOrder": 3
}
]
}
Response line
HTTP/1.1 200 OK
Lists the watermark templates available for the specified entry point.
GET https://api.agora.io/v1/projects/{appid}/fls/entry_points/{entry_point}/settings/watermark
Parameter | Type | Description |
---|---|---|
appid |
String | Required. The App ID retrieved from Agora Console. |
entry_point |
String | Required. The entry point name. |
If the returned HTTP status code is 200, the request is successful. The response body contains the following fields:
Field | Type | Description |
---|---|---|
watermarkSet |
JSON Array of WaterMark | The list of watermark templates. |
If the returned HTTP status code is not 200, the request fails. You can refer to the HTTP status codes for possible reasons.
Request line
GET https://api.agora.io/v1/projects/{your_appid}/fls/entry_points/live/settings/watermark HTTP/1.1
Request body
{
"waterMarkSet": [
{
"url": "http://pngimg.com/uploads/egg/egg_PNG40777.png",
"x": 0,
"y": 0,
"width": 200,
"height": 200,
"zOrder": 2
},
{
"url": "http://pngimg.com/uploads/egg/egg_PNG40777.png",
"x": 0,
"y": 0,
"width": 300,
"height": 300,
"zOrder": 3
}
]
}
Response line
HTTP/1.1 200 OK
Watermark configuration parameters, including the following fields:
Field | Type | Description |
---|---|---|
url |
String | Required. The URL of the watermark image. Only PNG files are supported. To easily set different watermarks for different entry points or live streams, you can use the following parameters in the URL:{entry_point} : This parameter is replaced with the specified entry point.{stream_name} : This parameter is replaced with the specified stream name. |
x |
Integer | Required. The x-coordinate of the watermark. The value range is [0,1920]. |
y |
Integer | Required. The y-coordinate of the watermark. The value range is [0,1920]. |
width |
Integer | Required. The width (pixels) of the watermark image. The value range is [0,1920]. |
height |
Integer | Required. The height (pixels) of the watermark image. The value range is [0,1920]. |
Status code | Description |
---|---|
200 | The request succeeds. |
400 | The parameter is invalid, for example the appid or the entry_point is empty. |
401 | Unauthorized (the Customer ID and Customer Secret do not match). |
404 | The server cannot find the resource according to the request, which means the requested entry point does not exist or the requested URI path is invalid. |
500 | An internal error occurs in the server, so the server is not able to complete the request. |
504 | An internal error occurs in the server. The gateway or the proxy server did not receive a timely request from the remote server. |