DescribeStudioLayouts

Updated at:

Retrieves the layout settings of a virtual studio.

Operation description

First, add the layout settings of a virtual studio by calling the AddStudioLayout operation, and then call this operation to retrieve the layout settings.

QPS limits

The queries per second (QPS) limit for a single user is 15. 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:DescribeStudioLayouts

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 created the production studio by calling the CreateCaster operation, check the value of the CasterId parameter returned in the response.

  • If you created the production studio in the ApsaraVideo Live console, choose ApsaraVideo Live Console > Production Studios > Cloud Production Studios to view the ID.

Note
  • The name of the production studio in the production studio list on the Cloud Production Studios page of the ApsaraVideo Live console is the production studio ID.

  • Only virtual studio-type production studios (NormType=4) are supported. If you specify the ID of a production studio of another type, the InvalidCaster.NotFound error is returned. You can call the DescribeCasters operation and filter the results by setting NormType to 4 to obtain the ID of a virtual studio-type production studio.

5c6a2a0d-f228-4a64-af62-20e91b96****

LayoutId

string

No

The layout ID. Separate multiple layout IDs with commas (,). If you do not specify this parameter, all layouts under the production studio are returned.

If you added the layout settings for the virtual studio by calling the AddStudioLayout operation, check the value of the LayoutId parameter returned in the response.

445409ec-7eaa-461d-8f29-4bec2eb9****

Response elements

Element

Type

Description

Example

object

The layout information.

RequestId

string

The request ID.

5c6a2a0d-f228-4a64-af62-20e91b9676b3

StudioLayouts

array<object>

The layout information.

array<object>

The layout information.

BgImageConfig

object

The background resource configuration.

Id

string

The unique ID of the background material.

k12kj31****

ImageUrl

string

The URL of the material.

http://example.org

LocationId

string

The location ID.

RV01

MaterialId

string

The ID of the video-on-demand material.

asdfas9df89asd8f9****

CommonConfig

object

The general layout information. This field is returned when the layout is a general layout.

ChannelId

string

The ID of the channel location to which the video resource is bound.

RV01

VideoResourceId

string

The ID of the video resource.

asdfasdfasdfasdfa****

LayerOrderConfigList

array<object>

The layer order configuration.

object

The layer order configuration.

Id

string

The unique ID of the resource.

k12kj31****

Type

string

The type of the resource configuration. Valid values:

  • background: background material.

  • media: multimedia material.

media

LayoutId

string

The ID of the studio layout.

445409ec-7eaa-461d-8f29-4bec2eb9****

LayoutName

string

The name of the studio layout.

test

LayoutType

string

The type of the studio layout. Valid values:

  • common: general layout.

  • studio: studio layout.

studio

MediaInputConfigList

array<object>

The multimedia input resource configuration.

object

The multimedia input source configuration.

ChannelId

string

The ID of the channel location to which the video resource is bound.

RV01

FillMode

string

The fill mode. Default value: none.

none

HeightNormalized

number

The normalized height of the material, which is the ratio of the material height to the background height. Valid values: 0 to 1.

0.4

Id

string

The unique ID of the multimedia material.

k12kj31****

ImageMaterialId

string

The ID of the video-on-demand image material.

lkajsdfsa8fd89asd8****

Index

integer

The serial number of the multimedia material. This parameter is used for frontend display and has no logical effect.

1

PositionNormalized

array

The normalized coordinates of the fill area for the material, in the [x,y] format. Valid values of x and y: 0 to 1. For example, [0.1,0.2] indicates a horizontal offset of 10% and a vertical offset of 20% from the upper-left corner.

number

The normalized coordinates of the fill area for the material, in the [x,y] format. Valid values of x and y: 0 to 1. For example, [0.1,0.2] indicates a horizontal offset of 10% and a vertical offset of 20% from the upper-left corner.

0.1

PositionRefer

string

The reference coordinates for the material position. Default value: topLeft, which indicates that the upper-left corner is used as the reference point for position settings.

topLeft

VideoResourceId

string

The ID of the video resource.

asdfasdfasdfasdfa****

WidthNormalized

number

The normalized width of the material, which is the ratio of the material width to the background width. Valid values: 0 to 1.

0.4

ScreenInputConfigList

array<object>

The chroma key input configuration.

array<object>

The chroma key input configuration.

AudioConfig

object

The audio configuration.

ValidChannel

string

The corresponding channel.

1

VolumeRate

number

The volume.

1.0

ChannelId

string

The ID of the channel location to which the video resource is bound.

RV01

Color

string

The chroma key color. Valid values:

  • blue: blue screen background.

  • green: green screen background.

  • auto: automatic recognition.

  • complex: real-scene matting.

green

HeightNormalized

number

The normalized height, which is the ratio of the extracted portrait height to the background height. Valid values: 0 to 1.

0.4

Id

string

The unique ID of the chroma key source material.

k12kj31****

Index

integer

The serial number of the chroma key source. This parameter is used for frontend display and has no logical effect.

1

OnlyAudio

boolean

Specifies whether only audio is included.

true

PortraitType

integer

The portrait type. Valid values:

  • 0: half-body.

  • 1: full-body.

0

PositionX

string

The x-coordinate of the position. Valid values: 0 to 1. The upper-left corner is used as the reference point for the material position.

0.1

PositionY

string

The y-coordinate of the position. Valid values: 0 to 1. The upper-left corner is used as the reference point for the material position.

0.2

VideoResourceId

string

The ID of the video resource.

asdfasdfasdfasdfa****

Total

integer

The total number of layouts.

1

Examples

Success response

JSON format

{
  "RequestId": "5c6a2a0d-f228-4a64-af62-20e91b9676b3",
  "StudioLayouts": [
    {
      "BgImageConfig": {
        "Id": "k12kj31****",
        "ImageUrl": " http://example.org",
        "LocationId": "RV01",
        "MaterialId": "asdfas9df89asd8f9****"
      },
      "CommonConfig": {
        "ChannelId": "RV01",
        "VideoResourceId": "asdfasdfasdfasdfa****"
      },
      "LayerOrderConfigList": [
        {
          "Id": "k12kj31****",
          "Type": "media"
        }
      ],
      "LayoutId": "445409ec-7eaa-461d-8f29-4bec2eb9****",
      "LayoutName": "test",
      "LayoutType": "studio",
      "MediaInputConfigList": [
        {
          "ChannelId": "RV01",
          "FillMode": "none",
          "HeightNormalized": 0.4,
          "Id": "k12kj31****",
          "ImageMaterialId": "lkajsdfsa8fd89asd8****",
          "Index": 1,
          "PositionNormalized": [
            0.1
          ],
          "PositionRefer": "topLeft",
          "VideoResourceId": "asdfasdfasdfasdfa****",
          "WidthNormalized": 0.4
        }
      ],
      "ScreenInputConfigList": [
        {
          "AudioConfig": {
            "ValidChannel": "1",
            "VolumeRate": 1
          },
          "ChannelId": "RV01",
          "Color": "green",
          "HeightNormalized": 0.4,
          "Id": "k12kj31****",
          "Index": 1,
          "OnlyAudio": true,
          "PortraitType": 0,
          "PositionX": "0.1",
          "PositionY": "0.2",
          "VideoResourceId": "asdfasdfasdfasdfa****"
        }
      ]
    }
  ],
  "Total": 1
}

Error codes

HTTP status code

Error code

Error message

Description

400 InvalidUserId.Malformed %s, please check userId. The userId passed in is invalid, please check.
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.