ModifyCasterComponent

Updated at:

Modifies a production studio component.

Operation description

Modifies a production studio component. This operation currently supports text, image, and translated caption components.

Rate limit

The rate limit for this operation is 10 queries per second (QPS) per user. If the limit is exceeded, API calls are throttled, which may affect your services. Call this operation at a reasonable rate.

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.

  • If you created the production studio by calling the CreateCaster operation, obtain the value from the CasterId response parameter.

  • If you created the production studio in the ApsaraVideo Live console, go to the ApsaraVideo Live console > Production Studio > Cloud Production Studio page to view the ID.

Note

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

LIVEPRODUCER_POST-cn-0pp1czt****

ComponentId

string

Yes

The ID of the component. If you added the component by calling the AddCasterComponent operation, obtain the value from the ComponentId response parameter.

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

ComponentName

string

No

The name of the component. Default value: the component ID.

text01

ComponentType

string

No

The type of the component. Valid values:

  • text: text component. If this parameter is set to text, the TextLayerContent parameter is required.

  • image: image component. If this parameter is set to image, the ImageLayerContent parameter is required.

  • caption: translated caption component. If this parameter is set to caption, the CaptionLayerContent parameter is required.

text

Effect

string

No

The display effect of the component. Valid values:

  • none (default): none.

  • animateH: horizontal scrolling.

  • animateV: vertical scrolling.

animateV

ComponentLayer

string

No

The size and layout information of the layer. The value is in JSON format. The elements are described as follows:

  • HeightNormalized: the normalized height ratio.

  • WidthNormalized: the normalized width ratio.

  • PositionNormalized: the normalized position of the layer element.

  • PositionRefer: the reference coordinates for the position of the element.

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

TextLayerContent

string

No

The properties of the layer element. The value is in JSON format. The element properties are described as follows:

Important This parameter is required when the ComponentType parameter is set to text.

  • SizeNormalized: the normalized font size. The font size is calculated by using the formula: font_size/output_height. Valid values: [0,1]. If the font size calculated by the system based on the normalization method is greater than 1024, the value 1024 is used.

  • BorderWidthNormalized: the normalized width of the text border. The normalized value is calculated based on the font size by using the formula: BorderWidth/FontSize. Valid values: [0,1]. If the value calculated by the system based on the normalization method is greater than 16, the value 16 is used. Default value: 0.

  • FontName: the font name. For valid values, see Production studio fonts. Default value: KaiTi.

  • BorderColor: the color of the text border. Valid values: 0x000000 to 0xffffff. Default value: ``, which indicates that the parameter is invalid.

  • Text: the text content. Default value: ``.

  • Color: the text color. Default value: 0xff0000, which indicates red.

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

ImageLayerContent

string

No

The properties of the layer element. The value is in JSON format.

Important This parameter is required when the ComponentType parameter is set to image.

MaterialId specifies the ID of the media asset.

{"MaterialId":"6cf724c6ebfd4a59b5b3cec6f10d5ecf"}

CaptionLayerContent

string

No

The properties of the layer element. The value is in JSON format. The element properties are described as follows:

Important This parameter is required when the ComponentType parameter is set to caption.

  • SizeNormalized: the normalized font size. The font size is calculated by using the formula: font_size/output_height. Valid values: [0,1]. If the font size calculated by the system based on the normalization method is greater than 1024, the value 1024 is used.

  • BorderWidthNormalized: the normalized width of the text border. The normalized value is calculated based on the font size by using the formula: BorderWidth/FontSize. Valid values: [0,1]. If the value calculated by the system based on the normalization method is greater than 16, the value 16 is used. Default value: 0.

  • FontName: the font name. For valid values, see Production studio fonts. Default value: KaiTi.

  • BorderColor: the color of the text border. Valid values: 0x000000 to 0xffffff. Default value: ``, which indicates that the parameter is invalid.

  • LocationId: the channel ID of the translation source.

  • SourceLan: the original audio language of the video source. Valid values: en for English, cn for Chinese, es for Spanish, and ru for Russian. Default value: cn.

  • TargetLan: the target audio language of the video source. If this parameter is not specified, speech recognition is performed. If this parameter is specified, translation is performed. Valid values: en for English, cn for Chinese, es for Spanish, and ru for Russian.

  • ShowSourceLan: specifies whether to display the source language. Valid values: true and false. Default value: false.

  • Truncation: specifies whether the caption can be truncated. Valid values: true and false. Default value: false.

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

  • TargetLanPerLineWordCount: the number of words per line in the target language. This parameter takes effect only when the Truncation parameter 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

FontFontName value
KaiTiKaiTi
Alibaba PuHuiTi RegularAlibabaPuHuiTi-Regular
Alibaba PuHuiTi BoldAlibabaPuHuiTi-Bold
Alibaba PuHuiTi LightAlibabaPuHuiTi-Light
Noto Sans Hans RegularNotoSansHans-Regular
Noto Sans Hans BoldNotoSansHans-Bold
Noto Sans Hans LightNotoSansHans-Light

Response elements

Element

Type

Description

Example

object

ComponentId

string

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

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

RequestId

string

The ID of the request.

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, please check userId. The userId passed in is invalid, please check.
400 InvalidCasterId.Malformed %s, please check and try again later. The parameter CasterId is invalid, please check and try again.
400 MissingParameter %s. Missing parameter
400 InvalidParameter.Malformed There are invalid parameters: %s. There are invalid parameters: %s.
400 InvalidPositionNormalized.Malformed %s, please check and try again later. The parameter PositionNormalized is invalid, please check and try again.
401 IllegalOperation %s, please check and try again later. Operation not allowed, please check and try again.
500 InternalError %s, please try again later. Internal error, please try again later.
404 InvalidCaster.NotFound %s, please check and try again later. The guide station does not exist, please check and try again.
404 InvalidComponent.NotFound %s, please check and try again later. The component to be operated does not exist. Please check and try again.
404 CanvasNotExist %s, please check and try again later. Canvas does not exist, please check and try again.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.