Queries the components 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 DescribeCasterComponents

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

CasterId String Yes a2b8e671-2fe5-4642-a2ec-bf93880e****

The ID of the production studio.

RegionId String No cn-shanghai

The ID of the region.

ComponentId String No 21926b36-7dd2-4fde-ae25-51b5bc8e****

The ID of the component.

Response parameters

Parameter Type Example Description
RequestId String 3be7ade8-d907-483c-b24a-0dad4595beaf

The ID of the request.

Components Array of Component

The information about the components that were queried.

Component
ComponentId String 72d2ec7a-4cd7-4a01-974b-7cd53947****

The ID of the component.

ComponentLayer Struct

The information about the component layer, such as the size and layout.

HeightNormalized Float 0.5

The normalized value of heights for the elements in the component layer. The widths of the elements are scaled based on this parameter.

The default value is 0, which indicates that the elements in the component layer are not scaled.

WidthNormalized Float 0.5

The normalized value of widths for the elements in the component layer. The heights of the elements are scaled based on this parameter. The default value is 0, which indicates that the elements in the component layer are not scaled.

Note This parameter does not take effect when the HeightNormalized parameter is also set. If you set the WidthNormalized parameter and then the HeightNormalized parameter, the component layer is configured based on the HeightNormalized parameter.
PositionRefer String topLeft

The reference coordinates of the component layer. Valid values:

  • topLeft: the upper-left corner. This is the default value.
  • topRight: the upper-right corner.
  • bottomLeft: the lower-left corner.
  • bottomRight: the lower-right corner.
PositionNormalizeds List 0,0.3

The normalized values of the coordinates of the component layer, in the format of [x,y]. The default value is [0,0].

Note Use the normalized values of the coordinates when you set the parameter in a request.
Transparency Integer 200

The transparency of the component layer. Valid values: 0 to 255.

A value of 0 indicates that the component layer is completely transparent. A value of 255 indicates that the component layer is completely opaque. This is the default value.

ComponentName String component_name

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

ImageLayerContent Struct

The information about the image component. This parameter is returned only for image components.

MaterialId String 6cf724c6ebfd4a59b5b3cec6f10d****

The ID of the material from the media library.

TextLayerContent Struct

The information about the text component. This parameter is returned only for text components.

Text String hello world

The content of the text component. By default, no text is returned.

Color String 0xff0000

The color of the text. Valid values: 0x000000 to 0xffffff.

FontName String KaiTi

The font of the text. The font name is specified by the system.

Default value: KaiTi.

SizeNormalized Float 16

The normalized value of the font size of the text.

The value of this parameter equals the font size divided by the output height. The maximum font size of the text is 1,024, even if the font size calculated based on this parameter is greater than 1,024. Default value: –1, which indicates that this parameter does not take effect.

BorderWidthNormalized Float 0

The normalized value of the border width of the text. The value of this parameter equals the border width divided by the font size.

The maximum border width of the text is 16, even if the border width calculated based on this parameter is greater than 16. Default value: 0.

BorderColor String 0x000000

The color of the text border. Valid values: 0x000000 to 0xffffff. By default, "" is returned. In this case, the border color of the text is transparent.

LocationId String RC01

The location ID of the component.

Each location ID can be assigned to only one component and must be in the RC[Number] format. Values specified by this parameter must be in the ascending order, such as RC01 to RC12.

ComponentType String text

The type of the component. Valid values:

  • text: a text component.
  • image: an image component.
  • caption: a subtitle component.
Effect String animateV

The effect of the component. Valid values:

  • none: sets no effect for the component.
  • animateH: sets horizontal scrolling for the component.
  • animateV: sets vertical scrolling for the component.
CaptionLayerContent Struct

The information about the subtitle component.

BorderColor String 0x000000

The color of the text border.

Valid values: 0x000000 to 0xffffff. By default, "" is returned. In this case, the border color of the text is transparent.

BorderWidthNormalized Float 0

The normalized value of the border width of the text. The value of this parameter equals the border width divided by the font size.

The maximum border width of the text is 16, even if the border width calculated based on this parameter is greater than 16. Default value: 0.

Color String 0x000000

The color of the text. Valid values: 0x000000 to 0xffffff.

FontName String KaiTi

The font of the subtitle.

Default value: KaiTi.

LineSpaceNormalized Float 0

The line spacing, which indicates the interval between every two lines. Default value: 0.

LocationId String RV01

The location ID of the component. If the value of the ComponentType parameter is caption, the LocationId parameter indicates the location ID or the channel ID of the video resource that is referenced by the component.

PtsOffset Integer 0

The offset between the presentation timestamps (PTS) of the subtitle and the audio.

Valid values: –10000 to 10000. Default value: 0.

ShowSourceLan Boolean false

Indicates whether the source language of the subtitle is displayed. Valid values:

  • true: The source language is displayed.
  • false: The source language is not displayed. This is the default value.
SizeNormalized Float 0.1

The normalized value of the font size of the subtitle. The value of this parameter equals the font size divided by the output height.

The maximum font size of the subtitle is 1,024, even if the font size calculated based on this parameter is greater than 1,024. Default value: –1, which indicates that this parameter does not take effect.

SourceLan String cn

The source language of the audio in the video resource. Valid values:

  • en: English.
  • cn: Chinese. This is the default value.
  • es: Spanish.
  • ru: Russian.
TargetLan String cn

The destination language of the audio in the video resource. Valid values:

  • en: English.
  • cn: Chinese. This is the default value.
  • es: Spanish.
  • ru: Russian.
WordCountPerLine Integer 15

The maximum number of words displayed in each line.

WordSpaceNormalized Float 0

The word spacing, which indicates the interval between every two words. Default value: 0.

WordsCount Integer 35

The number of words displayed on the component. The value of the parameter can be specified based on the font size.

Valid values: 10 to 50. Default value: 35.

Total Integer 3

The total number of returned entries.

Examples

Sample requests

https://live.aliyuncs.com?Action=DescribeCasterComponents
&CasterId=a2b8e671-2fe5-4642-a2ec-bf93880e****
&<Common request parameters>

Sample success responses

XML format

<DescribeCasterComponentsResponse>
	  <RequestId>3be7ade8-d907-483c-b24a-0dad4595beaf</RequestId>
	  <Components>
		    <ComponentId>72d2ec7a-4cd7-4a01-974b-7cd53947****</ComponentId>
		    <ComponentName>imageName</ComponentName>
		    <LocationId>RC01</LocationId>
		    <ComponentType>image</ComponentType>
		    <Effect>animateV</Effect>
		    <ComponentLayer>
			      <HeightNormalized>0.5</HeightNormalized>
			      <PositionRefer>topLeft</PositionRefer>
			      <WidthNormalized>0.5</WidthNormalized>
			      <PositionNormalized>0</PositionNormalized>
			      <PositionNormalized>0.3</PositionNormalized>
		    </ComponentLayer>
		    <ImageLayerContent>
			      <url>http://live/image/fb628e2469f94f2aa2c0c219af8b2527.jpg</url>
		    </ImageLayerContent>
	  </Components>
</DescribeCasterComponentsResponse>

JSON format

{
    "RequestId": "3be7ade8-d907-483c-b24a-0dad4595beaf",
    "Components": [
        {
            "ComponentId": "72d2ec7a-4cd7-4a01-974b-7cd53947****",
            "ComponentName":"imageName",
            "LocationId":"RC01",
            "ComponentType":"image",
            "Effect":"animateV",
            "ComponentLayer":{
                "HeightNormalized": 0.5,
                "PositionRefer": "topLeft",
                "WidthNormalized": 0.5,
                "PositionNormalized": [
                    0,
                    0.3
                ]
            },
            "ImageLayerContent":{
                "url":"http://live/image/fb628e2469f94f2aa2c0c219af8b2527.jpg"
            }
        }
    ]
}

Error codes

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