UpdateCloudRecord

Updated at:

Updates a cloud recording task.

Operation description

Usage

Updates a cloud recording task for an online channel.

QPS limit

This API supports up to 10 requests per second per user. Exceeding this limit triggers rate limiting, which may affect your service. Call the API responsibly.

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

rtc:UpdateCloudRecord

create

*App

acs:rtc:*:{#accountId}:app/{#AppId}

None None

Request parameters

Parameter

Type

Required

Description

Example

AppId

string

Yes

The application ID. You can create and query it in the console. Only one ID is supported.

eo85****

ChannelId

string

Yes

The existing channel ID. Only one ID is supported.

testid

TemplateId

string

Yes

The template ID.

Important To update the layout, change the template ID. Resolution updates are not supported.

567

TaskId

string

Yes

The task ID for this cloud recording. Only one ID is supported. It can contain letters, digits, underscores (_), and hyphens (-), with a maximum length of 55 bytes.

123

Panes

array<object>

No

Cell settings.

array<object>

No

SourceType

string

No

The media type of the cell. Valid values:

  • video: Camera or screen sharing stream (default).

  • camera: Camera stream.

  • screen: Screen sharing stream.

  • whiteboard: Whiteboard.

video

VideoOrder

string

No

The fill order when SourceType is video.

  • screenFirst: Prioritize screen sharing (default).

  • cameraFirst: Prioritize camera.

cameraFirst

PaneId

integer

Yes

The pane ID, starting from 0.

0

Source

string

No

The media source for the cell. You can specify a userId to target a specific user. Wildcard characters are also supported:

  • $ActiveSpeaker: The current active speaker in the channel.

  • $ScreenShare: A screen-sharing user. If multiple users share their screens, they are filled in sequence.

22

PaneCropMode

integer

No

The cropping mode. Valid values:

  • 1: Crop while maintaining aspect ratio.

  • 2: Maintain aspect ratio with padding.

  • 3: Stretch to fill.

2

ReservePaneForOfflineUser

boolean

No

Reserves a pane for a user who goes offline. The default value is true. If true, the pane for a specified user or wildcard user remains as a placeholder. If false, the pane is filled with a video stream based on the Auto Fill order.

Images

array<object>

No

Local image watermarks for the pane.

object

No

Url

string

Yes

The image URL. The image content cannot be updated during stream ingest.

https://aliyun.com/123xxx.jpg

Alpha

number

No

Transparency.

0.9

PaneImageCropMode

integer

No

The cropping mode. Valid values:

  • 1: Crop while maintaining aspect ratio.

  • 2: Maintain aspect ratio with padding.

  • 3: Stretch to fill.

2

X

number

Yes

The horizontal coordinate.

0.2

Y

number

Yes

The vertical coordinate.

0.2

Width

number

Yes

Width.

0.2

Height

number

Yes

Height.

0.2

Layer

integer

No

The z-axis layer.

0

Display

string

No

When to display the watermark.

  • streamOnly: Display only when the user has a video stream (default).

  • backup: Display only when the user has no video stream.

  • always: Always display.

backup

Backgrounds

array<object>

No

Background images.

object

No

Url

string

Yes

The background image URL.

https://aliyun.com/123xx.jpg

Alpha

number

No

Transparency.

0.9

PaneBackgroundCropMode

integer

No

The cropping mode. Valid values:

  • 1: Crop while maintaining aspect ratio.

  • 2: Maintain aspect ratio with padding.

  • 3: Stretch to fill.

2

X

number

Yes

The horizontal coordinate.

0.2

Y

number

Yes

The vertical coordinate.

0.2

Width

number

Yes

Width.

0.2

Height

number

Yes

Height.

0.2

Layer

integer

No

The z-axis layer.

0

Display

string

No

When to display.

  • streamOnly: Display only when the user has a video stream (default).

  • backup: Display only when the user has no video stream.

  • always: Always display.

backup

Texts

array<object>

No

Local text watermarks for the pane.

array<object>

No

Texture

string

Yes

The watermark content.

文字水印

FontSize

integer

No

Font size.

36

Alpha

number

No

Watermark transparency.

0.9

FontColor

object

No

Font color.

R

integer

No

R.

255

G

integer

No

G.

255

B

integer

No

B.

255

Font

integer

No

Font.

  • 0: Alibaba PuHuiTi Regular

  • 1: Alibaba PuHuiTi Light

  • 2: Alibaba PuHuiTi Medium

  • 3: Alibaba PuHuiTi Bold

  • 4: Alibaba PuHuiTi Heavy

  • 5: Ali Mama ShuHeiTi

  • 6: DingTalk JinBuTi

  • 7: Ali Mama DaoLiTi

  • 8: Ali Mama DongFang DaKai

  • 9: Ali Mama FangYuanTi

0

X

number

Yes

The horizontal coordinate.

0.2

Y

number

Yes

The vertical coordinate.

0.2

Layer

integer

No

The z-axis layer.

0

HasBox

boolean

No

Whether to draw a rectangle box.

BoxColor

object

No

Rectangle box color.

R

integer

No

R.

255

G

integer

No

G.

255

B

integer

No

B.

255

BoxAlpha

number

No

Rectangle box transparency.

0.6

BoxBorderw

integer

No

Rectangle box border width.

5

Display

string

No

When to display the watermark.

  • streamOnly: Display only when the user has a video stream (default).

  • backup: Display only when the user has no video stream.

  • always: Always display.

backup

Whiteboard

object

No

Whiteboard configuration.

WhiteboardId

string

No

The whiteboard ID. Default value: default.

default

Images

array<object>

No

Global image watermarks.

object

No

Url

string

Yes

The image URL. The image content cannot be updated during stream ingest.

https://aliyun.com/123.jpg

Alpha

number

No

Transparency.

0.9

ImageCropMode

integer

No

The cropping mode. Valid values:

  • 1: Crop while maintaining aspect ratio.

  • 2: Maintain aspect ratio with padding.

  • 3: Stretch to fill.

2

X

number

Yes

The horizontal coordinate.

0.2

Y

number

Yes

The vertical coordinate.

0.2

Width

number

Yes

Width.

0.2

Height

number

Yes

Height.

0.2

Layer

integer

No

The z-axis layer.

0

Backgrounds

array<object>

No

Background images.

object

No

Url

string

Yes

The image URL.

https://aliyun.com/123.jpg

Alpha

number

No

Transparency.

0.9

BackgroundCropMode

integer

No

The cropping mode. Valid values:

  • 1: Crop while maintaining aspect ratio.

  • 2: Maintain aspect ratio with padding.

  • 3: Stretch to fill.

2

X

number

Yes

The horizontal coordinate.

0.2

Y

number

Yes

The vertical coordinate.

0.2

Width

number

Yes

Width.

0.2

Height

number

Yes

Height.

0.2

Layer

integer

No

The z-axis layer.

0

Texts

array<object>

No

Global text watermarks.

array<object>

No

Texture

string

Yes

The watermark content.

文字水印

FontSize

integer

No

Font size.

36

Alpha

number

No

Watermark transparency.

0.1

FontColor

object

No

Font color.

R

integer

No

R.

255

G

integer

No

G.

255

B

integer

No

B.

255

Font

integer

No

Font.

  • 0: Alibaba PuHuiTi Regular

  • 1: Alibaba PuHuiTi Light

  • 2: Alibaba PuHuiTi Medium

  • 3: Alibaba PuHuiTi Bold

  • 4: Alibaba PuHuiTi Heavy

  • 5: Ali Mama ShuHeiTi

  • 6: DingTalk JinBuTi

  • 7: Ali Mama DaoLiTi

  • 8: Ali Mama DongFang DaKai

  • 9: Ali Mama FangYuanTi

0

X

number

Yes

The horizontal coordinate.

0.2

Y

number

Yes

The vertical coordinate.

0.2

Layer

integer

No

The z-axis layer.

0

HasBox

boolean

No

Whether to draw a rectangle box.

BoxColor

object

No

Rectangle box color.

R

integer

No

R.

255

G

integer

No

G.

255

B

integer

No

B.

255

BoxAlpha

number

No

Rectangle box transparency.

0.6

BoxBorderw

integer

No

Rectangle box border width.

5

ClockWidgets

array<object>

No

Global clock watermarks.

array<object>

No

Zone

integer

No

Time zone.

8

FontSize

integer

No

Clock font size.

30

Alpha

number

No

Transparency.

0.9

FontColor

object

No

Font color.

R

integer

No

R.

255

G

integer

No

G.

255

B

integer

No

B.

255

Font

integer

No

Font.

  • 0: Alibaba PuHuiTi Regular

  • 1: Alibaba PuHuiTi Light

  • 2: Alibaba PuHuiTi Medium

  • 3: Alibaba PuHuiTi Bold

  • 4: Alibaba PuHuiTi Heavy

  • 5: Ali Mama ShuHeiTi

  • 6: DingTalk JinBuTi

  • 7: Ali Mama DaoLiTi

  • 8: Ali Mama DongFang DaKai

  • 9: Ali Mama FangYuanTi

0

X

number

Yes

The horizontal coordinate.

0.2

Y

number

Yes

The vertical coordinate.

0.2

Layer

integer

No

The z-axis layer.

0

HasBox

boolean

No

Whether to draw a rectangle box.

BoxColor

object

No

Rectangle box color.

R

integer

No

R.

255

G

integer

No

G.

255

B

integer

No

B.

255

BoxAlpha

number

No

Rectangle box transparency.

0.6

BoxBorderw

integer

No

Rectangle box border width.

5

LayoutSpecifiedUsers

object

No

A list that specifies users for layout generation. It supports both blacklists and whitelists.

Whitelist: Specifies the users whose video streams are subscribed to in the channel.

  • The auto-fill feature uses this list for sequential filling.

  • During multi-layout switching, only users in the whitelist are included.

Blacklist: Specifies the users whose video streams are not subscribed to in the channel.

  • During multi-layout switching, only users not in the blacklist are included.

Type

string

Yes

The type of the user list. Valid values: `black` for a blacklist and `white` for a whitelist.

white

Ids

array

Yes

The list of specified user IDs.

string

Yes

A user ID.

123

Important Additional notes

The total number of local image watermarks, local background images, global image watermarks, and global background images cannot exceed 16.

Advanced watermark layering

The RTC media server generates the final image in the following steps:

Render video > Render images > Render text

Video, images, and text are rendered separately. Within the final image, text has the highest priority, followed by images, and then video. Text appears on top of images, and images appear on top of video.

  1. Arrange video frames according to the defined layout.

    a. Pane images and global images share the same layering space.

    b. Layer 0 is the bottommost layer. Higher layer values appear above lower ones. Valid layer values range from 0 to 100.

  2. Images include your custom PNG or JPG files.

    a. Images are rendered based on their configured width, height, position, transparency, and other properties.

    b. Pane images and global images are layered together.

  3. Text includes pane text, global text, and timestamp text.

    a. Within each text type, layers determine rendering order. Layer 0 is the bottom layer. A higher layer value places the text on top. Valid layer values range from 0 to 100.

    b. Priority among text types is as follows: timestamp text > global text > pane text. When text overlaps, lower-priority text is covered.

Handling overlaps:

  1. By default, higher-priority content covers lower-priority content in overlapping areas.

  2. To prevent lower-priority content from being covered, set the transparency of the higher-priority content to 0.

Response elements

Element

Type

Description

Example

object

Result

TaskId

string

The task ID for this cloud recording.

123

RequestId

string

The request ID.

16A96B9A-F203-4EC5-8E43-CB92E68F4CF8

Examples

Success response

JSON format

{
  "TaskId": "123",
  "RequestId": "16A96B9A-F203-4EC5-8E43-CB92E68F4CF8"
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.