All Products
Search
Document Center

ApsaraVideo Live:DescribeCasterComponents

Last Updated:Nov 14, 2024

Queries the components of a production studio.

Operation description

You can call the AddCasterComponent operation to add components to a production studio and then call this operation to query the components of the 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.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
live:DescribeCasterComponentsget
*Caster
acs:live:*:{#accountId}:caster/{#CasterId}
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
CasterIdstringYes

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

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.

21926b36-7dd2-4fde-ae25-51b5bc8e****

Response parameters

ParameterTypeDescriptionExample
object
Componentsarray<object>

The components.

Componentobject
CaptionLayerContentobject

The information about the subtitle component.

BorderColorstring

The color of the text border.

Valid values: 0x000000 to 0xffffff. If the value of this parameter is "", this parameter does not take effect.

0x000000
BorderWidthNormalizedfloat

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

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

0
Colorstring

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

0x000000
FontNamestring

The font of the text, which is specified by the system. Valid values:

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

KaiTi
LineSpaceNormalizedfloat

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

0
LocationIdstring

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.

RV01
PtsOffsetinteger

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

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

0
ShowSourceLanboolean

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

  • true: The source language is displayed.
  • false: The source language is not displayed.
false
SizeNormalizedfloat

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

The maximum font size of the subtitles is 1,024, even if the font size calculated based on this parameter is greater than 1,024. If the value of this parameter is -1, this parameter does not take effect.

0.1
SourceLanstring

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

  • en: English
  • cn: Chinese
  • es: Spanish
  • ru: Russian
cn
TargetLanstring

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

  • en: English
  • cn: Chinese
  • es: Spanish
  • ru: Russian
cn
WordCountPerLineinteger

The maximum number of words displayed in each line.

15
WordSpaceNormalizedfloat

The word spacing, which indicates the interval between every two words.

0
WordsCountinteger

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

Valid values: 10 to 50.

35
ComponentIdstring

The component ID.

72d2ec7a-4cd7-4a01-974b-7cd53947****
ComponentLayerobject

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

HeightNormalizedfloat

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

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

0.5
PositionNormalizedsarray

The normalized value of the position of the layer, in the format of [x,y]. Example: [0,0].

Note The values of x and y need to be normalized.
Positionfloat

The value.

0.3
PositionReferstring

The reference coordinates of the layer. Valid values:

  • topLeft: the upper-left corner
  • topRight: the upper-right corner
  • bottomLeft: the lower-left corner
  • bottomRight: the lower-right corner
topLeft
Transparencyinteger

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

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

200
WidthNormalizedfloat

The normalized value for widths of the elements in the layer. The heights of the elements are proportionally scaled based on this parameter. If the value of this parameter is 0, the elements in the layer are not scaled.

Note This parameter conflicts with the HeightNormalized parameter. If both of them are specified, only the HeightNormalized parameter takes effect. If only one of them is specified, the latest specified value is used.
0.5
ComponentNamestring

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

component_name
ComponentTypestring

The type of the component. Valid values:

  • text: a text component
  • image: an image component
  • caption: a caption component
text
Effectstring

The display effect for the component. Valid values:

  • none
  • animateH: horizontal scrolling
  • animateV: vertical scrolling
animateV
ImageLayerContentobject

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

MaterialIdstring

The ID of the material from the media library.

6cf724c6ebfd4a59b5b3cec6f10d****
LocationIdstring

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, for example, from RC01 to RC12.

RC01
TextLayerContentobject

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

BorderColorstring

The color of the text border. Valid values: 0x000000 to 0xffffff. If the value of this parameter is "", this parameter does not take effect.

0x000000
BorderWidthNormalizedfloat

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

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

0
Colorstring

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

0xff0000
FontNamestring

The font of the text, which is specified by the system. Valid values:

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

KaiTi
SizeNormalizedfloat

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

16
Textstring

The content of the text.

hello world
RequestIdstring

The request ID.

3be7ade8-d907-483c-b24a-0dad45******
Totalinteger

The total number of entries.

3

Examples

Sample success responses

JSONformat

{
  "Components": {
    "Component": [
      {
        "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": {
            "Position": [
              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-0dad45******",
  "Total": 3
}

Error codes

HTTP status codeError codeError message
400InvalidCasterId.Malformed%s
401IllegalOperation%s
404InvalidCaster.NotFound%s
500InternalError%s

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
No change history