Cloud Recording RESTful API
Agora Cloud Recording is a component provided by Agora to record and save voice calls, video calls, and interactive streaming. You can send HTTP requests from your business server to the Agora server to manage Cloud Recording tasks on the server side.
To monitor the status of your cloud recording, Agora provides the message notification service. After enabling this service, you receive events related to cloud recording through a webhook.
Since Agora dynamically adjusts the IP addresses of the message notification server, best practice is to regularly query the IP addresses and update the firewall whitelist configuration to continue receiving cloud recording notifications.
Base URL
https://api.sd-rtn.com
Authentication
When sending an HTTP request, use Basic HTTP authentication and fill in the Authorization
field in the HTTP request header with the generated credentials. For details on generating the Authorization
field, see Authenticate REST calls.
Endpoints
The RESTful API includes the following set of endpoints for managing the cloud recording functionality:
acquire
: Request a resource ID for cloud recording.start
: Call this method within two seconds after getting the resource ID to start cloud recording. During recording, callquery
,update
, andupdateLayout
methods as needed.query
: Check the status of cloud recording.update
: Update recording settings.updateLayout
: Update the video mixing layout.stop
: To end a recording, callstop
to leave the channel and stop the recording.
acquire
Get a cloud recording resource ID.
POST /v1/apps/{appid}/cloud_recording/acquire
Before starting cloud recording, call the acquire
method to get a resource ID. One resource ID can be used for only one recording session.
Note: To ensure success when starting cloud recording, proceed as follows:
- Call
acquire
andstart
requests in pairs. start
cloud recording within two seconds of receiving the resource ID from eachacquire
request. Batch fetching of resource IDs followed by batchstart
requests may lead to request failure.- The resource ID is valid for five minutes and should be used as soon as possible.
Request body
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
Content-Type | header | String | false | application/json . |
appid | path | String | true | The App ID for your project. |
body | body | JSON Object | true | acquire-request |
200 Response
Response
status | Description | Schema |
---|---|---|
200 OK | If the returned HTTP status code is 200 , the request is successful. If you set the startParameter object in the request body and its value is invalid, it will not affect the success of the acquire request, but you will receive an error in the subsequent start request. | acquire-response |
Not 200 | If the HTTP status code is not 200 , see the response status code for troubleshooting. | Response status code |
start
Start cloud recording.
POST /v1/apps/{appid}/cloud_recording/resourceid/{resourceid}/mode/{mode}/start
After receiving a cloud recording resource ID using the acquire
method, call the start
method to start cloud recording.
After calling start
, best practice is to check that the recording service has started successfully.
Request body
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
Content-Type | header | String | false | application/json . |
appid | path | String | true | The App ID for your project. |
resourceId | path | String | true | The resource ID obtained using the acquire request. |
mode | path | String | true | One of the following recording modes:individual : Individual recording mode.mix : Composite recording mode.web : Web page recording mode. |
body | body | JSON Object | true | start-request |
200 Response
Response
status | Description | Schema |
---|---|---|
200 | If the returned HTTP status code is 200 , the request is successful. To check whether the recording service has started successfully, see the best practices to proceed. | Response Schema |
Not 200 | If the HTTP status code is not 200 , see the response status code for troubleshooting. | Response status code |
Response Schema
Status Code 200
Name | Type | Required | Description |
---|---|---|---|
cname | String | false | The name of the channel to be recorded. |
uid | String | false | The user ID used by the cloud recording service in the RTC channel to identify the recording service in the channel. |
resourceId | String | false | The cloud recording resource ID. The resource ID is valid for five minutes, after which you need to re-request it. |
sid | String | false | The recording ID. After successfully starting cloud recording, you receive an sid (the recording ID). This ID uniquely identifies a recording cycle. |
update
Update the cloud recording settings.
POST /v1/apps/{appid}/cloud_recording/resourceid/{resourceid}/sid/{sid}/mode/{mode}/update
After starting the recording, call the update
method to update the following recording configuration:
- For individual and composite recordings, update the subscription list.
- For web page recording, pause or resume the recording, or update the CDN streaming address (URL) where the web page recording is pushed to.
-
The
update
request is only valid within a recording session. If the recording was started incorrectly, or if the recording has ended, theupdate
call returns404
. -
If you need to call the
update
method successively to update recording settings, repeat the call after receiving the previousupdate
response to avoid unexpected results.
Request body
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
Content-Type | header | String | false | application/json . |
appid | path | String | true | The App ID for your project. |
resourceId | path | String | true | The resource ID obtained using the acquire request. |
sid | path | String | true | The recording ID obtained through start . |
mode | path | String | true | One of the following recording modes:individual : Individual recording mode.mix : Composite recording mode.web : Web page recording mode. |
body | body | JSON Object | true | update-request |
200 Response
Response
status | Description | Schema |
---|---|---|
200 | If the returned HTTP status code is 200 , the request is successful. | Response Schema |
Not 200 | If the HTTP status code is not 200 , see the response status code for troubleshooting. | Response status code |
Response Schema
Status Code 200
Name | Type | Required | Description |
---|---|---|---|
cname | String | false | The name of the channel to be recorded. |
uid | String | false | The user ID used by the cloud recording service in the RTC channel to identify the recording service in the channel. |
resourceId | String | false | The resource ID used by cloud recording. |
sid | String | false | The recording ID, identifying each recording cycle. |
updateLayout
Update the mixing layout of cloud recording.
POST /v1/apps/{appid}/cloud_recording/resourceid/{resourceid}/sid/{sid}/mode/{mode}/updateLayout
After starting composite recording, call this method to update the mixing layout.
Each call to this method overrides the original layout settings. For example, if you set the backgroundColor
field to "#FF0000"
(red) when starting a recording and call the updateLayout
method to update the mixing layout without setting the backgroundColor
field again, the background color will change to black (the default value).
-
The
updateLayout
request is only valid within a session. If the recording was started incorrectly, or if the recording has ended, theupdateLayout
call returns404
. -
If you need to call the
updateLayout
method successively to update the recording settings, repeat the call after receiving the previousupdateLayout
response to avoid unexpected results.
Request body
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
Content-Type | header | String | false | application/json . |
appid | path | String | true | The App ID for your project. |
resourceId | path | String | true | The resource ID obtained using the acquire request. |
sid | path | String | true | The recording ID obtained through start . |
mode | path | String | true | The recording mode. Supports mix only, which means composite recording mode. |
body | body | JSON Object | true | updateLayout-request |
200 Response
Response
status | Description | Schema |
---|---|---|
200 | If the returned HTTP status code is 200 , the request is successful. | Response Schema |
Not 200 | If the HTTP status code is not 200 , see the response status code for troubleshooting. | Response status code |
Response Schema
Status Code 200
Name | Type | Required | Description |
---|---|---|---|
cname | String | false | The name of the channel to be recorded. |
uid | String | false | The user ID used by the cloud recording service in the RTC channel to identify the recording service in the channel. |
resourceId | String | false | The resource ID used by cloud recording. |
sid | String | false | The recording ID, identifying a recording cycle. |
query
Query the status of cloud recording.
GET /v1/apps/{appid}/cloud_recording/resourceid/{resourceid}/sid/{sid}/mode/{mode}/query
After you start recording, call query
to query the recording status.
The query
request is only valid within a session. If the recording was started incorrectly, or if the recording has ended, the query
call returns 404
.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
Content-Type | header | String | false | application/json . |
appid | path | String | true | The App ID for your project. |
resourceId | path | String | true | The resource ID obtained using the acquire request. |
sid | path | String | true | The recording ID obtained through start . |
mode | path | String | true | One of the following recording modes:individual : Individual recording mode.mix : Composite recording mode.web : Web page recording mode. |
200 Response
Response
status | Description | Schema |
---|---|---|
200 | If the returned HTTP status code is 200 , the request is successful. | query-response |
Not 200 | If the HTTP status code is not 200 , see the response status code for troubleshooting. | Response status code |
stop
Stop cloud recording.
POST /v1/apps/{appid}/cloud_recording/resourceid/{resourceid}/sid/{sid}/mode/{mode}/stop
After starting recording, call the stop
method to leave the channel and stop recording. To start recording again after the recording has stopped, call the acquire
method again to request a new resource ID.
-
The
stop
request is only valid within a session. If the recording is started incorrectly, or if the recording has ended, thestop
call returns404
. -
In non-web page recording mode, when the channel is idle (without users) for more than the predefined duration (default is 30 seconds), cloud recording automatically leaves the channel and stops recording.
Request body
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
Content-Type | header | String | false | application/json . |
appid | path | String | true | The App ID for your project. |
resourceId | path | String | true | The resource ID obtained using the acquire request. |
sid | path | String | true | The recording ID obtained through start . |
mode | path | String | true | One of the following recording modes:individual : Individual recording mode.mix : Composite recording mode.web : Web page recording mode. |
body | body | JSON Object | true | stop-request |
200 Response
Response
status | Description | Schema |
---|---|---|
200 | If the returned HTTP status code is 200 , the request is successful. | stop-response |
Not 200 | If the HTTP status code is not 200 , see the response status code for troubleshooting. | Response status code |
get-ncs-ip
Query the IP addresses of the message notification server.
GET /v1/ncs/ip
Query the IP address or IP address list of the message notification server.
After you enable the message notification service, the Agora message notification service can notify your server of events that occur during a cloud recording with HTTPS requests. Agora dynamically adjusts the IP addresses of the message notification server every 24 hours. Query the IP addresses using this method. After the query, add the IP address (or IP address list) to the whitelist.
Best practice is to query the IP addresses at least once every 24 hours and automatically update the firewall configuration to avoid interruption in the reception of notifications.
Response
status | Description | Schema |
---|---|---|
200 | If the returned HTTP status code is 200, the request is successful. You only need to pay attention to the PrimaryIP field in the response body, but not the response header or other fields in the response body. | Response Schema |
Response Schema
Status Code 200
Name | Type | Required | Description |
---|---|---|---|
data | Object | false | Unnecessary to know. |
» service | Object | false | Unnecessary to know. |
»» hosts | Array[object] | false | Unnecessary to know. |
»»» primaryIP | String | false | The IP address of the Agora message notification server. |
Schemas
acquire-request
Properties
Name | Type | Required | Description |
---|---|---|---|
cname | String | true | Channel name: - For individual recording and composite recording modes, this field is used to set the name of the channel to be recorded. - For web page recording mode, this field is used to differentiate the recording process. The string length cannot exceed 1024 bytes. Note: A unique recording instance can be located through appid , cname , and uid . Therefore, if you intend to record the same channel multiple times, use the same appId and cname , while differentiating them with different uid s. |
uid | String | true | The string contains the UID used by the cloud recording service within the channel to identify the recording service, for example, "527841" . The string must meet the following conditions:- The value is in the range from 1 to (232-1), and cannot be set to 0 . - It must not duplicate any UID within the current channel. - The field value within the quotation marks is an integer UID, and all users in the channel should use integer UIDs. |
clientRequest | Object | false | See the following. |
» scene | Number | false | Use cases for cloud recording resources: - 0 : (default) Real-time audio and video recording. - 1 : Web page recording. - 2 : Individual recording mode, with postponed transcoding or audio mixing enabled.- Postponed transcoding: The recording service will transcode the recorded files into the MP4 format within 24 hours after the recording ends (in special cases, it may take more than 48 hours), and then upload the MP4 files to your third-party cloud storage. This scene is only applicable to the individual recording mode. - Postponed audio mixing: The recording service will merge and transcode the recorded files of all UIDs in the specified channel into a single MP3/M4A/AAC file within 24 hours after the recording ends (in special cases, it may take more than 48 hours), and then upload the file to your specified third-party cloud storage. This scene is only applicable to the individual audio non-transcoding recording mode. > - When scene is set to 2 , you need to set the appsCollection field in the start method at the same time.> - In scenarios involving postponed transcoding and audio mixing, the recorded files are cached on the Agora edge servers for up to 24 hours. If your business is sensitive to information security and to ensure data compliance, please carefully consider whether to use postponed transcoding and audio mixing functions. Contact Agora technical support if you need assistance. |
» resourceExpiredHour | Number | false | The validity period for calling the cloud recording RESTful API. Start calculating after you successfully initiate the cloud recording service and obtain the sid (Recording ID). The calculation unit is hours. The value range is [1,720]. The default value is 72. Note: After the timeout, you will not be able to call the query , update , updateLayout , and stop methods. |
» startParameter | client-request | false | Setting this field can improve availability and optimize load balancing. Note: When populating the startParameter object, make sure the values are valid and consistent with the clientRequest object in the subsequent start request body; otherwise, the start request will receive an error response. |
» excludeResourceIds | Array[string] | false | The resourceId of another or several other recording tasks. This field is used to exclude specified recording resources so that newly initiated recording tasks can use resources from a new region, enabling cross-regional multi-stream recording. See Multi-channel task assurance. |
» region | String | false | Specify regions that the cloud recording service can access. By default, the cloud recording service accesses the region where the server you initiated the request is located. Once you specify the access region through region , the cloud recording service will not access servers outside the specified region. The region can be set to:- "CN" : Mainland China- "AP" : Asia excluding Mainland China- "EU" : Europe- "NA" : North AmericaNote: When calling the start method, the region of the third-party cloud storage must be consistent with this field. In scenarios of postponed transcoding and audio mixing, Agora recommends not setting the region field. Otherwise, due to the data compliance risks arising from the dynamic adjustment of Agora edge servers and the caching of recording files in scenarios of postponed transcoding and audio mixing, the Agora recording service may fail to function properly. |
client-request
Properties
Name | Type | Required | Description |
---|---|---|---|
token | String | false | A dynamic key used for authentication. If your project has enabled the App certificate, pass in the dynamic key of your project in this field. See Token Authentication for details. Note: |
storageConfig | storageConfig | true | Configuration for third-party cloud storage. |
recordingConfig | recordingConfig | false | Configuration for recorded audio and video streams. Note: You only need to set this field in individual recording and composite recording modes. |
recordingFileConfig | recordingFileConfig | false | Configuration for recorded files. Note: This field cannot be set when only taking screenshots, but it needs to be set in all other cases. Other cases include the following: |
snapshotConfig | snapshotConfig | false | Configurations for screenshot capture.Note: Only need to set this field when using the screenshot function in individual recording mode. Screenshot usage instructions: - The screenshot function is only applicable to individual recording mode ( individual ). - You can either take screenshots in an individual recording process, or record and take screenshots at the same time. For more information, see Capture Screenshots. The scenario of simultaneous recording and screenshot capture requires setting the recordingFileConfig field. - If the recording service or recording upload service is abnormal, the screenshot will fail. Recording is not affected when there is a screenshot exception. - streamTypes must be set as 1 or 2 when capturing screenshots. If you have set subscribeAudioUid , you must also set subscribeVideoUids . |
extensionServiceConfig | extensionServiceConfig | false | Configurations for extended services. Note: Only need to set in web page recording mode. |
appsCollection | appsCollection | false | Application configurations Note: This setting is only required when in individual recording mode and when postponed transcoding or audio mixing is enabled. |
transcodeOptions | transcodeOptions | false | Configurations for the recorded files generated under postponed transcoding or audio mixing. Note: This setting is only required when in individual recording mode and when postponed transcoding or audio mixing is enabled. |
storageConfig
Configurations for third-party cloud storage.
Properties
Name | Type | Required | Description |
---|---|---|---|
vendor | Number | true | Third-party cloud storage platforms. - 1 : Amazon S3 - 2 : Alibaba Cloud- 3 : Tencent Cloud- 5 : Microsoft Azure- 6 : Google Cloud- 7 : Huawei Cloud- 8 : Baidu IntelligentCloud |
region | Number | true | The region information specified for the third-party cloud storage. Note: To ensure the success rate and real-time performance of the upload of the recording file, the region of the third-party cloud storage must be the same as the region of the application server where you initiate the request. For example: If the App server from which you initiate the request is in mainland China, and meanwhile the third-party cloud storage needs to be set to a region within mainland China. See Third-party Cloud Storage regions. |
bucket | String | true | Third-party cloud storage bucket. The bucket name needs to comply with the naming rules of the corresponding third-party cloud storage service. |
accessKey | String | true | Access Key for third-party cloud storage. If postponed transcoding is required, the Access Key must have read and write permissions; otherwise, it is recommended to only provide the write permission. |
secretKey | String | true | (Required) The secret key of the third-party cloud storage. |
stsToken | String | false | A temporary security token for third-party cloud storage. This token is issued by the cloud service provider's Security Token Service (STS) and used to grant limited access rights to third-party cloud storage resources. Note Currently supported cloud service providers include only the following: 1 : Amazon S3, 2 : Alibaba Cloud, 3 : Tencent Cloud. |
stsExpiration | Number | false | The stsToken expiration timestamp used to mark UNIX time, in seconds.Note
|
fileNamePrefix | Array[string] | false | The storage location of the recorded files in the third-party cloud is related to the prefix of the file name. If it is set to ["directory1","directory2"] , then the prefix of the recording file name is "directory1/directory2/" , that is, the recording file name is directory1/directory2/xxx.m3u8 . The prefix's length, including the slashes, should not exceed 128 characters. The string itself should not contain symbols such as slash, underscore, or parenthesis. The following are the supported character set ranges:- 26 lowercase English letters: a-z - 26 uppercase English letters: A-Z - 10 numbers: 0-9 |
extensionParams | extensionParams | false | Third-party cloud storage services will encrypt and tag the uploaded recording files according to this field. |
extensionParams
Third-party cloud storage services will encrypt and tag the uploaded recording files according to this field.
Properties
Name | Type | Required | Description |
---|---|---|---|
sse | String | true | The encryption mode. After setting this field, the third-party cloud storage service will encrypt the uploaded recording files according to this encryption mode. This field is only applicable to Amazon S3, see the official Amazon S3 documentation. - kms : KMS encryption. - aes256 : AES256 encryption. |
tag | String | true | Tag content. After setting this field, the third-party cloud storage service will tag the uploaded recording files according to the content of this tag. This field is only applicable to Alibaba Cloud and Amazon S3. For details, see the Alibaba Cloud official documentation and the Amazon S3 official documentation. |
recordingConfig
Configurations for recorded audio and video streams.
Note: You only need to set this field in individual recording and composite recording modes.Properties
Name | Type | Required | Description |
---|---|---|---|
channelType | Number | true | The channel profile. - 0 : (Default) The communication scenario. - 1 : Live streaming scene. The channel scene must be consistent with the Agora RTC SDK, otherwise it may cause issues. |
decryptionMode | Number | false | The decryption mode. If you have set channel encryption in the SDK client, you need to set the same decryption mode for the cloud recording service. - 0 : (Default) Not encrypted. - 1 : AES_128_XTS encryption mode. 128-bit AES encryption, XTS mode. - 2 : AES_128_ECB encryption mode. 128-bit AES encryption, ECB mode. - 3 : AES_256_XTS encryption mode. 256-bit AES encryption, XTS mode. - 4 : SM4_128_ECB encryption mode. 128-bit SM4 encryption, ECB mode. - 5 : AES_128_GCM encryption mode. 128-bit AES encryption, GCM mode. - 6 : AES_256_GCM encryption mode. 256-bit AES encryption, GCM mode. - 7 : AES_128_GCM2 encryption mode. 128-bit AES encryption, GCM mode. Compared to AES_128_GCM encryption mode, AES_128_GCM2 encryption mode has higher security and requires setting a key and salt. - 8 : AES_256_GCM2 encryption mode. 256-bit AES encryption, GCM mode. Compared to the AES_256_GCM encryption mode, the AES_256_GCM2 encryption mode is more secure and requires setting a key and salt. |
secret | String | false | Keys related to encryption and decryption. Only needs to be set when decryptionMode is not 0 . |
salt | String | false | Salt related to encryption and decryption. Base64 encoding, 32-bit bytes. Only need to set when decryptionMode is 7 or 8 . |
maxIdleTime | Number | false | Maximum channel idle time. The unit is seconds. The value range is [5,259,200]. The default value is 30. The maximum value can not exceed 30 days. The recording service will automatically exit after exceeding the maximum channel idle time. After the recording service exits, if you initiate a start request again, a new recording file will be generated.Channel idle: There are no broadcasters in the live channel, or there are no users in the communication channel. |
streamTypes | Number | false | Subscribed media stream type. - 0 : Subscribes to audio streams only. Suitable for smart voice review scenarios. - 1 : Subscribes to video streams only. - 2 : (Default) Subscribes to both audio and video streams. |
videoStreamType | Number | false | Sets the stream type of the remote video. If you enable dual-stream mode in the SDK client, you can choose to subscribe to either the high-quality video stream or the low-quality video stream. - 0 : High-quality video stream refers to high-resolution and high-bitrate video stream.- 1 : Low-quality video stream refers to low-resolution and low-bitrate video stream. |
subscribeAudioUids | Array[string] | false | Specify which UIDs' audio streams to subscribe to. If you want to subscribe to the audio stream of all UIDs, no need to set this field. The array length should not exceed 32, and using an empty array is not recommended. Only one of the fields can be set: this field or unsubscribeAudioUids . For details, see Set up subscription lists.Note: |
unsubscribeAudioUids | Array[string] | false | Specify which UIDs' audio streams not to subscribe to. The cloud recording service will subscribe to the audio streams of all other UIDs except the specified ones. The array length should not exceed 32, and using an empty array is not recommended. Only one of the fields can be set: this field or subscribeAudioUids . For details, see Set up subscription lists. |
subscribeVideoUids | Array[string] | false | Specify which UID's video streams to subscribe to. If you want to subscribe to the video streams of all UIDs, no need to set this field. The array length should not exceed 32, and using an empty array is not recommended. Only one of the fields can be set: this field or unsubscribeVideoUids . For details, see Set up subscription lists.Note: |
unsubscribeVideoUids | Array[string] | false | Specify which UIDs' audio streams not to subscribe to. The cloud recording service will subscribe to the video streams of all UIDs except the specified ones. The array length should not exceed 32, and using an empty array is not recommended. Only one of the fields can be set: this field or subscribeVideoUids . For details, see Set up subscription lists. |
subscribeUidGroup | Number | false | Estimated peak number of subscribers. - 0 : 1 to 2 UIDs. - 1 :3 to 7 UIDs. - 2 : 8 to 12 UIDs - 3 : 13 to 17 UIDs - 4 : 18 to 32 UIDs. - 5 : 33 to 49 UIDs. Note: - Only need to be set in individual recordingmode, and it is required in this mode. - For example, if subscribeVideoUids is ["100","101","102"] and subscribeAudioUids is ["101","102","103"] , the number of subscribers is 4. |
streamMode | String | false | Output mode of media stream. See Media streaming output modes. - "default" : Default mode. Recording with audio transcoding will separately generate an M3U8 audio index file and a video index file. - "standard" : Standard mode. Agora recommends using this mode. Recording with audio transcoding will separately generate an M3U8 audio index file, a video index file, and a merged audio and video index file. If VP8 encoding is used on the Web client, a merged MPD audio-video index file will be generated. - "original" : Original encoding mode. It is applicable to individual non-transcoding audio recording. This field only takes effect when subscribing to audio only (streamTypes is 0). During the recording process, the audio is not transcoded, and an M3U8 audio index file is generated. Note: Only need to set in individual recording mode. |
audioProfile | Number | false | Set the sampling rate, bitrate, encoding mode, and number of channels for the output audio. - 0 : (Default) 48 kHz sampling rate, music encoding, mono audio channel, and the encoding bitrate is about 48 Kbps. 1 : 48 kHz sampling rate, music encoding, mono audio channel, and the encoding bitrate is approximately 128 Kbps. 2 : 48 kHz sampling rate, music encoding, stereo audio channel, and the encoding bitrate is approximately 192 Kbps. Note: Only need to set in the composite recording mode. |
transcodingConfig | transcodingConfig | false | Configurations for transcoded video output The value can refer to Setting the Resolution of the Recorded Video Output. Note: Only need to set in the composite recording mode. |
transcodingConfig
Configurations for transcoded video output The value can refer to Setting the Resolution of the Recorded Video Output.
Note: Only need to set in the composite recording mode.Properties
Name | Type | Required | Description |
---|---|---|---|
width | Number | false | The width of the video (pixels). width × height cannot exceed 1920 × 1080. The default value is 360. |
height | Number | false | The height of the video (pixels). width × height cannot exceed 1920 × 1080. The default value is 640. |
fps | Number | false | The frame rate of the video (fps). The default value is 15. |
bitrate | Number | false | The bitrate of the video (Kbps). The default value is 500. |
maxResolutionUid | String | false | Only need to set it in vertical layout. Specify the user ID of the large video window. The string value should be an integer ranging from 1 to (232-1), and cannot be set to 0. |
mixedVideoLayout | Number | false | Composite video layout: - 0 : (Default) Floating layout. The first user to join the channel will be displayed as a large window, filling the entire canvas. The video windows of other users will be displayed as small windows, arranged horizontally from bottom to top, up to 4 rows, each with 4 windows. It supports up to a total of 17 windows of different users' videos. - 1 : Adaptive layout. Automatically adjust the size of each user's video window according to the number of users, each user's video window size is consistent, and supports up to 17 windows. - 2 : Vertical layout. The maxResolutionUid is specified to display the large video window on the left side of the screen, and the small video windows of other users are vertically arranged on the right side, with a maximum of two columns, 8 windows per column, supporting up to 17 windows. - 3 : Customized layout. Set the layoutConfig field to customize the mixed layout. |
backgroundColor | String | false | The background color of the video canvas. The RGB color table is supported, with strings formatted as a # sign and 6 hexadecimal digits. The default value is "#000000" , representing the black color. |
backgroundImage | String | false | The URL of the background image of the video canvas. The display mode of the background image is set to cropped mode. Cropped mode: Will prioritize to ensure that the screen is filled. The background image size is scaled in equal proportion until the entire screen is filled with the background image. If the length and width of the background image differ from the video window, the background image will be peripherally cropped to fill the window. |
defaultUserBackgroundImage | String | false | The URL of the default user screen background image. After configuring this field, when any user stops sending the video streams for more than 3.5 seconds, the screen will switch to the background image; this setting will be overridden if the background image is set separately for a UID. |
layoutConfig | Array[object] | false | layoutConfig |
backgroundConfig | backgroundConfig | false | Configurations of user's background image. |
layoutConfig
The mixed video layout of users. An array of screen layout settings for each user, supporting up to 17 users.
Note: Only need to set in custom layout.Properties
Name | Type | Required | Description |
---|---|---|---|
uid | String | false | The content of the string is the UID of the user to be displayed in the area, 32-bit unsigned integer. If the UID is not specified, the screen settings in layoutConfig will be matched automatically in the order that users join the channel. |
x_axis | Number(float) | true | The relative value of the horizontal coordinate of the upper-left corner of the screen, accurate to six decimal places. Layout from left to right, with 0.0 at the far left and 1.0 at the far right. This field can also be set to the integer 0 or 1. The value range is [0,1]. |
y_axis | Number(float) | true | The relative value of the vertical coordinate of the upper-left corner of this screen in the screen, accurate to six decimal places. Layout from top to bottom, with 0.0 at the top and 1.0 at the bottom. This field can also be set to the integer 0 or 1. The value range is [0,1]. |
width | Number(float) | true | The relative value of the width of this screen, accurate to six decimal places. This field can also be set to the integer 0 or 1. The value range is [0,1]. |
height | Number(float) | true | The relative value of the height of this screen, accurate to six decimal places. This field can also be set to the integer 0 or 1. The value range is [0,1]. |
alpha | Number(float) | false | The transparency of the user's video window. Accurate to six decimal places. 0.0 means the user's video window is transparent, and 1.0 indicates that it is completely opaque. The value range is [0,1]. The default value is 1. |
render_mode | Number | false | The display mode of users' video windows: - 0 : (Default) cropped mode. Prioritize to ensure the screen is filled. The video window size is proportionally scaled until it fills the screen. If the video's length and width differ from the video window, the video stream will be cropped from its edges to fit the window, under the aspect ratio set for the video window. - 1 : Fit mode. Prioritize to ensure that all video content is displayed. The video size is scaled proportionally until one side of the video window is aligned with the screen border. If the video scale does not comply with the window size, the video will be scaled to fill the screen while maintaining its aspect ratio. This scaling may result in a black border around the edges of the video. |
backgroundConfig
Configurations of user's background image.
Properties
Name | Type | Required | Description |
---|---|---|---|
uid | String | true | The string content is the UID. |
image_url | String | true | The URL of the user's background image. After setting the background image, if the user stops sending the video stream for more than 3.5 seconds, the screen will switch to the background image. URL supports the HTTP and HTTPS protocols, and the image formats supported are JPG and BMP. The image size must not exceed 6 MB. The settings will only take effect after the recording service successfully downloads the image; if the download fails, the settings will not take effect. Different field settings may overlap each other. For specific rules, see Set the background color or background image. |
render_mode | Number | false | The display mode of users' video windows: - 0 : (Default) cropped mode. Prioritize to ensure the screen is filled. The video window size is proportionally scaled until it fills the screen. If the video's length and width differ from the video window, the video stream will be cropped from its edges to fit the window, under the aspect ratio set for the video window. - 1 : Fit mode. Prioritize to ensure that all video content is displayed. The video size is scaled proportionally until one side of the video window is aligned with the screen border. If the video scale does not comply with the window size, the video will be scaled to fill the screen while maintaining its aspect ratio. This scaling may result in a black border around the edges of the video. |
recordingFileConfig
Name | Type | Required | Description |
---|---|---|---|
avFileType | Array[string] | false | Type of video files generated by recording: - "hls" : default value. M3U8 and TS files. - "mp4" : MP4 files. Note: - In individual recording mode and not in screenshot-only case, you can use the default value. - In the composite recording and web page recording modes, if you need to generate MP4 files, set it to ["hls","mp4"] . Setting it as ["mp4"] will result in an error. After setting, the recording file behavior is as follows:- In the composite recording mode, the recording service will create a new MP4 file when the current recording duration exceeds about 2 hours or the file size roughly exceeds 2 GB. - Web page recording mode: The recording service will create a new MP4 file when the current file's duration exceeds maxVideoDuration . |
snapshotConfig
Properties
Name | Type | Required | Description |
---|---|---|---|
captureInterval | Number | false | The cycle for regular screenshots in the cloud recording. The unit is seconds. The value range is [5,3600]. The default value is 10. |
fileType | Array[string] | true | The file format of screenshots. Currently only ["jpg"] is supported, which generates screenshot files in JPG format. |
extensionServiceConfig
Configurations for extended services.
Note: Only need to set in web page recording mode.Properties
Name | Type | Required | Description |
---|---|---|---|
errorHandlePolicy | String | false | Error handling policy. You can only set it to the default value, "error_abort" , which means that once an error occurs to an extension service, all other non-extension services, such as stream subscription, also stop. |
extensionServices | Array[object] | true | See the following. |
» serviceName | String | true | Name of the extended service: - web_recorder_service : Represents the extended service is web page recording. - rtmp_publish_service : Represents the extended service is to push web page recording to the CDN. |
» errorHandlePolicy | String | false | Error handling strategy within the extension service: - "error_abort" : the default and only value during web page recording. Stop other extension services when the current extension service encounters an error. - "error_ignore" : The only default value when you push the web page recording to the CDN. Other extension services are not affected when the current extension service encounters an error.If the web page recording service or the recording upload service is abnormal, pushing the stream to the CDN will fail. Therefore, errors in the web page recording service can affect the service of pushing page recording to the CDN. When an exception occurs during the process of pushing to the CDN, web page recording is not affected. |
» serviceParam | serviceParam | true | Specific configurations for extension services. |
serviceParam
Properties
Scenario 1
Set the following fields for web page recording:
Name | Type | Required | Description |
---|---|---|---|
url | String | true | The address of the page to be recorded. |
audioProfile | Number | true | Sampling rate, bitrate, encoding mode, and number of channels for the audio output. 0 : 48 kHz sampling rate, music encoding, mono audio channel, and the encoding bitrate is approximately 48 Kbps. 1 : 48 kHz sampling rate, music encoding, mono audio channel, and the encoding bitrate is approximately 128 Kbps. 2 : 48 kHz sampling rate, music encoding, stereo audio channel, and the encoding bitrate is approximately 192 Kbps. |
videoWidth | Number | true | The output video width (pixel). The product of videoWidth and videoHeight should be less than or equal to 1920 × 1080. For recommended values, see How can I set the page recording output resolution in mobile web page mode?. |
videoHeight | Number | true | The height of the output video (pixel). The product of videoWidth and videoHeight should be less than or equal to 1920 × 1080. For recommended values, see How can I set the page recording output resolution in mobile web page mode. |
maxRecordingHour | Number | true | The maximum duration of web page recording (hours). The web page recording will automatically stop after exceeding this value. The value range is [1,720]. > The recommended value should not exceed the value you set in the acquire method for resourceExpiredHour .Billing related: The charge will continue until the web page recording stops, so you need to set a reasonable value according to the actual business situation or stop the page recording voluntarily. |
videoBitrate | Number | false | The bitrate of the output video (Kbps). For different output video resolutions, the default value of videoBitrate is different: - Output video resolution is greater than or equal to 1280 × 720, and the default value is 2000. - Output video resolution is less than 1280 × 720, and the default value is 1500. |
videoFps | Number | false | The frame rate of the output video (fps). The value range is [5,60]. The default value is 15. |
mobile | Boolean | false | Whether to enable the mobile web mode: - true : Enables the mode. After enabling, the recording service uses the mobile web rendering mode to record the current page. - false : (default) Disables the mode. |
maxVideoDuration | Number | false | Maximum length of MP4 slice file generated by web page recording, in minutes During the web page recording process, the recording service will create a new MP4 slice file when the current MP4 file duration exceeds the maxVideoDuration approximately. The value range is [30,240]. The default value is 120. |
onhold | Boolean | false | Whether to pause page recording when starting a web page recording task. - true : Pauses the web page recording that has been started. Immediately pause the recording after starting the web page recording task. The recording service will open and render the page to be recorded, but will not generate slice files. - false : (Default) Starts a web page recording task and performs web page recording. We suggest using the onhold field according to the following process: 1. Set onhold to true when calling the start method, which will start and pause the web page recording, and you need to determine the appropriate time to start the web page recording on your own. 2. Call update and set onhold to false , continue with the web page recording. If you need to pause or resume the web page recording by continuously calling the update method, please make the call after receiving the response from the previous update , otherwise it may cause inconsistent results with your expectations. |
readyTimeout | Number | false | Set the page load timeout in seconds. See Page Load Timeout Detection. The value range is [0,60]. The default value is 0. - Set to 0 or not set, which means the web page loading status is not detected. -An integer between [1,60], representing the page load timeout. |
Scenario 2
Pushing web page recording to the CDN requires configuring the following fields.
Name | Type | Required | Description |
---|---|---|---|
outputs | Array[object] | true | See the following. |
» rtmpUrl | String | true | The CDN address to which you push the stream. |
appsCollection
Application configurations
Note: This setting is only required when in individual recording mode and when postponed transcoding or audio mixing is enabled.Properties
Name | Type | Required | Description |
---|---|---|---|
combinationPolicy | String | false | The combination of cloud recording applications. - postpone_transcoding : Use this method if you need to postpone transcoding or audio mixing. - default : (Default) Use this method except for postponed transcoding and audio mixing. |
transcodeOptions
Configurations for the recorded files generated under postponed transcoding or audio mixing.
Note: This setting is only required when in individual recording mode and when postponed transcoding or audio mixing is enabled.Properties
Name | Type | Required | Description |
---|---|---|---|
transConfig | Object | true | See the following. |
» transMode | String | true | Mode: - "postponeTranscoding" : Postponed transcoding. - "audioMix" : Postponed audio mixing. |
container | Object | false | See the following. |
» format | String | false | The container format of the file, which supports the following values: - "mp4" : the default format for the postponed transcoding. MP4 format. - "mp3" : The default format for postponed audio mixing. MP3 format. - "m4a" : M4A format. - "aac" : AAC format. Note: Postponed transcoding can currently only be set to MP4 format. |
audio | Object | false | Audio properties of the file. Note: This setting is only required in individual recording mode with postponed audio mixing turned on. |
» sampleRate | String | false | Audio sampling rate (Hz) supports the following values: - "48000" : (Default) 48 kHz.- "32000" : 32 kHz. - "16000" : 16 kHz. |
» bitrate | String | false | Audio bit rate (Kbps) supports a customized value and the default value is "48000" . |
» channels | String | false | The number of audio channels supports the following values: - "1" : Mono. - "2" : (Default) Stereo. |
acquire-response
Properties
Name | Type | Required | Description |
---|---|---|---|
cname | String | false | The name of the channel to be recorded. |
uid | String | false | The user ID used by the cloud recording service in the RTC channel to identify the recording service in the channel. |
resourceId | String | false | The cloud recording resource ID. You can start a cloud recording with this resource ID. The resource ID is valid for five minutes, after which you need to re-request it. |
start-request
Properties
Name | Type | Required | Description |
---|---|---|---|
cname | String | true | The name of the channel where the recording service locates. The cname field you input in the acquire request needs to be the same. |
uid | String | true | The string content is the UID used by the recording service in the RTC channel to identify the recording service. It needs to be the same as the uid field you input in the acquire request. |
clientRequest | Object | true | client-request |
update-request
Properties
Name | Type | Required | Description |
---|---|---|---|
cname | String | true | The name of the channel where the recording service locates. The cname field you input in the acquire request needs to be the same. |
uid | String | true | The string content is the UID used by the recording service in the RTC channel to identify the recording service. It needs to be the same as the uid field you input in the acquire request. |
clientRequest | Object | true | clientRequest |
clientRequest
Properties
Name | Type | Required | Description |
---|---|---|---|
streamSubscribe | streamSubscribe | false | Update subscription lists. Note: You only need to set this field in individual recording and composite recording modes. |
webRecordingConfig | webRecordingConfig | false | Used to update the web page recording configurations. Note: Only need to set in web page recording mode. |
rtmpPublishConfig | rtmpPublishConfig | false | Used to update the configurations for pushing web page recording to the CDN. Note: This should only be set when you push media stream to the CDN during aweb page recording. |
storageConfig | storageConfig | true | Configuration for third-party cloud storage. |
streamSubscribe
Update subscription lists.
Note: You only need to set this field in individual recording and composite recording modes.Properties
Name | Type | Required | Description |
---|---|---|---|
audioUidList | audioUidList | false | The audio subscription list. Note: This field is only applicable when the streamTypes field is set to audio, or both audio and video. |
videoUidList | videoUidList | false | The video subscription list. Note: This field only applies when the streamTypes field is set to video, or both audio and video. |
audioUidList
The audio subscription list.
Note: This field is only applicable when the streamTypes field is set to audio, or both audio and video.Properties
Name | Type | Required | Description |
---|---|---|---|
subscribeAudioUids | Array[string] | false | Specify which UIDs' audio streams to subscribe to. If you want to subscribe to the audio stream of all UIDs, no need to set this field. The array length should not exceed 32, and using an empty array is not recommended. Only one of the fields can be set: this field or unsubscribeAudioUids . For details, see Set up subscription lists.Note: |
unsubscribeAudioUids | Array[string] | false | Specify which UIDs' audio streams not to subscribe to. The cloud recording service will subscribe to the audio streams of all other UIDs except the specified ones. The array length should not exceed 32, and using an empty array is not recommended. Only one of the fields can be set: this field or subscribeAudioUids . For details, see Set up subscription lists. |
videoUidList
The video subscription list.
Note: This field only applies when the streamTypes field is set to video, or both audio and video.Properties
Name | Type | Required | Description |
---|---|---|---|
subscribeVideoUids | Array[string] | false | Specify which UID's video streams to subscribe to. If you want to subscribe to the video streams of all UIDs, no need to set this field. The array length should not exceed 32, and using an empty array is not recommended. Only one of the fields can be set: this field or unsubscribeVideoUids . For details, see Set up subscription lists.Note: |
unsubscribeVideoUids | Array[string] | false | Specify which UIDs' audio streams not to subscribe to. The cloud recording service will subscribe to the video streams of all UIDs except the specified ones. The array length should not exceed 32, and using an empty array is not recommended. Only one of the fields can be set: this field or subscribeVideoUids . For details, see Set up subscription lists. |
webRecordingConfig
Used to update the web page recording configurations.
Note: Only need to set in web page recording mode.Properties
Name | Type | Required | Description |
---|---|---|---|
onhold | Boolean | false | Set whether to pause the web page recording. - true : Pauses web page recording and generating recording files. - false : (Default) Continues web page recording and generates recording files. If you want to resume a paused web page recording, you can call the update method and set onhold to false . |
rtmpPublishConfig
Used to update the configurations for pushing web page recording to the CDN.
Note: This should only be set when you push media stream to the CDN during aweb page recording.Properties
Name | Type | Required | Description |
---|---|---|---|
outputs | Array[object] | false | See the following. |
» rtmpUrl | String | false | The CDN URL where you push the stream to. Note: |
updateLayout-request
Properties
Name | Type | Required | Description |
---|---|---|---|
cname | String | true | The name of the channel where the recording service locates. The cname field you input in the acquire request needs to be the same. |
uid | String | true | The string content is the UID used by the recording service in the RTC channel to identify the recording service. It needs to be the same as the uid field you input in the acquire request. |
clientRequest | Object | true | clientRequest-updateLayout |
clientRequest-updateLayout
Properties
Name | Type | Required | Description |
---|---|---|---|
maxResolutionUid | String | false | Only need to set it in vertical layout. Specify the user ID of the large video window. The string value should be an integer ranging from 1 to (232-1), and cannot be set to 0. |
mixedVideoLayout | Number | false | Composite video layout: - 0 : (Default) Floating layout. The first user to join the channel will be displayed as a large window, filling the entire canvas. The video windows of other users will be displayed as small windows, arranged horizontally from bottom to top, up to 4 rows, each with 4 windows. It supports up to a total of 17 windows of different users' videos. - 1 : Adaptive layout. Automatically adjust the size of each user's video window according to the number of users, each user's video window size is consistent, and supports up to 17 windows. - 2 : Vertical layout. The maxResolutionUid is specified to display the large video window on the left side of the screen, and the small video windows of other users are vertically arranged on the right side, with a maximum of two columns, 8 windows per column, supporting up to 17 windows. - 3 : Customized layout. Set the layoutConfig field to customize the mixed layout. |
backgroundColor | String | false | The background color of the video canvas. The RGB color table is supported, with strings formatted as a # sign and 6 hexadecimal digits. The default value is "#000000" , representing the black color. |
backgroundImage | String | false | The URL of the background image of the video canvas. The display mode of the background image is set to cropped mode. Cropped mode: Will prioritize to ensure that the screen is filled. The background image size is scaled in equal proportion until the entire screen is filled with the background image. If the length and width of the background image differ from the video window, the background image will be peripherally cropped to fill the window. |
defaultUserBackgroundImage | String | false | The URL of the default user screen background image. After configuring this field, when any user stops sending the video streams for more than 3.5 seconds, the screen will switch to the background image; this setting will be overridden if the background image is set separately for a UID. |
layoutConfig | Array[object] | false | layoutConfig |
backgroundConfig | Array[object] | false | backgroundConfig |
query-response
Properties
Name | Type | Required | Description |
---|---|---|---|
resourceId | String | false | The resource ID used by cloud recording. |
sid | String | false | The recording ID. |
serverResponse | Object | false | serverResponse |
cname | String | false | The name of the channel to be recorded. |
uid | String | false | The user ID used by the cloud recording service in the RTC channel to identify the recording service in the channel. |
serverResponse
Properties
Scenario 1
Fields returned in **web page recording **mode.
Name | Type | Required | Description |
---|---|---|---|
status | Number | false | Current status of the cloud service: - 0 : Cloud service has not started. - 1 : The cloud service initialization is complete. - 2 : The cloud service components are starting. - 3 : Some cloud service components are ready. - 4 : All cloud service components are ready. - 5 : The cloud service is in progress. - 6 : The cloud service receives the request to stop. - 7 : All components of the cloud service stop. - 8 : The cloud service exits. - 20 : The cloud service exits abnormally. |
extensionServiceState | Array[object] | false | extensionServiceState |
Scenario 2
Fields returned when in individual recording mode and video screenshot capture is turned on.
Name | Type | Required | Description |
---|---|---|---|
status | Number | false | Current status of the cloud service: - 0 : Cloud service has not started. - 1 : The cloud service initialization is complete. - 2 : The cloud service components are starting. - 3 : Some cloud service components are ready. - 4 : All cloud service components are ready. - 5 : The cloud service is in progress. - 6 : The cloud service receives the request to stop. - 7 : All components of the cloud service stop. - 8 : The cloud service exits. - 20 : The cloud service exits abnormally. |
sliceStartTime | Number | false | Recording start time, the Unix timestamp, in milliseconds. |
Scenario 3
Fields returned in scenarios other than video screenshot capturing during the individual recording and web page recording.
Name | Type | Required | Description |
---|---|---|---|
status | Number | false | Current status of the cloud service: - 0 : Cloud service has not started. - 1 : The cloud service initialization is complete. - 2 : The cloud service components are starting. - 3 : Some cloud service components are ready. - 4 : All cloud service components are ready. - 5 : The cloud service is in progress. - 6 : The cloud service receives the request to stop. - 7 : All components of the cloud service stop. - 8 : The cloud service exits. - 20 : The cloud service exits abnormally. |
fileListMode | String | false | Data format of fileList field: - "string" : fileList is of String type. In composite recording mode, if avFileType is set to ["hls"] , fileListMode is "string" . - "json" : fileList is a JSON Array. When avFileType is set to ["hls","mp4"] in the individual or composite recording mode, fileListMode is set to "json" . |
fileList | fileList-string or fileList-json | false | fileList-string or fileList-json |
sliceStartTime | Number | false | Recording start time, the Unix timestamp, in milliseconds. |
fileList-string
Type | Required | Description |
---|---|---|
String | false | The filename of the M3U8 file generated by the recording. |
extensionServiceState
Properties
Name | Type | Required | Description |
---|---|---|---|
payload | Object | false | payload |
serviceName | String | false | Name of the extended service: - web_recorder_service : Represents the extended service is web page recording. - rtmp_publish_service : Represents the extended service is to push web page recording to the CDN. |
payload
Properties
Scenario 1
The following fields will be returned during web page recording.
Name | Type | Required | Description |
---|---|---|---|
fileList | Array[object] | false | See the following. |
» filename | String | false | The file names of the M3U8 and MP4 files generated during recording. |
» sliceStartTime | Number | false | The recording start time of the file, the Unix timestamp, in seconds. |
onhold | Boolean | false | Whether the page recording is in pause state: - true : In pause state. - false : The page recording is running. |
state | String | false | The status of uploading subscription content to the extension service: - "init" : The service is initializing. - "inProgress" : The service has started and is currently in progress. - "exit" : Service exits. |
Scenario 2
When pushing the web page recording to CDN, the following fields will be returned.
Name | Type | Required | Description |
---|---|---|---|
outputs | Array[object] | false | See the following. |
» rtmpUrl | String | false | The CDN address to which you push the stream. |
» status | String | false | The current status of stream pushing of the web page recording: - "connecting" : Connecting to the CDN server. - "publishing" : The stream pushing is going on. - "onhold" : Set whether to pause the stream pushing. - "disconnected" : Failed to connect to the CDN server. Agora recommends that you change the CDN address to push the stream. |
state | String | false | The status of uploading subscription content to the extension service: - "init" : The service is initializing. - "inProgress" : The service has started and is currently in progress. - "exit" : Service exits. |
fileList-json
The Array[object] type.
Properties
Name | Type | Required | Description |
---|---|---|---|
fileName | String | false | The file names of the M3U8 and MP4 files generated during recording. |
trackType | String | false | The recording file type. - "audio" : Audio-only files. - "video" : Video-only files. - "audio_and_video" : audio and video files |
uid | String | false | User UID, indicating which user's audio or video stream is being recorded. In composite recording mode, the uid is "0" . |
mixedAllUser | Boolean | false | Whether the users were recorded separately. - true : All users are recorded in a single file. - false : Each user is recorded separately. |
isPlayable | Boolean | false | Whether or not can be played online. - true : The file can be played online. - false : The file cannot be played online. |
sliceStartTime | Number | false | The recording start time of the file, the Unix timestamp, in seconds. |
stop-request
Properties
Name | Type | Required | Description |
---|---|---|---|
cname | String | true | The name of the channel where the recording service locates. The cname field you input in the acquire request needs to be the same. |
uid | String | true | The string content is the UID used by the recording service in the RTC channel to identify the recording service. It needs to be the same as the uid field you input in the acquire request. |
clientRequest | Object | true | See the following. |
» async_stop | Boolean | false | Set the response mechanism for the stop method:- true : Asynchronous. Immediately receive a response after calling stop . - false : (Default) Synchronous. After calling stop , you need to wait for all the recorded files to be uploaded to the third-party cloud storage before receiving a response. Agora expects the upload time to be no more than 20 seconds. If the upload exceeds the time limit, you will receive an error code of 50 . |
stop-response
Properties
Name | Type | Required | Description |
---|---|---|---|
resourceId | String | false | The resource ID used by cloud recording. |
sid | String | false | The recording ID, identifying a recording cycle. |
serverResponse | Object | false | serverResponse |
cname | String | false | The name of the channel to be recorded. |
uid | String | false | The user ID used by the cloud recording service in the RTC channel to identify the recording service in the channel. |
serverResponse-stop
Properties
Scenario 1
Fields returned in the web page recording scenario.
Name | Type | Required | Description |
---|---|---|---|
extensionServiceState | Array[object] | false | See the following. |
» playload | Object | false | playload-stop |
» serviceName | String | false | Service type: - "upload_service" : Upload service. - "web_recorder_service" : Web recording service. |
Scenario 2
Fields returned in the case of video screenshot capturing during individual recording.
Name | Type | Required | Description |
---|---|---|---|
uploadingStatus | String | false | Current upload status of the recording file: - "uploaded" : All recording files have been uploaded to the specified third-party cloud storage. - "backuped" : All files of this recording have been uploaded, but at least one TS file has been uploaded to the Agora Backup Cloud. The Agora server will automatically continue to upload this portion of the file to the designated third-party cloud storage. - "unknown" : Unknown status. |
Scenario 3
Fields returned in scenarios other than video screenshot capturing during the individual recording and web page recording.
Name | Type | Required | Description |
---|---|---|---|
fileListMode | String | false | Data format of fileList field: - "string" : fileList is of String type. In composite recording mode, if avFileType is set to ["hls"] , fileListMode is "string" . - "json" : fileList is a JSON Array. When avFileType is set to ["hls","mp4"] in the individual or composite recording mode, fileListMode is set to "json" . |
fileList | fileList-string or fileList-json | false | fileList-string or fileList-json |
uploadingStatus | String | false | Current upload status of the recording file: - "uploaded" : All recording files have been uploaded to the specified third-party cloud storage. - "backuped" : All files of this recording have been uploaded, but at least one TS file has been uploaded to the Agora Backup Cloud. The Agora server will automatically continue to upload this portion of the file to the designated third-party cloud storage. - "unknown" : Unknown status. |
playload-stop
Properties
Scenario 1
Fields returned by the upload service in web page recording mode.
Name | Type | Required | Description |
---|---|---|---|
uploadingStatus | String | false | Current upload status of the recording file: - "uploaded" : All recording files have been uploaded to the specified third-party cloud storage. - "backuped" : All files of this recording have been uploaded, but at least one TS file has been uploaded to the Agora Backup Cloud. The Agora server will automatically continue to upload this portion of the file to the designated third-party cloud storage. - "unknown" : Unknown status. |
Scenario 2
Fields returned by the page recording service in web page recording mode.
Name | Type | Required | Description |
---|---|---|---|
fileList | Array[object] | false | See the following. |
» filename | String | false | The file names of the M3U8 and MP4 files generated during recording. |
» sliceStartTime | Number | false | The recording start time of the file, the Unix timestamp, in seconds. |
onhold | Boolean | false | Whether the page recording is in pause state: - true : In pause state. - false : The page recording is running. |
state | String | false | The status of uploading subscription content to the extension service: - "init" : The service is initializing. - "inProgress" : The service has started and is currently in progress. - "exit" : Service exits. |