获取水印模版列表-GetWaterMarkPattenList

获取水印模版列表

Request Parameters

Parameter nameTypeDescriptionRequired
ProjectIdstring项目编号,未填写则为默认项目No

Response Elements

Parameter nameTypeDescriptionRequired
RetCodeint操作返回码Yes
Actionstring操作名称Yes
DefaultPattenListarray水印模版列表,详细结构见下表No
CustomizedPattenListarray水印模版列表,详细结构见下表No

WaterMarkPattenListNode

Parameter nameTypeDescriptionRequired
PattenIdstring模版的IDYes
PattenNamestring模版名称,长度不超过256个字节Yes
WaterMarkTypestringimage表示图片水印,text表示文字水印Yes
ImageUrlstring图片水印的url地址,只有图片水印有该字段。Yes
TextContentstring文字水印的内容,只有文字水印有该字段。Yes
FontTypestring字体类型,只有文字水印有该字段。Yes
FontColorstring字体颜色,只有文字水印有该字段。Yes
FontSizeint字体大小,单位:磅,只有文字水印有该字段。Yes
Positionstring水印的参考位置,topleft、topright、center、bottomleft、bottomright分别表示左上、右上、居中、左下、右下Yes
PaddingXint水印离最近的水平边线占整个视频宽度的百分比,取值[0-49]Yes
PaddingYint水印离最近的垂直边线占整个视频高度的百分比,取值[0-49]Yes
CallbackUrlstring转码任务结束后,回调客户的url地址。Yes

Request Example

http(s)://api.ucloud.cn/?Action=GetWaterMarkPattenList

Response Example

{
    "Action": "GetWaterMarkPattenListResponse",
    "CustomizedPattenList": [
        {
            "PattenName": "shuip",
            "WaterMarkType": "text",
            "PaddingY": 0,
            "ImageUrl": "",
            "TextContent": "呜呜呜呜-_ssa21212",
            "FontType": "arial",
            "FontSize": 16,
            "PaddingX": 0,
            "Position": "center",
            "FontColor": "#c42222",
            "PattenId": "132",
            "CallbackUrl": ""
        }
    ],
    "RetCode": 0,
    "DefaultPattenList": [
        {
            "PattenName": "default_water",
            "WaterMarkType": "none",
            "PaddingY": 5,
            "ImageUrl": "http://image",
            "TextContent": "",
            "FontType": "",
            "FontSize": 0,
            "PaddingX": 5,
            "Position": "",
            "FontColor": "",
            "PattenId": "2",
            "CallbackUrl": ""
        }
    ]
}