All Products
Search
Document Center

:DescribeCasterComponents

最終更新日:Jun 06, 2024

Queries the components of a production studio.

Usage notes

You can call the AddCasterComponent operation to add a component to a production studio and call the DescribeCasterComponents operation to query the components of a production studio.

QPS limit

You can call this operation up to 15 times per second per account. Requests that exceed this limit are dropped and you will experience service interruptions. We recommend that you take note of this limit when you call this operation. For more information, see QPS limits.

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

The ID of the production studio.

  • If the production studio was created by calling the CreateCaster operation, check the value of the response parameter CasterId to obtain the ID.
  • If the production studio was created by using the ApsaraVideo Live console, obtain the ID on the Production Studio Management page. To go to the page, log on to the ApsaraVideo Live console and click Production Studios in the left-side navigation pane.
Note You can find the ID of the production studio in the Instance ID/Name column.
ComponentId String No 21926b36-7dd2-4fde-ae25-51b5bc8e****

The component ID. If the component was added by calling the AddCasterComponent operation, check the value of the response parameter ComponentId to obtain the ID.

Response parameters

Parameter

Type

Example

Description

Components Array of Component

The components.

Component
CaptionLayerContent Object

The information about the subtitle component.

BorderColor String 0x000000

The color of the text border.

Valid values: 0x000000 to 0xffffff. If the value of this parameter is "", 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. If the value of this parameter is 0, the component does not have a specified normalized border width.

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:

  • KaiTi
  • AlibabaPuHuiTi-Regular
  • AlibabaPuHuiTi-Bold
  • NAlibabaPuHuiTi-Light
  • NotoSansHans-Regular
  • NotoSansHans-Bold
  • NotoSansHans-Light

LineSpaceNormalized Float 0

The line spacing, which indicates the interval between every two lines.

LocationId String RV01

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

PtsOffset Integer 0

The offset between the presentation timestamps (PTSs) 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.
SizeNormalized Float 0.1

The normalized value of the font size of the subtitle. The value of this field 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 field is greater than 1,024. If the value of this parameter -1, this parameter does not take effect.

SourceLan String cn

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

  • en: English.
  • cn: Chinese.
  • es: Spanish.
  • ru: Russian.
TargetLan String cn

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

  • en: English.
  • cn: Chinese.
  • 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. If no upper limit on the number of words per line is specified, the value of this parameter is 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.

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

The component ID.

ComponentLayer Object

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 layer. The widths of the elements are scaled based on this parameter.

If the value of this parameter is 0, the elements in the component layer are not scaled.

PositionNormalizeds Array of Float 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 field in a request.
PositionRefer String topLeft

The reference coordinates of the component layer. Valid values:

  • topLeft: the upper-left corner
  • topRight: the upper-right corner
  • bottomLeft: the lower-left corner
  • bottomRight: the lower-right corner
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.

WidthNormalized Float 0.5

The normalized value for the widths of elements in the layer. The heights of elements are proportionally scaled based on this parameter. If the value of this parameter is 0, 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.
ComponentName String component_name

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

ComponentType String text

The component type. Valid values:

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

The effect for the component. Valid values:

  • none: none.
  • animateH: horizontal scrolling.
  • animateV: vertical scrolling.
ImageLayerContent Object

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.

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 of this parameter are in ascending order, such as RC01 to RC12.

TextLayerContent Object

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

BorderColor String 0x000000

The color of the text border. Valid values: 0x000000 to 0xffffff. If "" is returned, no border color applies.

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 parameter is greater than 16.

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:

  • KaiTi
  • AlibabaPuHuiTi-Regular
  • AlibabaPuHuiTi-Bold
  • NAlibabaPuHuiTi-Light
  • NotoSansHans-Regular
  • NotoSansHans-Bold
  • NotoSansHans-Light

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. If the value of this parameter -1, this parameter does not take effect.

Text String hello world

The content of the text.

RequestId String 3be7ade8-d907-483c-b24a-0dad4595beaf

The request ID.

Total Integer 3

The total number of entries.

Examples

Sample requests

http(s)://live.aliyuncs.com/?Action=DescribeCasterComponents
&CasterId=LIVEPRODUCER_POST-cn-0pp1czt****
&<Common request parameters>

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<DescribeCasterComponentsResponse>
    <Components>
        <CaptionLayerContent>
            <BorderColor>0x000000</BorderColor>
            <BorderWidthNormalized>0</BorderWidthNormalized>
            <Color>0x000000</Color>
            <FontName>KaiTi</FontName>
            <LineSpaceNormalized>0</LineSpaceNormalized>
            <LocationId>RV01</LocationId>
            <PtsOffset>0</PtsOffset>
            <ShowSourceLan>false</ShowSourceLan>
            <SizeNormalized>0.1</SizeNormalized>
            <SourceLan>cn</SourceLan>
            <TargetLan>cn</TargetLan>
            <WordCountPerLine>15</WordCountPerLine>
            <WordSpaceNormalized>0</WordSpaceNormalized>
            <WordsCount>35</WordsCount>
        </CaptionLayerContent>
        <ComponentId>72d2ec7a-4cd7-4a01-974b-7cd53947****</ComponentId>
        <ComponentLayer>
            <HeightNormalized>0.5</HeightNormalized>
            <PositionNormalizeds>0.3</PositionNormalizeds>
            <PositionRefer>topLeft</PositionRefer>
            <Transparency>200</Transparency>
            <WidthNormalized>0.5</WidthNormalized>
        </ComponentLayer>
        <ComponentName>component_name</ComponentName>
        <ComponentType>text</ComponentType>
        <Effect>animateV</Effect>
        <ImageLayerContent>
            <MaterialId>6cf724c6ebfd4a59b5b3cec6f10d****</MaterialId>
        </ImageLayerContent>
        <LocationId>RC01</LocationId>
        <TextLayerContent>
            <BorderColor>0x000000</BorderColor>
            <BorderWidthNormalized>0</BorderWidthNormalized>
            <Color>0xff0000</Color>
            <FontName>KaiTi</FontName>
            <SizeNormalized>16</SizeNormalized>
            <Text>hello world</Text>
        </TextLayerContent>
    </Components>
    <RequestId>3be7ade8-d907-483c-b24a-0dad4595beaf</RequestId>
    <Total>3</Total>
</DescribeCasterComponentsResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "Components" : [ {
    "CaptionLayerContent" : {
      "BorderColor" : "0x000000",
      "BorderWidthNormalized" : 0,
      "Color" : "0x000000",
      "FontName" : "KaiTi",
      "LineSpaceNormalized" : 0,
      "LocationId" : "RV01",
      "PtsOffset" : 0,
      "ShowSourceLan" : false,
      "SizeNormalized" : 0.1,
      "SourceLan" : "cn",
      "TargetLan" : "cn",
      "WordCountPerLine" : 15,
      "WordSpaceNormalized" : 0,
      "WordsCount" : 35
    },
    "ComponentId" : "72d2ec7a-4cd7-4a01-974b-7cd53947****",
    "ComponentLayer" : {
      "HeightNormalized" : 0.5,
      "PositionNormalizeds" : [ 0.3 ],
      "PositionRefer" : "topLeft",
      "Transparency" : 200,
      "WidthNormalized" : 0.5
    },
    "ComponentName" : "component_name",
    "ComponentType" : "text",
    "Effect" : "animateV",
    "ImageLayerContent" : {
      "MaterialId" : "6cf724c6ebfd4a59b5b3cec6f10d****"
    },
    "LocationId" : "RC01",
    "TextLayerContent" : {
      "BorderColor" : "0x000000",
      "BorderWidthNormalized" : 0,
      "Color" : "0xff0000",
      "FontName" : "KaiTi",
      "SizeNormalized" : 16,
      "Text" : "hello world"
    }
  } ],
  "RequestId" : "3be7ade8-d907-483c-b24a-0dad4595beaf",
  "Total" : 3
}

Error codes

For a list of error codes, see Service error codes.