ModifyCasterLayout
Modifies a layout configuration. Only the items to be modified need to be passed. Items that do not require modification do not need to be included.
Operation description
Create a production studio by calling the CreateCaster operation first, and then call this operation to modify the layout configuration. Only the items to be modified need to be passed. Items that do not require modification do not need to be included. This operation currently supports the following element fill modes: default and adaptive.
QPS limit
The single-user QPS limit for this operation is 10 calls per second. If the limit is exceeded, the API call is throttled, which may affect your business. Call this operation appropriately.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
live:ModifyCasterLayout |
update |
*Caster
|
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 element fill mode.
|
fit |
| FixedDelayDuration |
integer |
No |
The fixed delay for the video. This can be used for subtitle synchronization. Unit: milliseconds. Default value: 0. Valid values: 0 to 5000. |
5000 |
| HeightNormalized |
number |
No |
The normalized height ratio of the Layer element.
|
1 |
| PositionNormalized |
array |
No |
The normalized position values Note
Note: The x and y values must be normalized. |
0.3 |
|
number |
No |
The normalized position values Note
Note: The x and y values must be normalized. |
0.5 |
|
| PositionRefer |
string |
No |
The reference coordinate for the position of the element. Valid values:
|
topLeft |
| WidthNormalized |
number |
No |
The normalized width ratio of the Layer element.
|
1 |
| AudioLayer |
array<object> |
Yes |
The audio information. |
|
|
object |
No |
The audio information. |
||
| FixedDelayDuration |
integer |
No |
The fixed delay for the audio. This can be used for subtitle synchronization. Unit: milliseconds. Default value: 0. Valid values: 0 to 5000. |
5000 |
| ValidChannel |
string |
No |
The audio channels that can be used as volume input. Valid values:
|
all |
| VolumeRate |
number |
No |
The normalized height ratio of the Layer element. The width of the element is proportionally scaled based on this height. Default value: 0, which indicates that the element is displayed at its original size. |
1 |
| BlendList |
array |
Yes |
The location ID (LocationId) of the video resource element. For the LocationId, see Add a video source. The elements correspond to the VideoLayers elements in order. |
RV02 |
|
string |
No |
The location ID (LocationId) of the video resource element. For the LocationId, see Add a video source. The elements correspond to the VideoLayers elements in order. |
RV02 |
|
| MixList |
array |
Yes |
The location ID (LocationId) of the audio resource element. For the LocationId, see Add a video source. The elements correspond to the AudioLayers elements in order. |
RV02 |
|
string |
No |
The location ID (LocationId) of the audio resource element. For the LocationId, see Add a video source. The elements correspond to the AudioLayers elements in order. |
RV02 |
|
| CasterId |
string |
Yes |
The production studio ID.
Note
The production studio name in the production studio list on the Cloud Production Studio page of the ApsaraVideo Live console is the production studio ID. |
LIVEPRODUCER_POST-cn-0pp1czt**** |
| LayoutId |
string |
Yes |
The layout ID. If you added the production studio layout by calling the AddCasterLayout operation, check the LayoutId parameter returned by the AddCasterLayout operation. |
21926b36-7dd2-4fde-ae25-51b5bc8e**** |
N in the request parameters indicates the sequence number of the element. For example, VideoLayer.N.FillMode specifies the fill mode of the Nth element. VideoLayer.1.FillMode specifies the fill mode of the first element, and VideoLayer.2.FillMode specifies the fill mode of the second element.
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| LayoutId |
string |
The layout ID. This can be used as a request parameter to query the list of production studio layouts. |
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.