diff --git a/README.md b/README.md
index 561a73f..9330b15 100644
--- a/README.md
+++ b/README.md
@@ -31,9 +31,9 @@ This SDK has undergone some testing to ensure its basic functionality works corr
## Environment Setup
* [Java 1.8 or later](https://www.java.com)
-* App ID and App Certificate obtained from the [Agora Console](https://console.shengwang.cn/)
-* Basic Auth credentials from the [Agora Console](https://console.shengwang.cn/)
-* Enable the relevant service capabilities on the [Agora Console](https://console.shengwang.cn/)
+* App ID and App Certificate obtained from the [Agora Console](https://console.agora.io/v2)
+* Basic Auth credentials from the [Agora Console](https://console.agora.io/v2)
+* Enable the relevant service capabilities on the [Agora Console](https://console.agora.io/v2)
## Installation
@@ -264,17 +264,6 @@ public class Main {
For more examples, see [Example](./examples).
-## How to Contact Agora for Assistance if You Encounter Difficulties
-
-> Option 1: If you are already using Agora services or are in the process of integration, you can directly contact your sales or service representative.
->
-> Option 2: Send an email to [support@agora.io](mailto:support@agora.io) for consultation.
->
-> Option 3: Scan the QR code to join our WeChat group for questions.
->
->
----
-
## Contribution
This project welcomes and accepts contributions. If you encounter any issues or have suggestions for improvements, please open an issue or submit a Pull Request.
@@ -290,7 +279,7 @@ For more details, please refer to the [Semantic Versioning](https://semver.org)
## References
-* [Agora API Documentation](https://doc.shengwang.cn/)
+* [Agora API Documentation](https://docs.agora.io/en/)
## License
diff --git a/README_ZH.md b/README_ZH.md
index b90215e..3ea1bc7 100644
--- a/README_ZH.md
+++ b/README_ZH.md
@@ -291,7 +291,7 @@ public class Main {
## 参考
-* [Agora API 文档](https://doc.shengwang.cn/)
+* [声网 API 文档](https://doc.shengwang.cn/)
## 许可证
diff --git a/agora-rest-client-core/src/main/java/io/agora/rest/core/DomainPool.java b/agora-rest-client-core/src/main/java/io/agora/rest/core/DomainPool.java
index 8b24ff7..f098634 100644
--- a/agora-rest-client-core/src/main/java/io/agora/rest/core/DomainPool.java
+++ b/agora-rest-client-core/src/main/java/io/agora/rest/core/DomainPool.java
@@ -49,7 +49,7 @@ private boolean domainNeedUpdate() {
}
public void selectBestDomain() {
- // 提前判断domain是否需要更新,避免多线程情况下重复获取锁
+ // Check if domain needs updating first to avoid acquiring locks unnecessarily in multi-threaded scenarios
if (!domainNeedUpdate()) {
return;
}
diff --git a/agora-rest-client-core/src/main/java/io/agora/rest/services/cloudrecording/README.md b/agora-rest-client-core/src/main/java/io/agora/rest/services/cloudrecording/README.md
index f54a35f..d59b21b 100644
--- a/agora-rest-client-core/src/main/java/io/agora/rest/services/cloudrecording/README.md
+++ b/agora-rest-client-core/src/main/java/io/agora/rest/services/cloudrecording/README.md
@@ -1,44 +1,45 @@
-# 云端录制服务
-## 服务简介
-云端录制是声网为音视频通话和直播研发的录制组件,提供 RESTful API 供开发者实现录制功能,并将录制文件存至第三方云存储。云端录制有稳定可靠、简单易用、成本可控、方案灵活、支持私有化部署等优势,是在线教育、视频会议、金融监管、客户服务场景的理想录制方案。
+# Cloud Recording Service
-## 环境准备
+English | [简体中文](./README_ZH.md)
-- 获取声网App ID -------- [声网Agora - 文档中心 - 如何获取 App ID](https://docs.agora.io/cn/Agora%20Platform/get_appid_token?platform=All%20Platforms#%E8%8E%B7%E5%8F%96-app-id)
+## Service Introduction
+Cloud Recording is a recording component developed by Agora for audio and video calls and live broadcasts. It provides RESTful APIs for developers to implement recording functionality and store recording files in third-party cloud storage. Cloud Recording offers advantages such as stability, reliability, ease of use, cost control, flexible solutions, and support for private deployment, making it an ideal recording solution for online education, video conferences, financial supervision, and customer service scenarios.
- > - 点击创建应用
- >
- > 
+## Environment Preparation
+
+- Obtain Agora App ID -------- [Agora Console](https://console.agora.io/v2)
+
+ > - Click Create Application
+ >
+ > 
>
- > - 选择你要创建的应用类型
- >
- > 
-
-- 获取App 证书 ----- [声网Agora - 文档中心 - 获取 App 证书](https://docs.agora.io/cn/Agora%20Platform/get_appid_token?platform=All%20Platforms#%E8%8E%B7%E5%8F%96-app-%E8%AF%81%E4%B9%A6)
-
- > 在声网控制台的项目管理页面,找到你的项目,点击配置。
- > 
- > 点击主要证书下面的复制图标,即可获取项目的 App 证书。
- > 
-
-- 开启云录制服务
- > 
- > 
- > 
-
-## API 接口调用示例
-### 获取云端录制资源
-> 在开始云端录制之前,你需要调用 acquire 方法获取一个 Resource ID。一个 Resource ID 只能用于一次云端录制服务。
-
-需要设置的参数有:
-- appId: 声网的项目 AppID
-- username: 声网的Basic Auth认证的用户名
-- password: 声网的Basic Auth认证的密码
-- cname: 频道名
-- uid: 用户 UID
-- 更多 clientRequest中的参数见 [Acquire](https://doc.shengwang.cn/doc/cloud-recording/restful/cloud-recording/operations/post-v1-apps-appid-cloud_recording-acquire) 接口文档
-
-通过调用`acquire`方法来实现获取云端录制资源
+ > - Select the type of application you want to create
+ >
+ > 
+
+- Obtain App Certificate ----- [Agora Console](https://console.agora.io/v2)
+
+ > In the project management page of the Agora Console, find your project and click Configure.
+ > 
+ > Click the copy icon under Primary Certificate to obtain the App Certificate for your project.
+ > 
+
+- Check the status of the recording service
+ > 
+
+## API Call Examples
+### Acquire Cloud Recording Resources
+> Before starting cloud recording, you need to call the acquire method to obtain a Resource ID. A Resource ID can only be used for one cloud recording service.
+
+Required parameters:
+- appId: Agora project AppID
+- username: Username for Agora Basic Auth authentication
+- password: Password for Agora Basic Auth authentication
+- cname: Channel name
+- uid: User UID
+- For more parameters in clientRequest, see the [Acquire](https://docs.agora.io/en/cloud-recording/reference/restful-api#acquire) API documentation
+
+Implement acquiring cloud recording resources by calling the `acquire` method
```java
String appId = "";
String cname = "";
@@ -82,18 +83,18 @@
}
```
-### 开始云端录制
-> 通过 acquire 方法获取云端录制资源后,调用 start 方法开始云端录制。
+### Start Cloud Recording
+> After acquiring cloud recording resources through the acquire method, call the start method to begin cloud recording.
-需要设置的参数有:
-- cname: 频道名
-- uid: 用户 UID
-- resourceId: 云端录制资源ID
-- mode: 云端录制模式
-- storageConfig: 存储配置
-- 更多 clientRequest中的参数见 [Start](https://doc.shengwang.cn/doc/cloud-recording/restful/cloud-recording/operations/post-v1-apps-appid-cloud_recording-resourceid-resourceid-mode-mode-start) 接口文档
+Required parameters:
+- cname: Channel name
+- uid: User UID
+- resourceId: Cloud recording resource ID
+- mode: Cloud recording mode
+- storageConfig: Storage configuration
+- For more parameters in clientRequest, see the [Start](https://docs.agora.io/en/cloud-recording/reference/restful-api#start) API documentation
-通过调用`start`方法来实现开始云端录制
+Implement starting cloud recording by calling the `start` method
```java
StartResourceReq.StorageConfig storageConfig = StartResourceReq.StorageConfig.builder()
.accessKey("")
@@ -166,20 +167,20 @@
}
```
-### 停止云端录制
-> 开始录制后,你可以调用 stop 方法离开频道,停止录制。录制停止后如需再次录制,必须再调用 acquire 方法请求一个新的 Resource ID。
+### Stop Cloud Recording
+> After starting recording, you can call the stop method to leave the channel and stop recording. If you need to record again after stopping, you must call the acquire method again to request a new Resource ID.
-需要设置的参数有:
-- cname: 频道名
-- uid: 用户ID
-- resourceId: 云端录制资源ID
-- sid: 会话ID
-- mode: 云端录制模式
-- 更多 clientRequest中的参数见 [Stop](https://doc.shengwang.cn/doc/cloud-recording/restful/cloud-recording/operations/post-v1-apps-appid-cloud_recording-resourceid-resourceid-sid-sid-mode-mode-stop) 接口文档
+Required parameters:
+- cname: Channel name
+- uid: User ID
+- resourceId: Cloud recording resource ID
+- sid: Session ID
+- mode: Cloud recording mode
+- For more parameters in clientRequest, see the [Stop](https://docs.agora.io/en/cloud-recording/reference/restful-api#stop) API documentation
-因为Stop 接口返回的不是一个固定的结构体,所以需要根据返回的serverResponseMode来判断具体的返回类型
+Since the Stop interface does not return a fixed structure, you need to determine the specific return type based on the serverResponseMode returned
-通过调用`stop`方法来实现停止云端录制
+Implement stopping cloud recording by calling the `stop` method
```java
StopResourceReq stopResourceReq = StopResourceReq.builder()
.cname(cname)
@@ -203,20 +204,20 @@
```
-### 查询云端录制状态
-> 开始录制后,你可以调用 query 方法查询录制状态。
+### Query Cloud Recording Status
+> After starting recording, you can call the query method to check the recording status.
-需要设置的参数有:
-- cname: 频道名
-- uid: 用户ID
-- resourceId: 云端录制资源ID
-- sid: 会话ID
-- mode: 云端录制模式
-- 更多 clientRequest中的参数见[Query](https://doc.shengwang.cn/doc/cloud-recording/restful/cloud-recording/operations/get-v1-apps-appid-cloud_recording-resourceid-resourceid-sid-sid-mode-mode-query)接口文档
+Required parameters:
+- cname: Channel name
+- uid: User ID
+- resourceId: Cloud recording resource ID
+- sid: Session ID
+- mode: Cloud recording mode
+- For more parameters in clientRequest, see the [Query](https://docs.agora.io/en/cloud-recording/reference/restful-api#query) API documentation
-因为 Query 接口返回的不是一个固定的结构体,所以需要根据返回的serverResponseMode来判断具体的返回类型
+Since the Query interface does not return a fixed structure, you need to determine the specific return type based on the serverResponseMode returned
-通过调用`query`方法来实现查询云端录制状态
+Implement querying cloud recording status by calling the `query` method
```java
QueryResourceRes queryResourceRes = null;
@@ -258,20 +259,20 @@
}
```
-### 更新云端录制设置
-> 开始录制后,你可以调用 update 方法更新如下录制配置:
-> * 对单流录制和合流录制,更新订阅名单。
-> * 对页面录制,设置暂停/恢复页面录制,或更新页面录制转推到 CDN 的推流地址(URL)。
+### Update Cloud Recording Settings
+> After starting recording, you can call the update method to update the following recording configurations:
+> * For individual recording and composite recording, update the subscription list.
+> * For web recording, set pause/resume web recording, or update the streaming URL for pushing web recording to CDN.
-需要设置的参数有:
-- cname: 频道名
-- uid: 用户 UID
-- resourceId: 云端录制资源ID
-- sid: 会话ID
-- mode: 云端录制模式
-- 更多 clientRequest中的参数见 [Update](https://doc.shengwang.cn/doc/cloud-recording/restful/cloud-recording/operations/post-v1-apps-appid-cloud_recording-resourceid-resourceid-sid-sid-mode-mode-update) 接口文档
+Required parameters:
+- cname: Channel name
+- uid: User UID
+- resourceId: Cloud recording resource ID
+- sid: Session ID
+- mode: Cloud recording mode
+- For more parameters in clientRequest, see the [Update](https://docs.agora.io/en/cloud-recording/reference/restful-api#update) API documentation
-通过调用`update`方法来实现更新云端录制设置
+Implement updating cloud recording settings by calling the `update` method
```java
UpdateResourceReq updateResourceReq = UpdateResourceReq.builder()
.uid(uid)
@@ -302,5 +303,5 @@
}
```
-## 错误码和响应状态码处理
-具体的业务响应码请参考 [业务响应码](https://doc.shengwang.cn/doc/cloud-recording/restful/response-code) 文档
+## Error Codes and Response Status Codes
+For specific business response codes, please refer to the [Business Response Codes](https://docs.agora.io/en/cloud-recording/reference/common-errors) documentation
\ No newline at end of file
diff --git a/agora-rest-client-core/src/main/java/io/agora/rest/services/cloudrecording/README_ZH.md b/agora-rest-client-core/src/main/java/io/agora/rest/services/cloudrecording/README_ZH.md
new file mode 100644
index 0000000..49975c2
--- /dev/null
+++ b/agora-rest-client-core/src/main/java/io/agora/rest/services/cloudrecording/README_ZH.md
@@ -0,0 +1,309 @@
+# 云端录制服务
+
+[English](./README.md) | 简体中文
+
+## 服务简介
+云端录制是声网为音视频通话和直播研发的录制组件,提供 RESTful API 供开发者实现录制功能,并将录制文件存至第三方云存储。云端录制有稳定可靠、简单易用、成本可控、方案灵活、支持私有化部署等优势,是在线教育、视频会议、金融监管、客户服务场景的理想录制方案。
+
+## 环境准备
+
+- 获取声网App ID -------- [声网Agora - 文档中心 - 如何获取 App ID](https://docs.agora.io/cn/Agora%20Platform/get_appid_token?platform=All%20Platforms#%E8%8E%B7%E5%8F%96-app-id)
+
+ > - 点击创建应用
+ >
+ > 
+ >
+ > - 选择你要创建的应用类型
+ >
+ > 
+
+- 获取App 证书 ----- [声网Agora - 文档中心 - 获取 App 证书](https://docs.agora.io/cn/Agora%20Platform/get_appid_token?platform=All%20Platforms#%E8%8E%B7%E5%8F%96-app-%E8%AF%81%E4%B9%A6)
+
+ > 在声网控制台的项目管理页面,找到你的项目,点击配置。
+ > 
+ > 点击主要证书下面的复制图标,即可获取项目的 App 证书。
+ > 
+
+- 开启云录制服务
+ > 
+ > 
+ > 
+
+## API 接口调用示例
+### 获取云端录制资源
+> 在开始云端录制之前,你需要调用 acquire 方法获取一个 Resource ID。一个 Resource ID 只能用于一次云端录制服务。
+
+需要设置的参数有:
+- appId: 声网的项目 AppID
+- username: 声网的Basic Auth认证的用户名
+- password: 声网的Basic Auth认证的密码
+- cname: 频道名
+- uid: 用户 UID
+- 更多 clientRequest中的参数见 [Acquire](https://doc.shengwang.cn/doc/cloud-recording/restful/cloud-recording/operations/post-v1-apps-appid-cloud_recording-acquire) 接口文档
+
+通过调用`acquire`方法来实现获取云端录制资源
+```java
+ String appId = "";
+ String cname = "";
+ String uid = "";
+ String username = "";
+ String password = "";
+
+ Credential basicAuthCredential = new BasicAuthCredential(username, password);
+
+ // Initialize AgoraConfig
+ AgoraConfig agoraConfig = AgoraConfig.builder()
+ .appId(appId)
+ .credential(credential)
+ // Specify the region where the server is located.
+ // Optional values are CN, US, EU, AP, and the client will automatically
+ // switch to use the best domain name according to the configured region
+ .domainArea(DomainArea.CN)
+ .build();
+
+ // Initialize CloudRecordingClient
+
+ CloudRecordingClient cloudRecordingClient = CloudRecordingClient.create(agoraConfig);
+
+ AcquireResourceReq acquireResourceReq = AcquireResourceReq.builder().cname(cname).uid(uid)
+ .clientRequest(AcquireResourceReq.ClientRequest.builder().scene(1)
+ .resourceExpiredHour(24).build())
+ .build();
+
+ logger.info("request:{},clientRequest:{}", acquireResourceReq, acquireResourceReq.getClientRequest());
+
+ AcquireResourceRes acquireResourceRes = null;
+ try {
+ acquireResourceRes = cloudRecordingClient.acquire(acquireResourceReq).block();
+
+ assertNotNull(acquireResourceResp);
+ logger.info("acquire resource response:{}", acquireResourceRes);
+ } catch (AgoraException e) {
+ logger.error("Agora error:{}", e.getMessage());
+ } catch (Exception e) {
+ logger.error("Internal error:{}", e.getMessage());
+ }
+```
+
+### 开始云端录制
+> 通过 acquire 方法获取云端录制资源后,调用 start 方法开始云端录制。
+
+需要设置的参数有:
+- cname: 频道名
+- uid: 用户 UID
+- resourceId: 云端录制资源ID
+- mode: 云端录制模式
+- storageConfig: 存储配置
+- 更多 clientRequest中的参数见 [Start](https://doc.shengwang.cn/doc/cloud-recording/restful/cloud-recording/operations/post-v1-apps-appid-cloud_recording-resourceid-resourceid-mode-mode-start) 接口文档
+
+通过调用`start`方法来实现开始云端录制
+```java
+ StartResourceReq.StorageConfig storageConfig = StartResourceReq.StorageConfig.builder()
+ .accessKey("")
+ .secretKey("")
+ .fileNamePrefix(Collections.singletonList(""))
+ .bucket("")
+ .vendor(2)
+ .region(3)
+ .build();
+
+ StartResourceReq startResourceReq = StartResourceReq.builder()
+ .cname(cname)
+ .uid(uid)
+ .clientRequest(StartResourceReq.StartClientRequest.builder()
+ .recordingFileConfig(StartResourceReq.RecordingFileConfig.builder()
+ .avFileType(Arrays.asList("hls", "mp4"))
+ .build())
+ .storageConfig(storageConfig)
+ .extensionServiceConfig(StartResourceReq.ExtensionServiceConfig
+ .builder()
+ .errorHandlePolicy("error_abort")
+ .extensionServices(Arrays.asList(
+ StartResourceReq.ExtensionService
+ .builder()
+ .serviceParam(StartResourceReq.WebRecordingServiceParam
+ .builder()
+ .url("https://www.example.com")
+ .audioProfile(2)
+ .videoWidth(1280)
+ .videoHeight(720)
+ .maxRecordingHour(
+ 1)
+ .build())
+ .errorHandlePolicy(
+ "error_abort")
+ .serviceName("web_recorder_service")
+ .build(),
+ StartResourceReq.ExtensionService
+ .builder()
+ .serviceParam(StartResourceReq.RtmpPublishServiceParam
+ .builder()
+ .outputs(Collections
+ .singletonList(StartResourceReq.Outputs
+ .builder()
+ .rtmpUrl(
+ "rtmp://xxx.xxx.xxx.xxx:1935/live/test")
+ .build()))
+ .build())
+ .serviceName("rtmp_publish_service")
+ .errorHandlePolicy(
+ "error_abort")
+ .build()))
+ .build())
+ .build())
+ .build();
+
+ StartResourceRes startResourceRes = null;
+
+ try {
+ startResourceRes = cloudRecordingClient
+ .start(resourceId,mode, startResourceReq)
+ .block();
+ logger.info("start resource response:{}", startResourceRes);
+
+ } catch (AgoraException e) {
+ logger.error("Agora error:{}", e.getMessage());
+ } catch (Exception e) {
+ logger.error("Internal error:{}", e.getMessage());
+
+ }
+```
+
+### 停止云端录制
+> 开始录制后,你可以调用 stop 方法离开频道,停止录制。录制停止后如需再次录制,必须再调用 acquire 方法请求一个新的 Resource ID。
+
+需要设置的参数有:
+- cname: 频道名
+- uid: 用户ID
+- resourceId: 云端录制资源ID
+- sid: 会话ID
+- mode: 云端录制模式
+- 更多 clientRequest中的参数见 [Stop](https://doc.shengwang.cn/doc/cloud-recording/restful/cloud-recording/operations/post-v1-apps-appid-cloud_recording-resourceid-resourceid-sid-sid-mode-mode-stop) 接口文档
+
+因为Stop 接口返回的不是一个固定的结构体,所以需要根据返回的serverResponseMode来判断具体的返回类型
+
+通过调用`stop`方法来实现停止云端录制
+```java
+ StopResourceReq stopResourceReq = StopResourceReq.builder()
+ .cname(cname)
+ .uid(uid)
+ .clientRequest(StopResourceReq.StopClientRequest.builder()
+ .asyncStop(true)
+ .build())
+ .build();
+
+ StopResourceRes stopResourceRes;
+ try {
+ stopResourceRes = cloudRecordingClient
+ .stop(resourceId, sid, mode, stopResourceReq)
+ .block();
+ logger.info("stop resource response:{}", stopResourceRes);
+ } catch (AgoraException e) {
+ logger.error("Agora error:{}", e.getMessage());
+ } catch (Exception e) {
+ logger.error("Internal error:{}", e.getMessage());
+ }
+
+```
+
+### 查询云端录制状态
+> 开始录制后,你可以调用 query 方法查询录制状态。
+
+需要设置的参数有:
+- cname: 频道名
+- uid: 用户ID
+- resourceId: 云端录制资源ID
+- sid: 会话ID
+- mode: 云端录制模式
+- 更多 clientRequest中的参数见[Query](https://doc.shengwang.cn/doc/cloud-recording/restful/cloud-recording/operations/get-v1-apps-appid-cloud_recording-resourceid-resourceid-sid-sid-mode-mode-query)接口文档
+
+因为 Query 接口返回的不是一个固定的结构体,所以需要根据返回的serverResponseMode来判断具体的返回类型
+
+通过调用`query`方法来实现查询云端录制状态
+```java
+ QueryResourceRes queryResourceRes = null;
+
+ try {
+ queryResourceRes = cloudRecordingClient
+ .query(resourceId, sid,mode)
+ .block();
+
+ logger.info("query resource response:{}", queryResourceRes);
+ switch (queryResourceRes.getServerResponseType()) {
+ case QUERY_SERVER_RESPONSE_UNKNOWN_TYPE:
+ logger.error("Unknown server response type");
+ break;
+ case QUERY_INDIVIDUAL_RECORDING_SERVER_RESPONSE_TYPE:
+ logger.info("individual recording server response:{}",
+ queryResourceRes.getQueryIndividualRecordingServerResponse());
+ break;
+ case QUERY_INDIVIDUAL_VIDEO_SCREENSHOT_SERVER_RESPONSE_TYPE:
+ logger.info("individual video screenshot server response:{}",
+ queryResourceRes.getQueryIndividualVideoScreenshotServerResponse());
+ break;
+ case QUERY_MIX_RECORDING_HLS_SERVER_RESPONSE_TYPE:
+ logger.info("mix recording hls server response:{}",
+ queryResourceRes.getMixRecordingHLSServerResponse());
+ break;
+ case QUERY_MIX_RECORDING_HLS_AND_MP4_SERVER_RESPONSE_TYPE:
+ logger.info("mix recording hls and mp4 server response:{}",
+ queryResourceRes.getMixRecordingHLSAndMP4ServerResponse());
+ break;
+ case QUERY_WEB_RECORDING_SERVER_RESPONSE_TYPE:
+ logger.info("web recording server response:{}",
+ queryResourceRes.getWebRecordingServerResponse());
+ break;
+ }
+ } catch (AgoraException e) {
+ logger.error("Agora error:{}", e.getMessage());
+ } catch (Exception e) {
+ logger.error("Internal error:{}", e.getMessage());
+ }
+```
+
+### 更新云端录制设置
+> 开始录制后,你可以调用 update 方法更新如下录制配置:
+> * 对单流录制和合流录制,更新订阅名单。
+> * 对页面录制,设置暂停/恢复页面录制,或更新页面录制转推到 CDN 的推流地址(URL)。
+
+需要设置的参数有:
+- cname: 频道名
+- uid: 用户 UID
+- resourceId: 云端录制资源ID
+- sid: 会话ID
+- mode: 云端录制模式
+- 更多 clientRequest中的参数见 [Update](https://doc.shengwang.cn/doc/cloud-recording/restful/cloud-recording/operations/post-v1-apps-appid-cloud_recording-resourceid-resourceid-sid-sid-mode-mode-update) 接口文档
+
+通过调用`update`方法来实现更新云端录制设置
+```java
+ UpdateResourceReq updateResourceReq = UpdateResourceReq.builder()
+ .uid(uid)
+ .cname(cname)
+ .clientRequest(UpdateResourceReq.ClientRequest.builder()
+ .webRecordingConfig(UpdateResourceReq.WebRecordingConfig.builder()
+ .onHold(true)
+ .build())
+ .rtmpPublishConfig(UpdateResourceReq.RtmpPublishConfig.builder()
+ .outputs(Collections.singletonList(
+ UpdateResourceReq.UpdateOutput.builder()
+ .rtmpURL("rtmp://yyy.yyy.yyy.yyy:1935/live/test")
+ .build()))
+ .build())
+ .build())
+ .build();
+
+ UpdateResourceRes updateResourceRes;
+ try {
+ updateResourceRes = cloudRecordingClient
+ .update(resourceId, sid, mode, updateResourceReq)
+ .block();
+ logger.info("update resource response:{}", updateResourceRes);
+ } catch (AgoraException e) {
+ logger.error("Agora error:{}", e.getMessage());
+ } catch (Exception e) {
+ logger.error("Internal error:{}", e.getMessage());
+ }
+```
+
+## 错误码和响应状态码处理
+具体的业务响应码请参考 [业务响应码](https://doc.shengwang.cn/doc/cloud-recording/restful/response-code) 文档
diff --git a/agora-rest-client-core/src/main/java/io/agora/rest/services/cloudrecording/api/StartResourceAPI.java b/agora-rest-client-core/src/main/java/io/agora/rest/services/cloudrecording/api/StartResourceAPI.java
index 74a60d3..3498f43 100644
--- a/agora-rest-client-core/src/main/java/io/agora/rest/services/cloudrecording/api/StartResourceAPI.java
+++ b/agora-rest-client-core/src/main/java/io/agora/rest/services/cloudrecording/api/StartResourceAPI.java
@@ -38,12 +38,12 @@ public Mono handle(String resourceId, CloudRecordingModeEnum m
private RetryBackoffSpec customRetry(int maxAttempts, Predicate retryPredicate) {
- return Retry.backoff(maxAttempts, Duration.ofSeconds(1)) // 最多重试5次,初始间隔1秒
- .maxBackoff(Duration.ofSeconds(5)) // 最大间隔5秒
- .filter(retryPredicate) // 重试条件
+ return Retry.backoff(maxAttempts, Duration.ofSeconds(1)) // Maximum 5 retry attempts, initial 1-second interval
+ .maxBackoff(Duration.ofSeconds(5)) // Maximum 5-second interval
+ .filter(retryPredicate) // Retry condition
.doBeforeRetry(retrySignal -> {
- long retryCount = retrySignal.totalRetries() + 1; // 第几次重试
- Duration nextBackoff = Duration.ofSeconds(retryCount); // 下次重试间隔
+ long retryCount = retrySignal.totalRetries() + 1; // Current retry attempt number
+ Duration nextBackoff = Duration.ofSeconds(retryCount); // Next retry interval
logger.warn("Retry attempt: {}, next backoff: {}", retryCount, nextBackoff);
}).onRetryExhaustedThrow((retryBackoffSpec, retrySignal) -> {
logger.error("Retry exhausted: {}", retrySignal.totalRetries());
diff --git a/agora-rest-client-core/src/main/java/io/agora/rest/services/convoai/README.md b/agora-rest-client-core/src/main/java/io/agora/rest/services/convoai/README.md
index 8498467..5270a2e 100644
--- a/agora-rest-client-core/src/main/java/io/agora/rest/services/convoai/README.md
+++ b/agora-rest-client-core/src/main/java/io/agora/rest/services/convoai/README.md
@@ -8,28 +8,30 @@ Agora's Conversational AI Engine redefines human-computer interaction, breaking
## Environment Setup
-- Obtain Agora App ID -------- [Agora - Documentation Center - How to Get App ID](https://docs.agora.io/en/Agora%20Platform/get_appid_token?platform=All%20Platforms#get-app-id)
+- Obtain Agora App ID -------- [Agora Console](https://console.agora.io/v2)
- > - Click to create an application
+ > - Click Create Application
>
- > 
+ > 
>
> - Select the type of application you want to create
>
- > 
+ > 
-- Obtain App Certificate ----- [Agora - Documentation Center - Get App Certificate](https://docs.agora.io/cn/Agora%20Platform/get_appid_token?platform=All%20Platforms#%E8%8E%B7%E5%8F%96-app-%E8%AF%81%E4%B9%A6)
+- Obtain App Certificate ----- [Agora Console](https://console.agora.io/v2)
- > In the project management page of the Agora console, find your project and click configure.
- > 
- > Click the copy icon under the primary certificate to get the project's App Certificate.
- > 
+ > In the project management page of the Agora Console, find your project and click Configure.
+ > 
+ > Click the copy icon under Primary Certificate to obtain the App Certificate for your project.
+ > 
+
+- Enable Conversational AI Engine Service ----- [Enable Service](https://docs.agora.io/en/conversational-ai/get-started/manage-agora-account)
+ > 
-- Enable Conversational AI Engine Service ----- [Enable Service](https://doc.shengwang.cn/doc/convoai/restful/get-started/enable-service)
## API Definition
-For more api details, please refer to the [API Documentation](https://doc.shengwang.cn/api-ref/convoai/java/java-api/overview)
+For more api details, please refer to the [API Documentation](https://docs.agora.io/en/conversational-ai/rest-api/join)
## API Call Examples
@@ -268,4 +270,4 @@ Parameters to set:
```
## Error Codes and Response Status Codes Handling
-For specific business response codes, please refer to the [Business Response Codes](https://doc.shengwang.cn/doc/convoai/restful/api/response-code) documentation.
+For specific business response codes, please refer to the [Business Response Codes](https://docs.agora.io/en/conversational-ai/rest-api/reference) documentation.
diff --git a/agora-rest-client-core/src/main/java/io/agora/rest/services/convoai/README_ZH.md b/agora-rest-client-core/src/main/java/io/agora/rest/services/convoai/README_ZH.md
index 7d3cbca..5bb16b4 100644
--- a/agora-rest-client-core/src/main/java/io/agora/rest/services/convoai/README_ZH.md
+++ b/agora-rest-client-core/src/main/java/io/agora/rest/services/convoai/README_ZH.md
@@ -12,24 +12,25 @@
> - 点击创建应用
>
- > 
+ > 
>
> - 选择你要创建的应用类型
>
- > 
+ > 
- 获取App 证书 ----- [声网Agora - 文档中心 - 获取 App 证书](https://docs.agora.io/cn/Agora%20Platform/get_appid_token?platform=All%20Platforms#%E8%8E%B7%E5%8F%96-app-%E8%AF%81%E4%B9%A6)
> 在声网控制台的项目管理页面,找到你的项目,点击配置。
- > 
+ > 
> 点击主要证书下面的复制图标,即可获取项目的 App 证书。
- > 
+ > 
- 启用会话式AI引擎服务 ----- [启用服务](https://doc.shengwang.cn/doc/convoai/restful/get-started/enable-service)
+ > 
## API定义
-更多API详情,请参考 [API文档](https://doc.shengwang.cn//api-ref/convoai/java/java-api/overview)
+更多API详情,请参考 [API文档](https://doc.shengwang.cn/api-ref/convoai/java/java-api/overview)
## API调用示例
diff --git a/assets/imges/CN/config_app.png b/assets/imges/CN/config_app.png
new file mode 100644
index 0000000..ec1b35b
Binary files /dev/null and b/assets/imges/CN/config_app.png differ
diff --git a/assets/imges/CN/config_service.png b/assets/imges/CN/config_service.png
new file mode 100644
index 0000000..1c3035e
Binary files /dev/null and b/assets/imges/CN/config_service.png differ
diff --git a/assets/imges/CN/copy_app_cert.png b/assets/imges/CN/copy_app_cert.png
new file mode 100644
index 0000000..19e628d
Binary files /dev/null and b/assets/imges/CN/copy_app_cert.png differ
diff --git a/assets/imges/CN/create_app_1.png b/assets/imges/CN/create_app_1.png
new file mode 100644
index 0000000..0abc9f3
Binary files /dev/null and b/assets/imges/CN/create_app_1.png differ
diff --git a/assets/imges/CN/create_app_2.png b/assets/imges/CN/create_app_2.png
new file mode 100644
index 0000000..9291236
Binary files /dev/null and b/assets/imges/CN/create_app_2.png differ
diff --git a/assets/imges/CN/open_cloud_recording.png b/assets/imges/CN/open_cloud_recording.png
new file mode 100644
index 0000000..732d174
Binary files /dev/null and b/assets/imges/CN/open_cloud_recording.png differ
diff --git a/assets/imges/CN/open_convo_ai.png b/assets/imges/CN/open_convo_ai.png
new file mode 100644
index 0000000..650f7ff
Binary files /dev/null and b/assets/imges/CN/open_convo_ai.png differ
diff --git a/assets/imges/EN/config_app.png b/assets/imges/EN/config_app.png
new file mode 100644
index 0000000..f3df307
Binary files /dev/null and b/assets/imges/EN/config_app.png differ
diff --git a/assets/imges/EN/copy_app_cert.png b/assets/imges/EN/copy_app_cert.png
new file mode 100644
index 0000000..ddf8c19
Binary files /dev/null and b/assets/imges/EN/copy_app_cert.png differ
diff --git a/assets/imges/EN/create_app_1.png b/assets/imges/EN/create_app_1.png
new file mode 100644
index 0000000..8099d1e
Binary files /dev/null and b/assets/imges/EN/create_app_1.png differ
diff --git a/assets/imges/EN/create_app_2.png b/assets/imges/EN/create_app_2.png
new file mode 100644
index 0000000..2c154b7
Binary files /dev/null and b/assets/imges/EN/create_app_2.png differ
diff --git a/assets/imges/EN/open_cloud_recording.png b/assets/imges/EN/open_cloud_recording.png
new file mode 100644
index 0000000..86837b0
Binary files /dev/null and b/assets/imges/EN/open_cloud_recording.png differ
diff --git a/assets/imges/EN/open_convo_ai.png b/assets/imges/EN/open_convo_ai.png
new file mode 100644
index 0000000..0236195
Binary files /dev/null and b/assets/imges/EN/open_convo_ai.png differ
diff --git a/examples/cloudrecording/README.md b/examples/cloudrecording/README.md
index 52897a0..fbeb014 100644
--- a/examples/cloudrecording/README.md
+++ b/examples/cloudrecording/README.md
@@ -1,12 +1,14 @@
# CloudRecording Example
-> 这是 Agora Cloud Recording 的一个示例项目,使用了 Agora Cloud Recording RESTful API,实现了频道录制的功能。本示例支持合流录制、单流录制和页面录制三种模式。
+English | [简体中文](./README_ZH.md)
-## 运行示例项目
+> This is a sample project for Agora Cloud Recording that utilizes the Agora Cloud Recording RESTful API to implement channel recording functionality. This example supports three recording modes: composite recording, individual recording, and web recording.
-### 前提条件
+## Run
-配置环境变量,环境变量包括以下参数内容:
+### Prerequisites
+
+Configure the environment variables with the following parameters:
```bash
export APP_ID=
@@ -22,17 +24,17 @@ export STORAGE_CONFIG_ACCESS_KEY=
export STORAGE_CONFIG_SECRET_KEY=
```
-相关的参数可以通过可在 [CloudRecording 服务说明](../../agora-rest-client-core/src/main/java/io/agora/rest/services/cloudrecording/README.md) 查看
+Relevant parameters can be found in the [CloudRecording Service Documentation](../../agora-rest-client-core/src/main/java/io/agora/rest/services/cloudrecording/README.md)
-### 执行
+### Execution
-请确保在主模块目录已经执行了模块安装操作:
+Please ensure that you have installed the module in the main module directory:
```bash
make install
```
-接着,在当前模块下,通过分别执行下面的命令来体验不同场景的`CloudRecording`示例:
+Next, in the current module, execute the following commands to experience different scenarios of the `CloudRecording` example:
```bash
mvn exec:java -Dexec.mainClass="io.agora.rest.examples.cloudrecording.Main" -Dexec.args="--mode=mix --mix_scene="
@@ -40,26 +42,26 @@ mvn exec:java -Dexec.mainClass="io.agora.rest.examples.cloudrecording.Main" -Dex
mvn exec:java -Dexec.mainClass="io.agora.rest.examples.cloudrecording.Main" -Dexec.args="--mode=web --web_scene="
```
-其中 `mode` 表示云录制模式:
+Where `mode` represents the cloud recording mode:
-* mix: 合流录制
-* individual: 单流录制
-* web: 页面录制
+* mix: Composite recording
+* individual: Individual recording
+* web: Web page recording
-其中 `mix_scene` 表示合流录制场景:
+Where `mix_scene` represents the composite recording scenario:
-* hls: 录制hls格式
-* hls_and_mp4: 录制hls和mp4格式
+* hls: Record in HLS format
+* hls_and_mp4: Record in both HLS and MP4 formats
-其中 `individual_scene` 表示单流录制场景:
+Where `individual_scene` represents the individual recording scenario:
-* recording: 仅录制
-* snapshot: 仅截图
-* recording_and_snapshot: 录制+截图
-* recording_and_postpone_transcoding: 录制+延时转码
-* recording_and_audio_mix: 录制+延时混音
+* recording: Recording only
+* snapshot: Snapshot only
+* recording_and_snapshot: Recording and snapshot
+* recording_and_postpone_transcoding: Recording with delayed transcoding
+* recording_and_audio_mix: Recording with delayed audio mixing
-其中 `web_scene` 表示页面录制场景:
+Where `web_scene` represents the web page recording scenario:
-* web_recorder: 页面录制
-* web_recorder_and_rtmp_publish: 页面录制+转推到CDN
+* web_recorder: Web page recording
+* web_recorder_and_rtmp_publish: Web page recording and pushing to CDN
diff --git a/examples/cloudrecording/README_ZH.md b/examples/cloudrecording/README_ZH.md
new file mode 100644
index 0000000..c61b82c
--- /dev/null
+++ b/examples/cloudrecording/README_ZH.md
@@ -0,0 +1,67 @@
+# CloudRecording Example
+
+ [English](./README.md) | 简体中文
+
+> 这是 Agora Cloud Recording 的一个示例项目,使用了 Agora Cloud Recording RESTful API,实现了频道录制的功能。本示例支持合流录制、单流录制和页面录制三种模式。
+
+## 运行示例项目
+
+### 前提条件
+
+配置环境变量,环境变量包括以下参数内容:
+
+```bash
+export APP_ID=
+export CNAME=
+export USER_ID=
+export BASIC_AUTH_USERNAME=
+export BASIC_AUTH_PASSWORD=
+export TOKEN=
+export STORAGE_CONFIG_VENDOR=
+export STORAGE_CONFIG_REGION=
+export STORAGE_CONFIG_BUCKET=
+export STORAGE_CONFIG_ACCESS_KEY=
+export STORAGE_CONFIG_SECRET_KEY=
+```
+
+相关的参数可以通过可在 [CloudRecording 服务说明](../../agora-rest-client-core/src/main/java/io/agora/rest/services/cloudrecording/README_ZH.md) 查看
+
+### 执行
+
+请确保在主模块目录已经执行了模块安装操作:
+
+```bash
+make install
+```
+
+接着,在当前模块下,通过分别执行下面的命令来体验不同场景的`CloudRecording`示例:
+
+```bash
+mvn exec:java -Dexec.mainClass="io.agora.rest.examples.cloudrecording.Main" -Dexec.args="--mode=mix --mix_scene="
+mvn exec:java -Dexec.mainClass="io.agora.rest.examples.cloudrecording.Main" -Dexec.args="--mode=individual --individual_scene="
+mvn exec:java -Dexec.mainClass="io.agora.rest.examples.cloudrecording.Main" -Dexec.args="--mode=web --web_scene="
+```
+
+其中 `mode` 表示云录制模式:
+
+* mix: 合流录制
+* individual: 单流录制
+* web: 页面录制
+
+其中 `mix_scene` 表示合流录制场景:
+
+* hls: 录制hls格式
+* hls_and_mp4: 录制hls和mp4格式
+
+其中 `individual_scene` 表示单流录制场景:
+
+* recording: 仅录制
+* snapshot: 仅截图
+* recording_and_snapshot: 录制+截图
+* recording_and_postpone_transcoding: 录制+延时转码
+* recording_and_audio_mix: 录制+延时混音
+
+其中 `web_scene` 表示页面录制场景:
+
+* web_recorder: 页面录制
+* web_recorder_and_rtmp_publish: 页面录制+转推到CDN