UpdateRtcCloudRecording
Updates an RTC cloud recording task.
Operation description
Single-stream recording supports updating subscription parameters. Mixed-stream recording only supports updating subscribed user streams.
QPS limits
The queries per second (QPS) limit for a single user is 50. If the limit is exceeded, API calls are throttled, which may affect your services. Make API calls at a reasonable rate.
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. You can only update tasks that are running or in an abnormal state. |
******73-8501-****-8ac1-72295a****** |
| SubscribeParams |
object |
Yes |
The updated subscription parameters. |
|
| SubscribeUserIdList |
array<object> |
Yes |
The list of subscribed user IDs. In single-stream recording mode, each user ID is recorded separately. In mixed-stream recording mode, the audio and video streams of all user IDs are mixed into a single audio and video stream. Note
|
|
|
object |
No |
The information about the subscribed user ID. |
||
| UserId |
string |
Yes |
The subscribed user ID. |
userA |
| StreamType |
integer |
No |
The media type of the subscribed user ID. Valid values:
Valid values:
|
0 |
| SourceType |
integer |
No |
The video input stream type of the user ID. This parameter is valid only when a video stream is subscribed to (StreamType=2). Valid values:
Valid values:
|
0 |
| MixLayoutParams |
object |
No |
The updated layout parameters. This parameter is not required in single-stream recording mode. In mixed-stream recording mode, this parameter is required unless the transcoding is audio-only. |
|
| MixBackground |
object |
No |
The global background image for stream mixing. |
|
| RenderMode |
integer |
No |
The display mode for video output. Valid values:
Valid values:
|
0 |
| Url |
string |
No |
The URL of the background image. The maximum length is 2,048 characters. |
https://xxxx.com/photos/my-test-picture.png |
| UserPanes |
array<object> |
No |
The window layout information for subscribed users. Only user IDs with layout information configured are displayed in the video. This parameter is required in mixed-stream recording mode when the recording is not audio-only. |
|
|
array<object> |
No |
The window configuration in the video. |
||
| UserId |
string |
No |
The user ID corresponding to the window.
|
userA |
| SourceType |
integer |
No |
The video input stream type of the user ID. If UserId is not specified, the SourceType setting here is invalid. Valid values:
The combination of UserId and SourceType specified here must be included in SubscribeUserIdList. Valid values:
|
0 |
| Height |
string |
No |
The height of the pane, as a normalized percentage. The value must be in the range of [0,1]. Default value: 0. |
0.5 |
| Width |
string |
No |
The width of the pane, as a normalized percentage. The value must be in the range of [0,1]. Default value: 0. |
0.5 |
| X |
string |
No |
The X coordinate, as a normalized percentage. The value must be in the range of [0,1]. Default value: 0. |
0 |
| Y |
string |
No |
The Y coordinate, as a normalized percentage. The value must be in the range of [0,1]. Default value: 0. |
0 |
| ZOrder |
integer |
No |
The stacking order. 0 indicates the bottom layer, 1 indicates the layer above 0, and so on. Default value: 0. |
0 |
| SubBackground |
object |
No |
The background image of the sub-picture. When a user turns off the camera, does not ingest a stream after joining the channel, or leaves the channel midway, the corresponding image is displayed in the layout position. |
|
| RenderMode |
integer |
No |
The display mode for sub-picture output. Valid values:
Valid values:
|
0 |
| Url |
string |
No |
The URL of the background image. The maximum length is 2,048 characters. |
https://xxxx.com/photos/my-test-pane-picture.png |
-
You can subscribe to both the camera and screen sharing streams of the same user ID at the same time. In single-stream recording mode, if you want to subscribe to both the camera and screen sharing streams of the same user ID, the FileNamePattern and SliceNamePattern parameters must include the SourceType variable to prevent recording files from overwriting each other.
-
In single-stream recording mode, subscribing to only the video-only stream of a user ID is not supported. That is, the value of UserInfo.StreamType cannot be set to 2 in single-stream mode.
-
If you want to record only the screen stream of a user ID without the audio stream, you can subscribe to the video-only stream of the user ID and set SourceType to 1 (not supported in single-stream recording mode), or subscribe to the original stream of the user ID and ingest only the screen stream without ingesting the audio stream or muting the audio. If you want to record both the screen stream and the audio stream of a user ID, you can subscribe to the original stream of the user ID and ingest only the screen stream along with the audio stream, or subscribe to the video-only stream of the user ID and set SourceType to 1 (not supported in single-stream recording mode) while also subscribing to the audio-only stream of the user ID.
-
In single-stream recording mode, if RecordParams.StreamType is set to audio-only stream (1), SubscribeParams cannot contain subscriptions to video-only streams (2). If RecordParams.StreamType is set to video-only stream (2), SubscribeParams cannot contain subscriptions to audio-only streams (1).
-
In mixed-stream recording mode, if RecordParams.StreamType is set to audio-only stream (1), not all user IDs in SubscribeParams can subscribe to only video-only streams (2). If RecordParams.StreamType is set to video-only stream (2), not all user IDs in SubscribeParams can subscribe to only audio-only streams (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.