Adds a layout to a production studio.
Operation description
Before you call this operation, you must create a production studio and add video sources. For more information about how to create a production studio, see CreateCaster.
QPS limits
The queries per second (QPS) limit for this operation is 10 calls per second per user. API calls that exceed this limit are throttled, which may affect your business. Do not exceed this limit.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
live:AddCasterLayout |
create |
*Caster
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| RegionId |
string |
No |
The region ID. |
cn-shanghai |
| VideoLayer |
array<object> |
Yes |
The video layouts. |
|
|
object |
No |
The video layout. |
||
| FillMode |
string |
No |
The fill mode of the element. Valid values:
|
fit |
| FixedDelayDuration |
integer |
No |
The fixed latency for the video layer. Use this parameter to synchronize the video with captions. Unit: milliseconds. Default value: 0. Valid values: 0 to 5000. |
5000 |
| HeightNormalized |
number |
No |
The normalized height of the layer.
|
1 |
| PositionNormalized |
array |
No |
The position of the video layer. The value is a normalized coordinate Note: The x and y coordinates must be normalized. |
0.3 |
|
number |
No |
The value. |
0 |
|
| PositionRefer |
string |
No |
The reference point for the position of the layer. Valid values:
|
topLeft |
| WidthNormalized |
number |
No |
The normalized width of the layer.
|
1 |
| AudioLayer |
array<object> |
Yes |
The audio layouts. |
|
|
object |
No |
The audio layout. |
||
| FixedDelayDuration |
integer |
No |
The fixed latency for the audio layer. Use this parameter to synchronize the audio with captions. Unit: milliseconds. Default value: 0. Valid values: 0 to 5000. |
5000 |
| ValidChannel |
string |
No |
The sound channels that are used for audio input. Valid values:
|
all |
| VolumeRate |
number |
No |
The volume multiplication factor for the audio stream. Valid values: 0 to 10.0.
|
1.0 |
| BlendList |
array |
Yes |
The location IDs of the video sources. The order of the location IDs corresponds to the order of the video layers specified in the VideoLayer parameter. For more information about location IDs, see AddCasterVideoResource. For LocationId, see Add a video source. This ID corresponds to the order of the VideoLayers elements. |
RV01 |
|
string |
No |
The location ID. |
RV01 |
|
| MixList |
array |
Yes |
The location IDs of the audio sources. The order of the location IDs corresponds to the order of the audio layers specified in the AudioLayer parameter. For more information about location IDs, see AddCasterVideoResource. For `LocationId`, see Add a video source. It corresponds to the order of the `AudioLayers` elements. |
RV01 |
|
string |
No |
The location ID. |
RV01 |
|
| CasterId |
string |
Yes |
The ID of the production studio.
Note
The name of the production studio on the Cloud Production Studio page is the ID of the production studio. |
LIVEPRODUCER_POST-cn-0pp1czt**** |
In the request parameters, N represents the sequence number of an element. For example, VideoLayer.N.FillMode specifies the fill mode for the Nth video layer. VideoLayer.1.FillMode specifies the fill mode for the first video layer, and VideoLayer.2.FillMode specifies the fill mode for the second video layer.
Response parameters
|
Parameter |
Type |
Description |
Example |
|
object |
|||
| LayoutId |
string |
The ID of the layout. You can use this ID as a request parameter when you call operations to manage layouts, such as deleting, modifying, or querying layouts for a production studio or a virtual studio. |
21926b36-7dd2-4fde-ae25-51b5bc8e**** |
| RequestId |
string |
The request ID. |
16A96B9A-F203-4EC5-8E43-CB92E68F**** |
Examples
Success response
JSON format
{
"LayoutId": "21926b36-7dd2-4fde-ae25-51b5bc8e****",
"RequestId": "16A96B9A-F203-4EC5-8E43-CB92E68F****"
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 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 | |
| 500 | InternalError | %s | |
| 404 | InvalidCaster.NotFound | %s |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.