Updates an RTC cloud recording task.
Operation description
Single-stream recording supports updating subscription parameters. Stream mixing recording supports updating only the subscribed user streams.
QPS limit
The single-user QPS limit for this operation is 50 calls per second. If this limit is exceeded, the API call is throttled, which may affect your business. Call this operation as needed.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
live:UpdateRtcCloudRecording |
update |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| TaskId |
string |
Yes |
The task ID. This ID is returned by StartRtcCloudRecording. Only tasks in the running or abnormal state can be updated. |
******73-8501-****-8ac1-72295a****** |
| SubscribeParams |
object |
Yes |
The updated subscription parameters. |
|
| SubscribeUserIdList |
array<object> |
Yes |
The list of subscribed UserId entries. In single-stream recording mode, each UserId is recorded separately. In stream mixing recording mode, the audio and video of all UserIds are mixed into a single set of audio and video. Note
|
|
|
object |
No |
The information about the subscribed UserId. |
||
| UserId |
string |
Yes |
The subscribed UserId. |
userA |
| StreamType |
integer |
No |
The media type of the subscribed UserId. Valid values:
Valid values:
|
0 |
| SourceType |
integer |
No |
The video input stream type of the UserId. This parameter takes effect only when the video stream is subscribed (StreamType=2). Valid values:
Valid values:
|
0 |
| MixLayoutParams |
object |
No |
The updated layout parameters. Leave this parameter empty in single-stream recording mode. This parameter is required in stream mixing recording mode when the transcoding output is not audio-only. |
|
| MixBackground |
object |
No |
The global background image for stream mixing. |
|
| RenderMode |
integer |
No |
The display mode for the output. Valid values:
Valid values:
|
0 |
| Url |
string |
No |
The URL of the background image. The maximum length is 2048 characters. |
https://xxxx.com/photos/my-test-picture.png |
| UserPanes |
array<object> |
No |
The window layout information of the subscribed users. Only UserIds with layout information configured are placed in the output. This parameter is required in stream mixing mode when recording non-audio-only files. |
|
|
array<object> |
No |
The window configuration in the output. |
||
| UserId |
string |
No |
The UserId corresponding to this window.
|
userA |
| SourceType |
integer |
No |
The video input stream type of the UserId. If UserId is not specified, the SourceType setting is ignored. Valid values:
The combination of UserId and SourceType specified here must be included in SubscribeUserIdList. Valid values:
|
0 |
| Height |
string |
No |
The pane height as a normalized percentage. The value must be in the range of [0, 1]. (Default: 0). |
0.5 |
| Width |
string |
No |
The pane width as a normalized percentage. The value must be in the range of [0, 1]. (Default: 0). |
0.5 |
| X |
string |
No |
The X coordinate as a normalized percentage. The value must be in the range of [0, 1]. (Default: 0). |
0 |
| Y |
string |
No |
The Y coordinate as a normalized percentage. The value must be in the range of [0, 1]. (Default: 0). |
0 |
| ZOrder |
integer |
No |
The stacking order. 0 is the bottom layer, layer 1 is above layer 0, and so on. (Default: 0). |
0 |
| SubBackground |
object |
No |
The sub-pane background image. When a user turns off the camera, has not started stream ingest after joining, or leaves the channel midway, the corresponding image fills the layout position. |
|
| RenderMode |
integer |
No |
The display mode for the sub-pane output. Valid values:
Valid values:
|
0 |
| Url |
string |
No |
The URL of the background image. The maximum length is 2048 characters. |
https://xxxx.com/photos/my-test-pane-picture.png |
-
Subscribing to both the camera and screen sharing streams of the same UserId at the same time is supported. In single-stream recording mode, if you want to subscribe to both the camera and screen sharing streams of the same UserId, FileNamePattern and SliceNamePattern must include the SourceType variable to avoid recording files from overwriting each other.
-
In single-stream recording mode, subscribing to a video-only stream of a specific UserId is not supported. That is, in single-stream mode, UserInfo.StreamType cannot be set to 2.
-
To record only the screen stream of a UserId without audio, either subscribe to the video-only stream of the UserId and set SourceType to 1 (not supported in single-stream recording mode), or subscribe to the original stream of the UserId and push only the screen stream without pushing audio or with audio muted during stream ingest. To record both the screen stream and audio stream of a UserId, either subscribe to the original stream of the UserId and push only the screen stream along with the audio stream during stream ingest, or subscribe to the video-only stream of the UserId with SourceType set to 1 (not supported in single-stream recording mode) and also subscribe to the audio-only stream of the same UserId.
-
In single-stream recording mode, if RecordParams.StreamType is audio-only (value 1), SubscribeParams must not contain any video-only subscriptions (value 2). If RecordParams.StreamType is video-only (value 2), SubscribeParams must not contain any audio-only subscriptions (value 1).
-
In stream mixing recording mode, if RecordParams.StreamType is audio-only (value 1), not all UserIds in SubscribeParams can be subscribed as video-only (value 2). If RecordParams.StreamType is video-only (value 2), not all UserIds in SubscribeParams can be subscribed as audio-only (value 1).
Response elements
|
Element |
Type |
Description |
Example |
|
object |
Schema of Response |
||
| RequestId |
string |
The request ID. |
******58-5876-****-83CA-B56278****** |
| TaskId |
string |
The task ID. |
******73-8501-****-8ac1-72295a****** |
Examples
Success response
JSON format
{
"RequestId": "******58-5876-****-83CA-B56278******\n",
"TaskId": "******73-8501-****-8ac1-72295a******\n"
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | NotFound.Task | %s, please check the TaskId. | The parameter TaskId does not exist. |
| 400 | InvalidParameter.TaskId | %s, please check the TaskId. | The specified task must be in the running or recovering state. |
| 400 | InvalidParameter.SubscribeParams.SubscribeUserIdList | %s, please check the subscribeUserIdList of subscribeParams. | The parameter SubscribeUserIdList is invalid, please check. |
| 400 | InvalidParameter.MixLayoutParams.UserPanes | %s, please check the userPanes of mixLayoutParams. | The parameter UserPanes has invalid fields, please check. |
| 400 | InvalidParameter.MixTranscodeParams | %s, please check the transcodeParams. | The parameter MixTranscodeParams has invalid fields, please check. |
| 400 | MissingParameter | %s. | Missing parameter |
| 403 | InvalidParameter.UserId | %s, please check the UserId. | UserId is invalid, please check. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.