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

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

The ID of the production studio.

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,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=LIVEPRODUCER_POST-cn-0pp1czt****
&<Common request parameters>

Sample success response

XML format

<DescribeCasterLayoutsResponse>
      <RequestId>3be7ade8-d907-483c-b24a-0dad4595beaf</RequestId>
      <Layouts>
            <MixList>RV01</MixList>
            <AudioLayers>
                  <ValidChannel>all</ValidChannel>
                  <VolumeRate>1</VolumeRate>
            </AudioLayers>
            <VideoLayers>
                  <HeightNormalized>0.5</HeightNormalized>
                  <PositionRefer>topLeft</PositionRefer>
                  <WidthNormalized>0.5</WidthNormalized>
                  <PositionNormalized>0</PositionNormalized>
                  <PositionNormalized>0.3</PositionNormalized>
            </VideoLayers>
            <VideoLayers>
                  <HeightNormalized>0.5</HeightNormalized>
                  <PositionRefer>topLeft</PositionRefer>
                  <WidthNormalized>0.5</WidthNormalized>
                  <PositionNormalized>0.5</PositionNormalized>
                  <PositionNormalized>0.3</PositionNormalized>
            </VideoLayers>
            <LayoutId>72d2ec7a-4cd7-4a01-974b-7cd53947f053</LayoutId>
            <BlendList>RV01</BlendList>
            <BlendList>RV02</BlendList>
      </Layouts>
      <Layouts>
            <MixList>RV01</MixList>
            <AudioLayers>
                  <ValidChannel>all</ValidChannel>
                  <VolumeRate>0.5</VolumeRate>
            </AudioLayers>
            <VideoLayers>
                  <HeightNormalized>1</HeightNormalized>
                  <PositionRefer>topLeft</PositionRefer>
                  <WidthNormalized>1</WidthNormalized>
                  <PositionNormalized>0</PositionNormalized>
                  <PositionNormalized>0</PositionNormalized>
            </VideoLayers>
            <VideoLayers>
                  <HeightNormalized>0.4</HeightNormalized>
                  <PositionRefer>topLeft</PositionRefer>
                  <WidthNormalized>0.4</WidthNormalized>
                  <PositionNormalized>0.1</PositionNormalized>
                  <PositionNormalized>0.1</PositionNormalized>
            </VideoLayers>
            <LayoutId>21926b36-7dd2-4fde-ae25-51b5bc8e52d8</LayoutId>
            <BlendList>RV01</BlendList>
            <BlendList>RV02</BlendList>
      </Layouts>
</DescribeCasterLayoutsResponse>

JSON format

{
    "RequestId": "3be7ade8-d907-483c-b24a-0dad4595beaf",
    "Layouts": [
        {
            "MixList": [
                "RV01"
            ],
            "AudioLayers": [
                {
                    "ValidChannel": "all",
                    "VolumeRate": 1
                }
            ],
            "VideoLayers": [
                {
                    "HeightNormalized": 0.5,
                    "PositionRefer": "topLeft",
                    "WidthNormalized": 0.5,
                    "PositionNormalized": [
                        0,
                        0.3
                    ]
                },
                {
                    "HeightNormalized": 0.5,
                    "PositionRefer": "topLeft",
                    "WidthNormalized": 0.5,
                    "PositionNormalized": [
                        0.5,
                        0.3
                    ]
                }
            ],
            "LayoutId": "72d2ec7a-4cd7-4a01-974b-7cd53947f053",
            "BlendList": [
                "RV01",
                "RV02"
            ]
        },
        {
            "MixList": [
                "RV01"
            ],
            "AudioLayers": [
                {
                    "ValidChannel": "all",
                    "VolumeRate": 0.5
                }
            ],
            "VideoLayers": [
                {
                    "HeightNormalized": 1,
                    "PositionRefer": "topLeft",
                    "WidthNormalized": 1,
                    "PositionNormalized": [
                        0,
                        0
                    ]
                },
                {
                    "HeightNormalized": 0.4,
                    "PositionRefer": "topLeft",
                    "WidthNormalized": 0.4,
                    "PositionNormalized": [
                        0.1,
                        0.1
                    ]
                }
            ],
            "LayoutId": "21926b36-7dd2-4fde-ae25-51b5bc8e52d8",
            "BlendList": [
                "RV01",
                "RV02"
            ]
        }
    ]
}

Errors

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