Adds a layout for a production studio.
Operation description
First, create a director desk and add video resources to the director desk, then call this interface to add the director desk layout. To create a director desk using the API, refer to Create Director Desk.
QPS Limitation
The per-user QPS limit for this interface is 10 times/second. Exceeding this limit will result in API calls being throttled, which may impact your business operations. Please use the API reasonably. For more information, see QPS Limitation.
Debugging
Authorization information
The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action
policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:
- Operation: the value that you can use in the Action element to specify the operation on a resource.
- Access level: the access level of each operation. The levels are read, write, and list.
- Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
- The required resource types are displayed in bold characters.
- If the permissions cannot be granted at the resource level,
All Resources
is used in the Resource type column of the operation.
- Condition Key: the condition key that is defined by the cloud service.
- Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
Operation | Access level | Resource type | Condition key | Associated operation |
---|---|---|---|---|
live:AddCasterLayout | create | *Caster acs:live:*:{#accountId}:caster/{#CasterId} |
| none |
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
VideoLayer | array<object> | Yes | Video layout. | |
object | Yes | Video layout. | ||
FillMode | string | No | The scaling mode of video layer N. Valid values:
| fit |
FixedDelayDuration | integer | No | The fixed delay of video layer N. You can use this parameter to synchronize the video with subtitles. Unit: milliseconds. Valid values: 0 to 5000. Default value: 0. | 5000 |
HeightNormalized | float | No | The normalized value of the height of the image of video layer N.
| 1 |
PositionNormalized | array | No | The normalized value of the Note
The coordinates indicate the location of video layer N in the production studio. Set this parameter to the normalized value of the coordinates.
| |
float | No | value. | 0 | |
PositionRefer | string | No | The reference coordinates of video layer N in the production studio. Valid values:
| topLeft |
WidthNormalized | float | No | The normalized value of the width of the image of video layer N.
| 1 |
AudioLayer | array<object> | Yes | Audio layout. | |
object | Yes | Audio layout. | ||
FixedDelayDuration | integer | No | The fixed delay of audio layer N. You can use this parameter to synchronize the audio with subtitles. Unit: milliseconds. Valid values: 0 to 5000. Default value: 0. | 5000 |
ValidChannel | string | No | The valid voice channels of audio layer N. Valid values:
| all |
VolumeRate | float | No | The multiples of the original volume at which audio layer N plays audio streams. Valid values: 0 to 10.0.
| 1.0 |
BlendList | array | Yes | The element represents the location ID of the video resource, i.e., LocationId. Refer to Adding Video Source for LocationId, which corresponds in order with the VideoLayers elements. | |
string | Yes | LocationId. | RV01 | |
MixList | array | Yes | The element represents the location ID of the audio resource, i.e., LocationId. LocationId is referred to in Adding Video Source, and corresponds in order with the AudioLayers elements. | |
string | Yes | LocationId. | RV01 | |
CasterId | string | Yes | The ID of the production studio. If you create a production studio through the CreateCaster interface, check the value of the CasterId parameter in the response. If you create a production studio through the ApsaraVideo Live Console, log in to the console, then check the ID of the production studio through the following path: Production Studios > Production Studio Management Note
The CasterId is reflected in the Name column on the Production Studio Management page.
| LIVEPRODUCER_POST-cn-0pp1czt**** |
Response parameters
Examples
Sample success responses
JSON
format
{
"LayoutId": "21926b36-7dd2-4fde-ae25-51b5bc8e****",
"RequestId": "16A96B9A-F203-4EC5-8E43-CB92E68F****"
}
Error codes
HTTP status code | Error code | Error message |
---|---|---|
400 | MissingParameter | %s |
400 | InvalidParameter.Malformed | %s |
400 | InvalidCasterId.Malformed | %s |
400 | InvalidVideoLayersAndBlendListSize.Mismatch | %s |
400 | InvalidAudioLayersAndMixListSize.Mismatch | %s |
400 | InvalidUserId.Malformed | %s |
400 | InvalidBlendList.ExceedNorm | %s |
400 | InvalidMixList.ExceedNorm | %s |
400 | InvalidPositionNormalized.Malformed | %s |
400 | InvalidHeightOrWidthNormalized | %s |
401 | IllegalOperation | %s |
404 | InvalidCaster.NotFound | %s |
500 | InternalError | %s |
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|