Modifies the layout of a production studio.
Operation description
You can call this API to modify the layout of a production studio. When you modify layout settings, pass only the parameters that you want to change.
QPS limit
The queries per second (QPS) limit for this API is 10 calls per second for each user. If you exceed the limit, API calls are throttled. This may affect your business. We recommend that you adhere to this limit.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
live:ModifyStudioLayout |
update |
*Caster
|
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. Important You must create a production studio of the virtual studio type in advance.
Note
The name of the production studio in the list on the Cloud Production Studio page is the production studio ID. |
a2b8e671-2fe5-4642-a2ec-bf93880e**** |
| LayoutId |
string |
Yes |
The layout ID. If you add a layout for the production studio by calling the AddStudioLayout API, view the value of the LayoutId parameter in the response. |
445409ec-7eaa-461d-8f29-4bec2eb9**** |
| LayoutName |
string |
No |
The name of the production studio layout. |
测试布局 |
| CommonConfig |
string |
No |
The common layout configuration. The value is a JSON string. For more information, see CommonConfig. Important This parameter is required only when LayoutType is set to common.
|
{ "ChannelId":"RV01" } |
| BgImageConfig |
string |
No |
The background resource configuration. The value is a JSON string. For more information, see BgImageConfig. Important This parameter is required only when LayoutType is set to studio.
|
{ "Id":"k12kj31****", "MaterialId":"f080575eb5f4427684fc0715159a****" } |
| ScreenInputConfigList |
string |
No |
The chroma keying input settings. The value is a JSON string. For more information, see ScreenInputConfig. Important This parameter is required only when LayoutType is set to studio.
|
[ { "Index":"1", "ChannelId":"RV01", "Color":"green", "PositionX":"0.1", "PositionY":"0.2", "HeightNormalized":"0.4" } ] |
| MediaInputConfigList |
string |
No |
The multimedia input resource settings. The value is a JSON string. For more information, see MediaInputConfig. Important This parameter is valid and optional only when LayoutType is set to studio.
|
[ { "Id":"k12kj31****", "Index":"1", "ChannelId":"RV01", "FillMode":"none", "PositionRefer":"topLeft", "WidthNormalized":"0.4", "HeightNormalized":"0.4", "PositionNormalized":"[0.1, 0.2]" }, { "Id":"k12kj31****", "Index":"2", "ImageMaterialId":"lkajsdfsa8fd89asd8****", "FillMode":"none", "PositionRefer":"topLeft", "WidthNormalized":"0.6", "HeightNormalized":"0.4", "PositionNormalized":"[0.1, 0.2]" } ] |
| LayerOrderConfigList |
string |
No |
The layer order settings. The value is a JSON string. For more information, see layerOrderConfig. You can sort background and multimedia materials. Chroma keying layers are not supported for sorting. The earlier a layer appears in the list, the lower it is in the stack. |
[ { "Type":"media", "Id":"k12kj31****" }, { "Type":"media", "Id":"k12kj31****" } ] |
CommonConfig
| Name | Type | Example | Description |
| ChannelId | String | RV01 | The ID of the channel to which the video resource is attached. |
BgImageConfig
You can specify only one of ImageUrl and MaterialId.
ScreenInputConfig
| Name | Type | Example | Description |
| Index | Integer | 1 | The number of the chroma keying source. This is used for frontend display and has no logical function. The value must be a positive integer (>0). |
| ChannelId | String | RV01 | The ID of the channel to which the video resource is attached. |
| Color | String | green | The chroma keying color space. Valid values: blue: Blue screen background. green: Green screen background. auto: Automatic detection. complex: Real-world chroma keying. |
| PositionX | Float | 0.1 | The x-coordinate. Valid values: [0,1]. The position is relative to the top-left corner. |
| PositionY | Float | 0.2 | The y-coordinate. Valid values: [0,1]. The position is relative to the top-left corner. |
| HeightNormalized | Float | 0.4 | The normalized height. This is the height ratio of the keyed figure to the background. Valid values: [0,1]. |
MediaInputConfig
If the multimedia material is a video source, specify ChannelId.
If the multimedia material is an image, specify ImageMaterialId.
ChannelId and ImageMaterialId are mutually exclusive. Specify only one of them.
| Name | Type | Example | Description |
| Id | String | k12kj31**** | The unique ID of the multimedia material. |
| Index | Integer | 1 | The number of the multimedia material. This is used for frontend display and has no logical function. The value must be a positive integer (>0). |
| ChannelId | String | RV01 | The ID of the channel to which the video resource is attached. |
| ImageMaterialId | String | lkajsdfsa8fd89asd8**** | The ID of the VOD image material. |
| FillMode | String | none | The fill type. Set this parameter to none. |
| PositionRefer | String | topLeft | The reference point for the material's position. Set this parameter to topLeft. This indicates that the position is relative to the top-left corner. |
| WidthNormalized | Float | 0.4 | The normalized width of the material. This is the width ratio of the material to the background. Valid values: [0,1]. |
| HeightNormalized | Float | 0.4 | The normalized height of the material. This is the height ratio of the material to the background. Valid values: [0,1]. |
| PositionNormalized | Float | [0.1, 0.2] | The normalized position [x,y] of the material's fill area. The valid values for x and y are [0,1]. For example, [0.1, 0.2] indicates a horizontal offset of 10% and a vertical offset of 20% from the top-left corner. |
layerOrderConfig
| Name | Type | Example | Description |
| Id | String | k12kj31**** | The unique ID of the resource. |
| Type | String | media | The type of the resource configuration. background: Background material. media: Multimedia material. |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| RequestId |
string |
The request ID. |
5c6a2a0d-f228-4a64-af62-20e91b9676b3 |
Examples
Success response
JSON format
{
"RequestId": "5c6a2a0d-f228-4a64-af62-20e91b9676b3"
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | MissingParameter | %s | |
| 400 | InvalidParameter.Malformed | %s | |
| 400 | InvalidCasterId.Malformed | %s | |
| 400 | InvalidUserId.Malformed | %s | |
| 400 | InvalidPositionNormalized.Malformed | %s | |
| 400 | InvalidHeightOrWidthNormalized | %s | |
| 401 | IllegalOperation | %s | |
| 500 | InternalError | %s | |
| 404 | InvalidCaster.NotFound | %s | |
| 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.