All Products
Search
Document Center

ApsaraVideo Live:ModifyCasterComponent

Last Updated:Aug 15, 2025

Modifies a component of a production studio.

Operation description

You can call this operation to modify a production studio component, such as a text, image, or translation caption component.

QPS limits

The queries per second (QPS) limit for a single user is 10 calls per second. If the limit is exceeded, API calls are throttled, which may affect your business. Call this operation as needed.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

live:ModifyCasterComponent

update

*Caster

acs:live:*:{#accountId}:caster/{#CasterId}

None None

Request parameters

Parameter

Type

Required

Description

Example

RegionId

string

No

The region ID.

cn-shanghai

CasterId

string

Yes

The ID of the production studio.

  • The ID is returned after you call the CreateCaster operation.

  • If you create a production studio in the LIVE console, go to the LIVE > Production Studio > Cloud Production Studio page to find the ID.

Note

The name of the production studio in the list on the Cloud Production Studio page is the production studio ID.

LIVEPRODUCER_POST-cn-0pp1czt****

ComponentId

string

Yes

The component ID. The ID is returned after you call the AddCasterComponent operation.

05ab713c-676e-49c0-96ce-cc408da1****

ComponentName

string

No

The name of the component. The default value is the component ID.

text01

ComponentType

string

No

The type of the component. Valid values:

  • text: A text component. The TextLayerContent parameter is required only if you set ComponentType to text.

  • image: An image component. The ImageLayerContent parameter is required only if you set ComponentType to image.

  • caption: A translation caption component. The CaptionLayerContent parameter is required only if you set ComponentType to caption.

text

Effect

string

No

The display effect of the component. Valid values:

  • none (default): no effect.

  • animateH: horizontal scroll.

  • animateV: vertical scroll.

animateV

ComponentLayer

string

No

The size and layout of the layer. The value is a JSON string. The following properties are supported:

  • HeightNormalized: The normalized height.

  • WidthNormalized: The normalized width.

  • PositionNormalized: The normalized position of the layer.

  • PositionRefer: The reference point for the position of the layer.

{"HeightNormalized":"1","PositionRefer":"topRight","WidthNormalized":"0","PositionNormalized":["0.1","0.2"]}

TextLayerContent

string

No

The properties of the text layer. The value is a JSON string. The following properties are supported:

Important

This parameter is required if you set ComponentType to text.

  • SizeNormalized: The normalized font size. The font size is calculated using the formula: font_size/output_height. The value must be in the range of [0,1]. If the calculated font size is greater than 1024, the value 1024 is used.

  • BorderWidthNormalized: The normalized width of the text border. The normalized width is calculated based on the font size using the formula: BorderWidth/FontSize. The value must be in the range of [0,1]. If the calculated value is greater than 16, the value 16 is used. Default value: 0.

  • FontName: The font name. For more information about valid values, see Production studio fonts. Default value: KaiTi.

  • BorderColor: The color of the text border. Valid values are from 0x000000 to 0xffffff. The default value is an empty string, which indicates that this parameter is not used.

  • Text: The text content. The default value is an empty string.

  • Color: The color of the text. Default value: 0xff0000, which is red.

{"BorderWidthNormalized":"1","SizeNormalized":"0.2","Color":"0x000000","FontName":"KaiTi","BorderColor":"0x000000","Text":"hello world!"}

ImageLayerContent

string

No

The properties of the image layer. The value is a JSON string.

Important

This parameter is required if you set ComponentType to image.

MaterialId is the ID of the material in the media asset library.

{"MaterialId":"6cf724c6ebfd4a59b5b3cec6f10d5ecf"}

CaptionLayerContent

string

No

The properties of the caption layer. The value is a JSON string. The following properties are supported:

Important

This parameter is required if you set ComponentType to caption.

  • SizeNormalized: The normalized font size. The font size is calculated using the formula: font_size/output_height. The value must be in the range of [0,1]. If the calculated font size is greater than 1024, the value 1024 is used.

  • BorderWidthNormalized: The normalized width of the text border. The normalized width is calculated based on the font size using the formula: BorderWidth/FontSize. The value must be in the range of [0,1]. If the calculated value is greater than 16, the value 16 is used. Default value: 0.

  • FontName: The font name. For more information about valid values, see Production studio fonts. Default value: KaiTi.

  • BorderColor: The color of the text border. Valid values are from 0x000000 to 0xffffff. The default value is an empty string, which indicates that this parameter is not used.

  • LocationId: The channel ID of the translation source.

  • SourceLan: The source language of the audio in the video source. Valid values are en (English), cn (Chinese), es (Spanish), and ru (Russian). Default value: cn.

  • TargetLan: The target language for translation. If you do not set this parameter, only speech recognition is performed. If you set this parameter, translation is also performed. Valid values are en (English), cn (Chinese), es (Spanish), and ru (Russian).

  • ShowSourceLan: Specifies whether to display the source language. Valid values are true (display) and false (do not display). Default value: false.

  • Truncation: Specifies whether to truncate the caption. Valid values are true (truncate) and false (do not truncate). Default value: false.

  • SourceLanPerLineWordCount: The number of words per line for the source language. This parameter takes effect only if Truncation is set to true. Default value: 20.

  • TargetLanPerLineWordCount: The number of words per line for the target language. This parameter takes effect only if Truncation is set to true. Default value: 20.

{"BorderWidthNormalized":0.01,"SizeNormalized":0.05,"Color":"0x000000","LocationId":"RV01","SourceLan":"cn","FontName":"KaiTi","BorderColor":"0xffffff"}

Production studio fonts

Font

Value of FontName

KaiTi

KaiTi

Alibaba PuHuiTi-Regular

AlibabaPuHuiTi-Regular

Alibaba PuHuiTi-Bold

AlibabaPuHuiTi-Bold

Alibaba PuHuiTi-Light

AlibabaPuHuiTi-Light

Source Han Sans-Regular

NotoSansHans-Regular

Source Han Sans-Bold

NotoSansHans-Bold

Source Han Sans-Light

NotoSansHans-Light

Response parameters

Parameter

Type

Description

Example

object

ComponentId

string

The component ID. You can use this ID as a request parameter to query the components of the production studio.

05ab713c-676e-49c0-96ce-cc408da1****

RequestId

string

The request ID.

16A96B9A-F203-4EC5-8E43-CB92E68F4CD8

Examples

Success response

JSON format

{
  "ComponentId": "05ab713c-676e-49c0-96ce-cc408da1****",
  "RequestId": "16A96B9A-F203-4EC5-8E43-CB92E68F4CD8"
}

Error codes

HTTP status code

Error code

Error message

Description

400 InvalidUserId.Malformed %s
400 InvalidCasterId.Malformed %s
400 MissingParameter %s
400 InvalidParameter.Malformed %s
400 InvalidPositionNormalized.Malformed %s
401 IllegalOperation %s
500 InternalError %s
404 InvalidCaster.NotFound %s
404 InvalidComponent.NotFound %s
404 CanvasNotExist %s

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.