UpdateRtcCloudRecording

更新时间:
复制 MD 格式

Updates a cloud recording task for ApsaraVideo Real-time Communication.

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. Exceeding this limit triggers throttling, which may affect your business. Call this operation as appropriate.

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 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 stream.

Note
  • The array supports a maximum of 17 elements.

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:

  • 0: original stream, which includes both audio and video. (Default)

  • 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 UserId. This parameter takes effect only when the video stream is subscribed (StreamType=2). Valid values:

  • 0: camera. (Default)

  • 1: screen sharing.

Valid values:

  • 0 :

    camera.

  • 1 :

    screen sharing.

0

MixLayoutParams

object

No

The updated layout parameters. Leave empty for single-stream recording mode. Required for 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:

  • 0: crop. (Default)

  • 1: scale and display with black borders.

Valid values:

  • 0 :

    crop.

  • 1 :

    scale and display with black borders.

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 pane layout for subscribed users. Only UserIds with layout information configured are placed in the output. Required for stream mixing mode when the recording output is not audio-only.

array<object>

No

The pane configuration in the output.

UserId

string

No

The UserId corresponding to this window.

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

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

  • Audio-only subscriptions cannot be added to the layout.

userA

SourceType

integer

No

The video input stream type of the UserId. Setting SourceType has no effect when UserId is not specified. Valid values:

  • 0: camera. (Default)

  • 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 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, displayed when the user turns off the camera, has not started publishing streams after joining the channel, or leaves the channel midway.

RenderMode

integer

No

The display mode of the sub-pane output. Valid values:

  • 0: Crop. (Default)

  • 1: Scale and display a black background.

Valid values:

  • 0 :

    裁剪

  • 1 :

    缩放并显示黑底

0

Url

string

No

The URL of the background image. Maximum length: 2,048 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. For single-stream recording mode, if you want to subscribe to both the camera and screen sharing streams of the same UserId, the FileNamePattern and SliceNamePattern must include the SourceType variable to prevent recording files from overwriting each other.

  • For single-stream recording mode, subscribing to a video-only stream of a specific UserId is not supported. In single-stream mode, the value of UserInfo.StreamType cannot be set to 2.

  • To record only the screen stream of a specific 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 publish only the screen stream without audio or with audio muted. To record both the screen stream and audio stream of a specific UserId, either subscribe to the original stream of the UserId and publish only the screen stream along with the audio stream, 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 UserId.

  • In single-stream recording mode, if RecordParams.StreamType is audio-only (value 1), SubscribeParams cannot contain any video-only subscriptions (value 2). If RecordParams.StreamType is video-only (value 2), SubscribeParams cannot 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

The response parameters.

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.