All Products
Search
Document Center

:UpdateLiveAISubtitle

Last Updated:Dec 05, 2024

Updates a subtitle template.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
live:UpdateLiveAISubtitlecreate
*All Resources
*
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
SubtitleNamestringNo

The name of the subtitle template. The name can contain digits, letters, and hyphens (-) but cannot start with a hyphen (-).

live AI subtitle template
SrcLanguagestringNo

The source language. Valid values:

  • en-US: English
  • zh-CN: Chinese
  • ru-RU: Russian
zh-CN
DstLanguagestringNo

The target language. Valid values:

  • en-US: English
  • zh-CN: Chinese
  • es-ES: Spanish
  • ru-RU: Russian
zh-CN
FontColorstringNo

The font color. Color format: RGBA.

0xFFFFFF
FontNamestringNo

The font. Valid values:

  • KaiTi (default)
  • AlibabaPuHuiTi-Regular
  • AlibabaPuHuiTi-Bold
  • AlibabaPuHuiTi-Light
  • NotoSansHans-Regular
  • NotoSansHans-Bold
  • NotoSansHans-Light
KaiTi
BgColorstringNo

The background color of the subtitles. Color format: RGBA.

0xFF0000
PositionNormalizedarrayNo

The position of the subtitles relative to the lower-left corner of the screen. The value is a pair of coordinates.

floatNo

The position of the subtitles relative to the lower-left corner of the screen. The value is a pair of coordinates.

[0.32,0.27]
ShowSourceLanbooleanNo

Specifies whether to display the source language. Valid values: true and false. Default value: false.

true
MaxLinesintegerNo

The number of displayed lines.

2
WordPerLineintegerNo

The number of characters per line. Valid values: 1 to 500.

20
FontSizeNormalizedfloatNo

The font size. Valid values: [0,1].

0.037
BorderWidthNormalizedfloatNo

The font weight. Valid values: [0,1].

0.05
BgWidthNormalizedfloatNo

The size of the background box. Valid values: [0,1].

0.09
SubtitleIdstringYes

The ID of the subtitle template.

597991f3-6ef9-4100-9238-82951de1****
DescriptionstringNo

The description of the subtitle template. The description can be up to 128 characters in length and can contain letters, digits, and special characters.

live AI subtitle template
WidthstringNo

The width of the preview. Unit: pixels.

1280
HeightstringNo

The height of the preview. Unit: pixels.

The following preview specifications (width x height) are supported:

  • 360p (640 x 360)
  • 360p (360 x 640)
  • 480p (854 x 480)
  • 480p (480 x 854)
  • 720p (1280 x 720)
  • 720p (720 x 1280)
  • 1080p (1920 x 1080)
  • 1080p (1080 x 1920)
720

Response parameters

ParameterTypeDescriptionExample
object
RequestIdstring

The request ID.

String 5c6a2a0df228-4a64- af62-20e91b96****

Examples

Sample success responses

JSONformat

{
  "RequestId": "String\t5c6a2a0df228-4a64- af62-20e91b96****"
}

Error codes

HTTP status codeError codeError messageDescription
400MissingParameter%s.Missing parameter
400InvalidParameter%s.Parameter error

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2024-12-04The Error code has changedView Change Details