Modifies a component of a production studio.

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 LIVEPRODUCER_POST-cn-0pp1czt****

The ID of the production studio.

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

The ID of the component.

RegionId String No cn-shanghai

The ID of the region.

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: a text component.
  • image: an image component.
  • caption: a subtitle component.
Effect String No animateV

The effect of the component. Valid values:

  • none: sets no effect for the component. This is the default value.
  • animateH: sets horizontal scrolling for the component.
  • animateV: sets vertical scrolling for the component.
ComponentLayer String No {"HeightNormalized":"1","PositionRefer":"topRight","WidthNormalized":"0","PositionNormalized":["0.1","0.2"]}

The information about the component layer, such as the size and layout, in 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 {"BorderWidthNormalized":"1","SizeNormalized":"0.2","Color":"0x000000","FontName":"KaiTi","BorderColor":"0x000000","Text":"hello world!"}

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

  • SizeNormalized: the normalized value of the font size of the text. The value of this field equals the font size divided by the output height. Valid values: [0,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 of the text. The value of this field equals the border width divided by the font size. Valid values: [0,1]. The default value is 0. The maximum border width is 16, even if the border width calculated based on this field is greater than 16.
  • FontName: the font name of the text, which is specified by the system. Default value: KaiTi.
  • BorderColor: the color of the text border. Valid values: 0x000000 to 0xffffff. By default, this parameter is not specified. In this case, the border color of the text is transparent.
  • Text: the content of the text. By default, this parameter is not specified. 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 {"MaterialId":"6cf724c6ebfd4a59b5b3cec6f10d5ecf"}

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

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

Note This parameter is required when the ComponentType parameter is set to image.
CaptionLayerContent String No {"BorderWidthNormalized":0.01,"SizeNormalized":0.05,"Color":"0x000000","LocationId":"RV01","SourceLan":"cn","FontName":"KaiTi","BorderColor":"0xffffff"}

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

  • SizeNormalized: the normalized value of the font size of the subtitle. The value of this field equals the font size divided by the output height. Valid values: [0,1]. The maximum font size of the subtitle 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 of the subtitle. The value of this field equals the border width divided by the font size. Valid values: [0,1]. The default value is 0. The maximum border width is 16, even if the border width calculated based on this field is greater than 16.
  • FontName: the font name of the subtitle, which is specified by the system. Default value: KaiTi.
  • BorderColor: the color of the subtitle border. Valid values: 0x000000 to 0xffffff. By default, this parameter is not specified. In this case, the border color of the subtitle is transparent.
  • LocationId: the channel ID of the source subtitle.
  • SourceLan: the source language of the audio in the video resource. Valid values: en, cn, es, and ru, which indicate English, Chinese, Spanish, and Russian respectively. Default value: cn.
  • TargetLan: the destination language of the audio in the video resource. 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. Valid values: true: displays the source language. false: hides the source language. Default value: false.
  • Truncation: specifies whether the subtitle can be truncated. Valid values: true and false. A value of true indicates that the subtitle can be truncated. A value of false indicates that the subtitle cannot be truncated. Default value: false.
  • SourceLanPerLineWordCount: the number of words displayed in each line when the subtitle is in 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 when the subtitle is in the destination 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.

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=LIVEPRODUCER_POST-cn-0pp1czt****
&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.