DescribeCasterComponents

Updated at:

Queries the components of a production studio.

Operation description

Add a component to a production studio by calling the AddCasterComponent operation before calling this operation to query the components of the production studio.

QPS limit

The QPS limit for a single user is 15 queries per second. If the limit is exceeded, API calls are throttled, which may affect your services. Make API calls at a reasonable rate.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

live:DescribeCasterComponents

get

*Caster

acs:live:*:{#accountId}:caster/{#CasterId}

None None

Request parameters

Parameter

Type

Required

Description

Example

RegionId

string

No

The region ID.

cn-shanghai

CasterId

string

Yes

The ID of the production studio.

  • If you create a production studio by calling the CreateCaster operation, check the value of the CasterId parameter returned in the response.

  • If you create a production studio in the ApsaraVideo Live console, view the ID on the Production Studio > Cloud Production Studio page.

Note

The name of the production studio in the production studio list on the Cloud Production Studio page is the production studio ID.

LIVEPRODUCER_POST-cn-0pp1czt****

ComponentId

string

No

The ID of the component. If you add a component to a production studio by calling the AddCasterComponent operation, check the value of the ComponentId parameter returned in the response.

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

Response elements

Element

Type

Description

Example

object

Components

object

Component

array<object>

The list of components.

array<object>

CaptionLayerContent

object

The properties of the Caption element.

BorderColor

string

The color of the text border.

Valid values: 0x000000 to 0xffffff. Default value: "", which indicates that the value is invalid.

0x000000

BorderWidthNormalized

number

The normalized value of the text border width. The normalized value is calculated based on the font size, which is BorderWidth/FontSize.

If the value calculated by the system through denormalization exceeds 16, the value 16 is used. Default value: 0.

0

Color

string

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

0x000000

FontName

string

The font name. The value must be a system preset value. Valid values:

  • KaiTi: Kaiti.

  • AlibabaPuHuiTi-Regular: Alibaba PuHuiTi Regular.

  • AlibabaPuHuiTi-Bold: Alibaba PuHuiTi Bold.

  • NAlibabaPuHuiTi-Light: Alibaba PuHuiTi Light.

  • NotoSansHans-Regular: Noto Sans Regular.

  • NotoSansHans-Bold: Noto Sans Bold.

  • NotoSansHans-Light: Noto Sans Light.

Default value: KaiTi.

KaiTi

LineSpaceNormalized

number

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

0

LocationId

string

The location of the referenced video source, which is the IChannelId parameter. This parameter is valid only when the component type is caption.

RV01

PtsOffset

integer

The offset used to correct the deviation between the presentation timestamp (PTS) of the current subtitle and the PTS of the audio.

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

0

ShowSourceLan

boolean

Specifies whether to display the source language. Valid values:

  • true: Display the source language.

  • false (default): Do not display the source language.

false

SizeNormalized

number

The normalized font size. The font size is set to [font_size,output_height].

If the font size calculated by the system through denormalization is greater than 1024, the value 1024 is used. Default value: -1, which indicates that the value is invalid.

0.1

SourceLan

string

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

  • en: English.

  • cn (default): Chinese.

  • es: Spanish.

  • ru: Russian.

cn

TargetLan

string

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

  • en: English.

  • cn (default): Chinese.

  • es: Spanish.

  • ru: Russian.

cn

WordCountPerLine

integer

The maximum number of words displayed per line.

15

WordSpaceNormalized

number

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

0

WordsCount

integer

The number of displayed words. You can adjust this value based on the font size.

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

35

ComponentId

string

The ID of the component.

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

ComponentLayer

object

The size and layout information of the component layer.

HeightNormalized

number

The normalized height ratio of the layer element. The width of the element is scaled proportionally based on this height.

Default value: 0, which indicates that the element is displayed in its original size.

0.5

PositionNormalizeds

object

Position

array

The normalized position coordinates [x,y] of the layer element. Default value: [0,0].

Note

The x and y coordinates must be normalized.

number

The value.

0.3

PositionRefer

string

The reference coordinates for the position of the element. Valid values:

  • topLeft (default): Top left.

  • topRight: Top right.

  • bottomLeft: Bottom left.

  • bottomRight: Bottom right.

topLeft

Transparency

integer

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

0 indicates completely transparent. 255 (default) indicates completely opaque.

200

WidthNormalized

number

The normalized width ratio of the layer element. The height of the element is scaled proportionally based on this width. Default value: 0, which indicates that the element is displayed in its original size.

Note

This parameter conflicts with HeightNormalized. If both parameters are specified, only HeightNormalized takes effect. If they are specified separately, the later specified value overwrites the earlier one.

0.5

ComponentName

string

The name of the component. Default value: the component ID.

component_name

ComponentType

string

The type of the component. Valid values:

  • text: Text component.

  • image: Image component.

  • caption: Translated subtitle component.

text

Effect

string

The display effect of the component. Valid values:

  • none: None.

  • animateH: Horizontal scrolling.

  • animateV: Vertical scrolling.

animateV

ImageLayerContent

object

The properties of the Image element.

MaterialId

string

The ID of the media asset.

6cf724c6ebfd4a59b5b3cec6f10d****

LocationId

string

The location of the component.

You can set at most one component for each location. The value must be in the format of RC01 to RC12.

RC01

TextLayerContent

object

The properties of the Text element.

BorderColor

string

The color of the text border. Valid values: 0x000000 to 0xffffff. Default value: "", which indicates that the value is invalid.

0x000000

BorderWidthNormalized

number

The normalized value of the text border width. The normalized value is calculated based on the font size, which is BorderWidth/FontSize.

If the value calculated by the system through denormalization exceeds 16, the value 16 is used. Default value: 0.

0

Color

string

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

0xff0000

FontName

string

The font name. The value must be a system preset value. Valid values:

  • KaiTi: Kaiti.

  • AlibabaPuHuiTi-Regular: Alibaba PuHuiTi Regular.

  • AlibabaPuHuiTi-Bold: Alibaba PuHuiTi Bold.

  • NAlibabaPuHuiTi-Light: Alibaba PuHuiTi Light.

  • NotoSansHans-Regular: Noto Sans Regular.

  • NotoSansHans-Bold: Noto Sans Bold.

  • NotoSansHans-Light: Noto Sans Light.

Default value: KaiTi.

KaiTi

SizeNormalized

number

The normalized font size.

The font size is set to font_size/output_height. If the font size calculated by the system through denormalization is greater than 1024, the value 1024 is used. Default value: -1, which indicates that the value is invalid.

16

Text

string

The text content.

hello world

RequestId

string

The request ID.

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

Total

integer

The total number of entries.

3

Examples

Success response

JSON format

{
  "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 code

Error code

Error message

Description

400 InvalidCasterId.Malformed %s, please check and try again later. The parameter CasterId is invalid, please check and try again.
401 IllegalOperation %s, please check and try again later. Operation not allowed, please check and try again.
500 InternalError %s, please try again later. Internal error, please try again later.
404 InvalidCaster.NotFound %s, please check and try again later. The guide station does not exist, please check and try again.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.