Queries the components of a streaming panel.
Usage note
The components must have been added to ApsaraLive.
QPS limit
A single user can perform a maximum of 15 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
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 | 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 | No | 21926b36-7dd2-4fde-ae25-51b5bc8e**** |
The ID of the component. It is included in the response when you call the AddCasterComponent operation. |
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 field does not take effect when the HeightNormalized field is also set. If you
set the WidthNormalized field and then the HeightNormalized field, the component layer
is configured based on the HeightNormalized field.
|
PositionRefer | String | topLeft |
The reference coordinates of the component layer. Valid values:
|
PositionNormalizeds | List | 0,0.3 |
The normalized values of the coordinates of the component layer, in the format of
Note Use the normalized values of the coordinates when you set the field 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. |
Color | String | 0xff0000 |
The color of the text. Valid values: 0x000000 to 0xffffff. |
FontName | String | KaiTi |
The font name of the text. The font name is specified by the system. Valid values:
Default value: KaiTi. |
SizeNormalized | Float | 16 |
The normalized value of the font size of the text. The value of this field 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 field is greater than 1,024. Default value: –1, which indicates that this field does not take effect. |
BorderWidthNormalized | Float | 0 |
The normalized value of the border width of the text. The value of this field 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 field 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. The values specified by this parameter must be in ascending order, such as RC01 to RC12. |
ComponentType | String | text |
The type of the component. Valid values:
|
Effect | String | animateV |
The effect of the component. Valid values:
|
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 field 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 field 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 name of the text. The font name is specified by the system. Valid values:
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 slot ID of the video source 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:
|
SizeNormalized | Float | 0.1 |
The normalized value of the font size of the subtitle. The value of this field equals
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. Default value: –1, which indicates that this field does not take effect. |
SourceLan | String | cn |
The source language of the audio in the video source. Valid values:
|
TargetLan | String | cn |
The destination language of the audio in the video source. Valid values:
|
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 this field can be specified based on the font size. Valid values: 10 to 50. Default value: 35. |
Total | Integer | 3 |
The total number of components that were returned. |
Examples
Sample requests
https://live.aliyuncs.com/?Action=DescribeCasterComponents
&CasterId=9ff2d96b-37ef-40a3-8cb0-4c7b1e2e****
&<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>liveComponent****</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/fb628e2469f94f2aa2c0c219af8****.jpg</url>
</ImageLayerContent>
</Components>
</DescribeCasterComponentsResponse>
JSON
format
{
"RequestId": "3be7ade8-d907-483c-b24a-0dad4595beaf",
"Components": [
{
"ComponentId": "72d2ec7a-4cd7-4a01-974b-7cd53947****",
"ComponentName":"liveComponent****",
"LocationId":"RC01",
"ComponentType":"image",
"Effect":"animateV",
"ComponentLayer":{
"HeightNormalized": 0.5,
"PositionRefer": "topLeft",
"WidthNormalized": 0.5,
"PositionNormalized": [
0,
0.3
]
},
"ImageLayerContent":{
"url":"http://live/image/fb628e2469f94f2aa2c0c219af8b****.jpg"
}
}
]
}
Error codes
For a list of error codes, visit the API Error Center.