All Products
Search
Document Center

ApsaraVideo Live:DescribeCasterLayouts

Last Updated:Nov 14, 2024

Queries a specific layout or all layouts of a production studio.

Operation description

You can call this operation to query layouts of a production studio. If no layout ID is specified, the operation returns all layouts 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. For more information, see QPS limits.

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:DescribeCasterLayoutsget
*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****
LayoutIdstringNo

The ID of the layout.

If you do not specify a layout ID, all layouts of the production studio are queried.

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

Response parameters

ParameterTypeDescriptionExample
object
Layoutsarray<object>

The layouts.

Layoutobject
AudioLayersarray<object>

The configurations of the audio layers.

AudioLayerobject
FixedDelayDurationinteger

The fixed delay of the audio layer. This parameter is used to synchronize the audio with subtitles.

Unit: milliseconds. Default value: 0. Valid values: 0 to 5000.

20
ValidChannelstring

The sound channels that are used for volume input in the audio layer. Valid values:

  • leftChannel: the left channel
  • rightChannel: the right channel
  • all (default): both the left and right channels
all
VolumeRatefloat

The normalized value of the height of the audio layer. The width of the audio layer is proportionally scaled based on this parameter.

Note The default value is 0, which indicates that the audio layer is not scaled.
1
BlendListarray

The location IDs of the video layers, which are in the same order as the video layers.

LocationIdstring

The location ID.

List of location associations, maintaining the same order as VideoLayers.
LayoutIdstring

The ID of the layout.

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

The location IDs of the audio layers, which are in the same order as the audio layers.

LocationIdstring

The location ID.

RV01
VideoLayersarray<object>

The configurations of the video layers, which are in the default array sequence.

VideoLayerobject
FillModestring

The scaling mode of the video layer. Valid values:

  • none (default): specifies that the video layer is not scaled. The video layer is displayed based on its original size.
  • fit: specifies that the video layer is adapted to the fill area. The video layer is displayed based on the fill area. In this case, the video layer is scaled proportionally, with its original aspect ratio retained. The video layer is placed in the center, with its longer sides aligned with the fill area. If the aspect ratio of the video layer is different from that of the fill area, the content of the lower layer is displayed alongside the shorter sides. If there is no lower layer, black bars are displayed instead.
fit
FixedDelayDurationinteger

The fixed delay of the video layer. This parameter is used to synchronize the video with subtitles.

Unit: milliseconds. Default value: 0. Valid values: 0 to 5000.

20
HeightNormalizedfloat

The normalized value of the height of the video layer.

  • If the FillMode parameter of the video layer is set to none, the width of the video layer is proportionally scaled based on this parameter. The default value is 0, which indicates that the video layer is not scaled.
  • If the FillMode parameter of the video layer is set to fit, the value of this parameter is greater than 0.
0.5
PositionNormalizedsarray

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

Note The values of x and y are normalized.
Positionfloat

The value.

The normalized value of the `[x,y]` coordinates of the video layer in the production studio. The default coordinates are `[0,0]`. > The coordinates indicate the location of the video layer in the production studio. The value of the parameter is normalized.
PositionReferstring

The reference coordinates of the video layer. Valid values:

  • topLeft (default): the upper-left corner
  • topRight: the upper-right corner
  • bottomLeft: the lower-left corner
  • bottomRight: the lower-right corner
  • center: the center
  • topCenter: the upper center
  • bottomCenter: the lower center
  • leftCenter: the left center
  • rightCenter: the right center
topLeft
WidthNormalizedfloat

The normalized value of the width of the video layer.

  • If the FillMode parameter of the video layer is set to none, the height of the video layer is scaled based on this parameter. The default value is 0, which indicates that the video layer is not scaled.
  • If the FillMode parameter of the video layer is set to fit, the value of this parameter is greater than 0.
0.5
RequestIdstring

The request ID.

The normalized value of the width of the video layer image. * If the FillMode parameter of the video layer is set to none, the height of the video image is scaled based on this parameter. The default value is **0**, which indicates that the video image is displayed in the original size. * If the FillMode parameter of the video layer is set to fit, the value of the parameter is greater than **0**.
Totalinteger

The total number of entries.

3

Examples

Sample success responses

JSONformat

{
  "Layouts": {
    "Layout": [
      {
        "AudioLayers": {
          "AudioLayer": [
            {
              "FixedDelayDuration": 20,
              "ValidChannel": "all",
              "VolumeRate": 1
            }
          ]
        },
        "BlendList": {
          "LocationId": [
            "List of location associations, maintaining the same order as VideoLayers."
          ]
        },
        "LayoutId": "72d2ec7a-4cd7-4a01-974b-7cd53947****",
        "MixList": {
          "LocationId": [
            "RV01"
          ]
        },
        "VideoLayers": {
          "VideoLayer": [
            {
              "FillMode": "fit",
              "FixedDelayDuration": 20,
              "HeightNormalized": 0.5,
              "PositionNormalizeds": {
                "Position": [
                  0
                ]
              },
              "PositionRefer": "topLeft",
              "WidthNormalized": 0.5
            }
          ]
        }
      }
    ]
  },
  "RequestId": "The normalized value of the width of the video layer image.\n\n*   If the FillMode parameter of the video layer is set to none, the height of the video image is scaled based on this parameter. The default value is **0**, which indicates that the video image is displayed in the original size.\n*   If the FillMode parameter of the video layer is set to fit, the value of the parameter is greater than **0**.\n",
  "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