Modifies a component of a production studio.

Usage note

This interface currently supports modifying three types of components: pictures, text, and subtitles.

QPS limit

A single user can perform a maximum of 10 queries per second (QPS). Throttling is triggered when the number of calls per second exceeds the QPS limit. The throttling may affect your business. Thus, we recommend that you observe the QPS limit on this operation. For more information about what a single user means and the QPS details, see QPS limit on an API operation in ApsaraVideo Live.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes ModifyCasterComponent

The operation that you want to perform. Set the value to ModifyCasterComponent.

CasterId String Yes 9ff2d96b-37ef-40a3-8cb0-4c7b1e2e****

The ID of the production studio.

If you create a production studio through the CreateCaster interface, check the value of the CasterId parameter in the response.

If you create a production studio through the ApsaraVideo Live Console, log in to the console, then check the ID of the production studio through the following path:

Production Studios > Production Studio Management

Note The CasterId is reflected in the Name column on the Production Studio Management page.
ComponentId String Yes 05ab713c-676e-49c0-96ce-cc408da1****

The ID of the component. It is included in the response when you call the AddCasterComponent operation.

ComponentName String No text01

The name of the component. By default, the name is the ID of the component.

ComponentType String No text

The type of the component. Valid values:

  • text: text component.
  • image: image component.
  • caption: caption component.
Effect String No animateV

The effect for the component. Valid values:

  • none: specifies no effects for the component. This is the default value.
  • animateH: specifies horizontal scrolling for the component.
  • animateV: specifies vertical scrolling for the component.
ComponentLayer String No null

The information about the component layer, such as the size and layout, in the JSON format. This parameter contains the following fields:

  • HeightNormalized: the normalized value of heights for the elements in the component layer.
  • WidthNormalized: the normalized value of widths for the elements in the component layer.
  • PositionNormalized: the normalized value of the coordinates of the component layer.
  • PositionRefer: the reference coordinates of the component layer.
TextLayerContent String No null

The information about the text layer, in the JSON format. This parameter contains the following fields:

  • SizeNormalized: the normalized value of the font size. The value of this field equals the font size divided by the output height. Valid values: 0 to 1. The maximum font size of the text is 1,024, even if the font size calculated based on this field is greater than 1,024.
  • BorderWidthNormalized: the normalized value of the border width. The value of this field equals the border width divided by the font size. Valid values: 0 to 1. Default value: 0. The maximum border width is 16, even if the border width calculated based on this field is greater than 16.
  • FontName: the name of the font. Default value: KaiTi. For more information about the valid values, see Description of available fonts in a production studio.
  • BorderColor: the color of the text border. Valid values: 0x000000 to 0xffffff. By default, this parameter is not set. In this case, the color of the text border is transparent.
  • Text: the content of the text. By default, this parameter is not set. In this case, the text contains no content.
  • Color: the color of the text. The default value is 0xff0000, which indicates that the text is in red.
Note This parameter is required when the ComponentType parameter is set to text.
ImageLayerContent String No null

The information about the image layer, in the JSON format. This parameter contains the following fields:

MaterialId: the ID of the asset from the media asset library.

Note This parameter is required when the ComponentType parameter is set to image.
CaptionLayerContent String No null

The information about the caption layer, in the JSON format. This parameter contains the following fields:

  • SizeNormalized: the normalized value of the font size. The value of this field equals the font size divided by the output height. Valid values: 0 to 1. The maximum font size of the caption is 1,024, even if the font size calculated based on this field is greater than 1,024.
  • BorderWidthNormalized: the normalized value of the border width. The value of this field equals the border width divided by the font size. Valid values: 0 to 1. Default value: 0. The maximum border width is 16, even if the border width calculated based on this field is greater than 16.
  • FontName: the name of the font. Default value: KaiTi. For more information about the valid values, see Description of available fonts in a production studio.
  • BorderColor: the color of the text border. Valid values: 0x000000 to 0xffffff. By default, this parameter is not set. In this case, the color of the text border is transparent.
  • LocationId: the channel ID of the video source.
  • SourceLan: the source audio language in the video source. Valid values: en, cn, es, and ru, which indicate English, Chinese, Spanish, and Russian respectively. Default value: cn.
  • TargetLan: the target audio language in the video source. Valid values: en, cn, es, and ru, which indicate English, Chinese, Spanish, and Russian respectively. Default value: cn.
  • ShowSourceLan: specifies whether to display the source language. true: displays the source language. false: hides the source language. Default value: false.
  • Truncation: specifies whether the caption can be truncated. true: specifies that the caption can be truncated. false: specifies that the caption cannot be truncated. Default value: false.
  • SourceLanPerLineWordCount: the number of words displayed in each line of the source language. This field takes effect only when the Truncation field is set to true. Default value: 20.
  • TargetLanPerLineWordCount: the number of words displayed in each line of the target language. This field takes effect only when the Truncation field is set to true. Default value: 20.
Note This parameter is required when the ComponentType parameter is set to caption.

Description of available fonts in a production studio

Font

Value for 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 Example Description
RequestId String 16A96B9A-F203-4EC5-8E43-CB92E68F4CD8

The ID of the request.

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

The ID of the component.

Examples

Sample requests

http(s)://live.aliyuncs.com/?Action=ModifyCasterComponent
&CasterId=9ff2d96b-37ef-40a3-8cb0-4c7b1e2e****
&ComponentId=05ab713c-676e-49c0-96ce-cc408da1****
&<Common request parameters>

Sample success responses

XML format

<ModifyCasterComponentResponse>
      <RequestId>16A96B9A-F203-4EC5-8E43-CB92E68F4CD8</RequestId>
      <ComponentId>21926b36-7dd2-4fde-ae25-51b5bc8e5****</ComponentId>
</ModifyCasterComponentResponse>

JSON format

{
    "RequestId": "16A96B9A-F203-4EC5-8E43-CB92E68F4CD8",
    "ComponentId": "21926b36-7dd2-4fde-ae25-51b5bc8e****"
}

Error codes

For a list of error codes, visit the API Error Center.