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

Usage note

If the layout ID is provided in the request, the server returns the information of the specific layout. If no layout ID is provided, the server returns all the layouts.

QPS limit

A single user can perform a maximum of 10 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

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 DescribeCasterLayouts

The operation that you want to perform. Set this value to DescribeCasterLayouts.

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.
LayoutId String No 72d2ec7a-4cd7-4a01-974b-7cd53947****

The ID of the layout.

If you do not set this parameter, all layouts of the production studio are queried.

Response parameters

Parameter Type Example Description
RequestId String 3be7ade8-d907-483c-b24a-0dad4595beaf

The ID of the request.

Layouts Array of Layout

The list of layouts.

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

The ID of the layout.

VideoLayers Array of VideoLayer

Configuration list of the video layer, using the default array sequence.

VideoLayer
HeightNormalized Float 0.5

The normalized value of the height of the video layer image.

  • If the FillMode parameter of the video layer is none, the width 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 fit, you must set this parameter to a value greater than 0, which indicates the normalized value of the height of the section.
WidthNormalized Float 0.5

The normalized value of the width of the video layer image.

  • If the FillMode parameter of the video layer is 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 fit, you must set this parameter to a value greater than 0, which indicates the normalized value of the width of the section.
PositionNormalizeds List [0,3]

The normalized value of the [x,y] coordinates of the video layer in the production studio. The default coordinates are [0,0].

PositionRefer String topLeft

The reference coordinates of the video layer. Default value: topLeft. Valid values:

  • topLeft: the upper-left corner
  • topRight: the upper-right corner.
  • bottomLeft: the lower-left corner.
  • bottomRight: the lower-right corner.
  • center: the center position.
  • topCenter: the upper center position.
  • bottomCenter: the lower center position.
  • leftCenter: the left center position.
  • rightCenter: the right center position.
FillMode String fit

The scaling mode of the video layer. Default value: none. Valid values:

  • none: The image is not scaled to fill in the specified layout section. The video layer is set based on the image size of the video resource.
  • fit: The image is scaled with the original aspect ratio to fill in the specified layout section. The video layer is set based on the section size. The image is centered in the layout section, and the long side of the image is scaled to fit the length of the same side of the section. If the aspect ratio of the image is not the same as that of the section, the short side of the image may be shorter than that of the section. The area outside the image displays the next video layer or the background if no next video layer exists. By default, the background color is black.
FixedDelayDuration Integer 20

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.

AudioLayers Array of AudioLayer

Configuration list of the audio layer.

AudioLayer
VolumeRate Float 1

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

Note The default value is 0, which indicates that the elements in the audio layer are not scaled.
ValidChannel String all

The valid voice channels of the audio layer. Default value: all. Valid values:

  • leftChannel: the left channel.
  • rightChannel: the right channel.
  • all: both the left and right channels.
FixedDelayDuration Integer 20

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.

BlendList List "RV01", "RV02"

The location ID of the video layer in the production studio. The video layers specified by this parameter are in the same order as those specified by the VideoLayers parameter.

MixList List RV01

The location ID of the audio layer in the production studio. The audio layers specified by this parameter are in the same order as those specified by the AudioLayers parameter.

Total Integer 3

The total number of records that were returned.

Examples

Sample requests

http(s)://live.aliyuncs.com/?Action=DescribeCasterLayouts
&CasterId=9ff2d96b-37ef-40a3-8cb0-4c7b1e2e****
&<Common request parameters>

Sample success response

XML format

<DescribeCasterLayoutsResponse>
  <RequestId>3be7ade8-d907-483c-b24a-0dad4595beaf</RequestId>
  <Layouts>
        <Layout>
              <LayoutId>72d2ec7a-4cd7-4a01-974b-7cd53947****</LayoutId>
              <AudioLayers>
                    <AudioLayer>
                          <ValidChannel>all</ValidChannel>
                          <VolumeRate>1</VolumeRate>
                          <FixedDelayDuration>20</FixedDelayDuration>
                    </AudioLayer>
              </AudioLayers>
              <VideoLayers>
                    <VideoLayer>
                          <FillMode>fit</FillMode>
                          <HeightNormalized>0.5</HeightNormalized>
                          <PositionRefer>topLeft</PositionRefer>
                          <FixedDelayDuration>20</FixedDelayDuration>
                          <WidthNormalized>0.5</WidthNormalized>
                          <PositionNormalizeds>
                                <Position>[0,3]</Position>
                          </PositionNormalizeds>
                    </VideoLayer>
              </VideoLayers>
              <BlendList>
                    <LocationId>"RV01",  "RV02"</LocationId>
              </BlendList>
              <MixList>
                    <LocationId>RV01</LocationId>
              </MixList>
        </Layout>
  </Layouts>
  <Total>3</Total>
</DescribeCasterLayoutsResponse>

JSON format

{
    "RequestId": "3be7ade8-d907-483c-b24a-0dad4595beaf",
    "Layouts": {
        "Layout": [
            {
                "LayoutId": "72d2ec7a-4cd7-4a01-974b-7cd53947****",
                "AudioLayers": {
                    "AudioLayer": [
                        {
                            "ValidChannel": "all",
                            "VolumeRate": "1",
                            "FixedDelayDuration": "20"
                        }
                    ]
                },
                "VideoLayers": {
                    "VideoLayer": [
                        {
                            "FillMode": "fit",
                            "HeightNormalized": "0.5",
                            "PositionRefer": "topLeft",
                            "FixedDelayDuration": "20",
                            "WidthNormalized": "0.5",
                            "PositionNormalizeds": {
                                "Position": "[0,3]"
                            }
                        }
                    ]
                },
                "BlendList": {
                    "LocationId": "\"RV01\",  \"RV02\""
                },
                "MixList": {
                    "LocationId": "RV01"
                }
            }
        ]
    },
    "Total": "3"
}

Errors

For a list of error codes, visit the API Error Center.