UpdateRtcCloudRecording

Updated at:

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

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

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
  • The array supports up to 17 elements.

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:

  • 0: original stream, which includes both audio and video (default value)

  • 1: audio-only stream

  • 2: video-only stream

Valid values:

  • 0 :

    Original stream, which includes both audio and video.

  • 1 :

    Audio-only stream.

  • 2 :

    Video-only stream.

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:

  • 0: camera (default value)

  • 1: screen sharing

Valid values:

  • 0 :

    Camera.

  • 1 :

    Screen sharing.

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:

  • 0: crop (default value)

  • 1: scale and display with a black background

Valid values:

  • 0 :

    Crop.

  • 1 :

    Scale and display with a black background.

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.

  • If UserId is not specified, the windows are filled in the order in which the subscribed users join the channel.

  • The combination of UserId and SourceType specified here must be included in SubscribeUserIdList.

  • Subscribed audio-only streams cannot be added to the layout.

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:

  • 0: camera (default value)

  • 1: screen sharing

The combination of UserId and SourceType specified here must be included in SubscribeUserIdList.

Valid values:

  • 0 :

    Camera.

  • 1 :

    Screen sharing.

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:

  • 0: crop (default value)

  • 1: scale and display with a black background

Valid values:

  • 0 :

    Crop.

  • 1 :

    Scale and display with a black background.

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.