All Products
Search
Document Center

ApsaraVideo Live:ModifyCasterLayout

Last Updated:Dec 29, 2025

Modifies the layout configuration. You only need to pass the parameters that you want to modify.

Operation description

First, call the CreateCaster operation to create a production studio. Then, you can call this operation to modify the layout configuration. You only need to pass the parameters that you want to modify. This operation supports the `none` (default) and `fit` fill modes for elements.

QPS limit

The queries per second (QPS) limit for this operation is 10 calls per user. If you exceed this limit, API calls are throttled, which may affect your business. We recommend that you call this operation within the specified limit.

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:ModifyCasterLayout

update

*Caster

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

None None

Request parameters

Parameter

Type

Required

Description

Example

RegionId

string

No

The region ID.

cn-shanghai

VideoLayer

array<object>

Yes

The video information.

object

No

The video information.

FillMode

string

No

The fill mode of the element.

  • none (default): The original video frame size is used without scaling.

  • fit: Scales the video to fit the fill area while maintaining its original aspect ratio. The video is centered within the fill area. The longer edge of the video frame aligns with the corresponding edge of the fill area. If the aspect ratios do not match, the empty space along the shorter edge shows the layer below it. If no layer is below, the empty space is black.

fit

FixedDelayDuration

integer

No

The fixed delay for the video. Use this to synchronize captions. Unit: milliseconds. Default value: 0. Valid values: 0 to 5000.

5000

HeightNormalized

number

No

The normalized height of the layer element.

  • In none fill mode, the width is scaled proportionally based on this height. The default value is 0, which displays the original frame size.

  • In fit mode, this parameter is required and its value must be greater than 0. It specifies the normalized height of the fill area.

1

PositionNormalized

array

No

The normalized coordinates of the layer element, in the format [x,y]. The default value is [0,0].

Note

The x and y values must be normalized.

0.3

number

No

The normalized coordinates of the layer element, in the format [x,y]. The default value is [0,0].

Note

The x and y values must be normalized.

[0,3]

PositionRefer

string

No

The reference point for the element's position. Valid values:

  • topLeft (default): The top-left corner.

  • topRight: The top-right corner.

  • bottomLeft: The bottom-left corner.

  • bottomRight: The bottom-right corner.

  • center: The center.

  • topCenter: The top center.

  • bottomCenter: The bottom center.

  • leftCenter: The left center.

  • rightCenter: The right center.

topLeft

WidthNormalized

number

No

The normalized width of the layer element.

  • In none fill mode, the height is scaled proportionally based on this width. The default value is 0, which displays the original frame size.

  • In fit mode, this parameter is required and its value must be greater than 0. It specifies the normalized width of the fill area.

1

AudioLayer

array<object>

Yes

The audio information.

object

No

The audio information.

FixedDelayDuration

integer

No

The fixed delay for the audio. Use this to synchronize captions. Unit: milliseconds. Default value: 0. Valid values: 0 to 5000.

5000

ValidChannel

string

No

The audio channels used for volume input. Valid values:

  • leftChannel: The left channel.

  • rightChannel: The right channel.

  • all (default): Both channels.

all

VolumeRate

number

No

The normalized height ratio of the layer element. The width is scaled proportionally to maintain the aspect ratio.

The default value is 0. This value displays the element at its original size.

1

BlendList

array

Yes

The location ID of the video resource. This corresponds to the LocationId parameter.

For more information, see AddCasterVideoResource. The order of IDs in this list must match the order of elements in the VideoLayer list.

RV02

string

No

The location ID of the video resource. This corresponds to the LocationId parameter.

For more information, see AddCasterVideoResource. The order of IDs in this list must match the order of elements in the VideoLayer list.

RV02

MixList

array

Yes

The location ID of the audio resource. This corresponds to the LocationId parameter.

For more information, see AddCasterVideoResource. The order of IDs in this list must match the order of elements in the AudioLayer list.

RV02

string

No

The location ID of the audio resource. This corresponds to the LocationId parameter.

For more information, see AddCasterVideoResource. The order of IDs in this list must match the order of elements in the AudioLayer list.

RV02

CasterId

string

Yes

The ID of the production studio.

  • If you created the production studio using the CreateCaster operation, use the returned CasterId value.

  • If you created the production studio in the ApsaraVideo Live console, find the ID on the Production Studio > Cloud Production Studio page.

Note

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

LIVEPRODUCER_POST-cn-0pp1czt****

LayoutId

string

Yes

The layout ID. If you added the layout using the AddCasterLayout operation, use the returned LayoutId value.

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

Note

In the request parameters, N indicates the sequence number of an element. For example, VideoLayer.1.FillMode specifies the fill mode for the first element, and VideoLayer.2.FillMode specifies the fill mode for the second element.

Response elements

Element

Type

Description

Example

object

LayoutId

string

The layout ID. Use this ID to query the list of layouts for the production studio.

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

RequestId

string

The request ID.

16A96B9A-F203-4EC5-8E43-CB92E68F4CD8

Examples

Success response

JSON format

{
  "LayoutId": "21926b36-7dd2-4fde-ae25-51b5bc8e****",
  "RequestId": "16A96B9A-F203-4EC5-8E43-CB92E68F4CD8"
}

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.
400 InvalidUserId.Malformed %s, please check userId. The userId passed in is invalid, please check.
400 InvalidLayoutId.Malformed %s, please check and try again later. The LayoutId is invalid, please check and try again.
400 InvalidParameter.Malformed There are invalid parameters: %s. There are invalid parameters: %s.
400 InvalidVideoLayersAndBlendListSize.Mismatch %s, please check and try again later. The size of the VideoLayers does not match the size of the BlendList, please check and try again.
400 InvalidAudioLayersAndMixListSize.Mismatch %s, please check and try again later. The size of the AudioLayers does not match the size of the MixList, please check and try again.
400 InvalidPositionNormalized.Malformed %s, please check and try again later. The parameter PositionNormalized is invalid, please check and try again.
400 InvalidBlendList.ExceedNorm %s, please check and try again later. BlendList size exceeds specification, please check and try again.
400 InvalidMixList.ExceedNorm %s, please check and try again later. MixList size exceeds specification, please check and try again.
400 InvalidHeightOrWidthNormalized %s, please check and try again later. HeightNormalized or WidthNormalized parameters are invalid, please check and try again.
400 InvalidVideoLayersConfig %s, please check and try again later. The size of the VideoLayers does not match the size of the BlendList, please check and try again.
400 InvalidAudioLayersConfig %s, please check and try again later. The size of the AudioLayers does not match the size of the MixList, 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.
404 InvalidLayout.NotFound %s, please check and try again later. LayoutId does not exist, please check and try again.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.