tencentcloud-sdk-nodejs-intl-en 3.0.508 → 3.0.511

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (29) hide show
  1. package/package.json +1 -1
  2. package/tencentcloud/as/v20180419/as_client.js +129 -9
  3. package/tencentcloud/as/v20180419/models.js +1684 -269
  4. package/tencentcloud/billing/v20180709/models.js +67 -0
  5. package/tencentcloud/cdb/v20170320/cdb_client.js +83 -17
  6. package/tencentcloud/cdb/v20170320/models.js +619 -86
  7. package/tencentcloud/cdn/v20180606/models.js +6 -5
  8. package/tencentcloud/ckafka/v20190819/ckafka_client.js +14 -1
  9. package/tencentcloud/ckafka/v20190819/models.js +121 -20
  10. package/tencentcloud/cls/v20201016/models.js +9 -1
  11. package/tencentcloud/common/sdk_version.js +1 -1
  12. package/tencentcloud/live/v20180801/live_client.js +37 -72
  13. package/tencentcloud/live/v20180801/models.js +777 -652
  14. package/tencentcloud/monitor/v20180724/models.js +58 -0
  15. package/tencentcloud/monitor/v20180724/monitor_client.js +1 -0
  16. package/tencentcloud/ocr/v20181119/models.js +201 -43
  17. package/tencentcloud/ocr/v20181119/ocr_client.js +16 -1
  18. package/tencentcloud/redis/v20180412/models.js +65 -0
  19. package/tencentcloud/redis/v20180412/redis_client.js +13 -0
  20. package/tencentcloud/tke/v20180525/models.js +451 -58
  21. package/tencentcloud/tke/v20180525/tke_client.js +548 -483
  22. package/tencentcloud/trtc/v20190722/models.js +170 -13
  23. package/tencentcloud/trtc/v20190722/trtc_client.js +30 -26
  24. package/tencentcloud/tts/v20190823/models.js +79 -0
  25. package/tencentcloud/tts/v20190823/tts_client.js +1 -0
  26. package/tencentcloud/vod/v20180717/models.js +200 -55
  27. package/tencentcloud/vod/v20180717/vod_client.js +46 -22
  28. package/tencentcloud/vpc/v20170312/models.js +812 -279
  29. package/tencentcloud/vpc/v20170312/vpc_client.js +71 -17
@@ -903,18 +903,25 @@ class RemoveUserByStrRoomIdResponse extends AbstractModel {
903
903
  }
904
904
 
905
905
  /**
906
- * RemoveUser response structure.
906
+ * The SEI parameters for audio volume layout. You can specify the `AppData` and `PayloadType`.
907
+ This parameter may be empty, in which case the default SEI parameters for audio volume layout will be used.
907
908
  * @class
908
909
  */
909
- class RemoveUserResponse extends AbstractModel {
910
+ class McuLayoutVolume extends AbstractModel {
910
911
  constructor(){
911
912
  super();
912
913
 
913
914
  /**
914
- * The unique request ID, which is returned for each request. RequestId is required for locating a problem.
915
+ * The application data, which will be embedded in the `app_data` field of the custom SEI. It must be shorter than 4,096 characters.
915
916
  * @type {string || null}
916
917
  */
917
- this.RequestId = null;
918
+ this.AppData = null;
919
+
920
+ /**
921
+ * The payload type of the SEI message. The default is 100. Value range: 100-254 (244 is used internally by Tencent Cloud for timestamps).
922
+ * @type {number || null}
923
+ */
924
+ this.PayloadType = null;
918
925
 
919
926
  }
920
927
 
@@ -925,7 +932,8 @@ class RemoveUserResponse extends AbstractModel {
925
932
  if (!params) {
926
933
  return;
927
934
  }
928
- this.RequestId = 'RequestId' in params ? params.RequestId : null;
935
+ this.AppData = 'AppData' in params ? params.AppData : null;
936
+ this.PayloadType = 'PayloadType' in params ? params.PayloadType : null;
929
937
 
930
938
  }
931
939
  }
@@ -1046,8 +1054,8 @@ class RecordParams extends AbstractModel {
1046
1054
 
1047
1055
  /**
1048
1056
  * The recording mode.
1049
- 1: Single-stream recording. Records the audio and video of each subscribed user (`UserId`) in a room and saves the recording files (M3U8/TS) to the cloud.
1050
- 2: Mixed-stream recording. Mixes the audios and videos of subscribed users (`UserId`) in a room, records the mixed stream, and saves the recording files (M3U8/TS) to the cloud.
1057
+ 1: Single-stream recording. Records the audio and video of each subscribed user (`UserId`) in a room and saves the recording files to the cloud.
1058
+ 2: Mixed-stream recording. Mixes the audios and videos of subscribed users (`UserId`) in a room, records the mixed stream, and saves the recording files to the cloud.
1051
1059
  * @type {number || null}
1052
1060
  */
1053
1061
  this.RecordMode = null;
@@ -1074,7 +1082,7 @@ class RecordParams extends AbstractModel {
1074
1082
  this.SubscribeStreamUserIds = null;
1075
1083
 
1076
1084
  /**
1077
- * The format of recording files. 0 (default): HLS; 1: HLS + MP4 (recorded in HLS and converted to MP4).
1085
+ * The format of recording files. 0 (default): HLS; 1: HLS + MP4 (recorded in HLS and converted to MP4). This parameter is invalid if recording files are saved to VOD.
1078
1086
  * @type {number || null}
1079
1087
  */
1080
1088
  this.OutputFormat = null;
@@ -1102,6 +1110,48 @@ class RecordParams extends AbstractModel {
1102
1110
  }
1103
1111
  }
1104
1112
 
1113
+ /**
1114
+ * The custom pass-through SEI.
1115
+ * @class
1116
+ */
1117
+ class McuPassThrough extends AbstractModel {
1118
+ constructor(){
1119
+ super();
1120
+
1121
+ /**
1122
+ * The payload of the pass-through SEI.
1123
+ * @type {string || null}
1124
+ */
1125
+ this.PayloadContent = null;
1126
+
1127
+ /**
1128
+ * The payload type of the SEI message. Value range: 5 and 100-254 (244 is used internally by Tencent Cloud for timestamps).
1129
+ * @type {number || null}
1130
+ */
1131
+ this.PayloadType = null;
1132
+
1133
+ /**
1134
+ * This parameter is required only if `PayloadType` is 5. It must be a 32-character hexadecimal string. If `PayloadType` is not 5, this parameter will be ignored.
1135
+ * @type {string || null}
1136
+ */
1137
+ this.PayloadUuid = null;
1138
+
1139
+ }
1140
+
1141
+ /**
1142
+ * @private
1143
+ */
1144
+ deserialize(params) {
1145
+ if (!params) {
1146
+ return;
1147
+ }
1148
+ this.PayloadContent = 'PayloadContent' in params ? params.PayloadContent : null;
1149
+ this.PayloadType = 'PayloadType' in params ? params.PayloadType : null;
1150
+ this.PayloadUuid = 'PayloadUuid' in params ? params.PayloadUuid : null;
1151
+
1152
+ }
1153
+ }
1154
+
1105
1155
  /**
1106
1156
  * The users whose streams are mixed.
1107
1157
  * @class
@@ -1191,6 +1241,12 @@ class UpdatePublishCdnStreamRequest extends AbstractModel {
1191
1241
  */
1192
1242
  this.PublishCdnParams = null;
1193
1243
 
1244
+ /**
1245
+ * The stream mixing SEI parameters.
1246
+ * @type {McuSeiParams || null}
1247
+ */
1248
+ this.SeiParams = null;
1249
+
1194
1250
  }
1195
1251
 
1196
1252
  /**
@@ -1232,6 +1288,12 @@ class UpdatePublishCdnStreamRequest extends AbstractModel {
1232
1288
  }
1233
1289
  }
1234
1290
 
1291
+ if (params.SeiParams) {
1292
+ let obj = new McuSeiParams();
1293
+ obj.deserialize(params.SeiParams)
1294
+ this.SeiParams = obj;
1295
+ }
1296
+
1235
1297
  }
1236
1298
  }
1237
1299
 
@@ -1312,13 +1374,13 @@ class CreateCloudRecordingRequest extends AbstractModel {
1312
1374
  this.RoomId = null;
1313
1375
 
1314
1376
  /**
1315
- * The [user ID](https://intl.cloud.tencent.com/document/product/647/37714) of the recording robot in the TRTC room, which cannot be the same as a user ID already in use. We recommend you include this user ID in the room ID.
1377
+ * The [user ID](https://intl.cloud.tencent.com/document/product/647/37714) of the recording robot in the TRTC room, which cannot be the same as a user ID already in use. We recommend you include the room ID in the user ID.
1316
1378
  * @type {string || null}
1317
1379
  */
1318
1380
  this.UserId = null;
1319
1381
 
1320
1382
  /**
1321
- * The signature (similar to login password) required for the recording robot to enter the room. For information on how to calculate the signature, see [What is UserSig?](https://intl.cloud.tencent.com/document/product/647/38104). |
1383
+ * The signature (similar to a login password) required for the recording robot to enter the room. Each user ID corresponds to a signature. For information on how to calculate the signature, see [What is UserSig?](https://intl.cloud.tencent.com/document/product/647/38104).
1322
1384
  * @type {string || null}
1323
1385
  */
1324
1386
  this.UserSig = null;
@@ -1330,7 +1392,7 @@ class CreateCloudRecordingRequest extends AbstractModel {
1330
1392
  this.RecordParams = null;
1331
1393
 
1332
1394
  /**
1333
- * The cloud storage parameters.
1395
+ * The cloud storage information of the recording file. Currently, you can only save recording files to Tencent Cloud VOD.
1334
1396
  * @type {StorageParams || null}
1335
1397
  */
1336
1398
  this.StorageParams = null;
@@ -1864,6 +1926,12 @@ class StartPublishCdnStreamRequest extends AbstractModel {
1864
1926
  */
1865
1927
  this.PublishCdnParams = null;
1866
1928
 
1929
+ /**
1930
+ * The stream mixing SEI parameters.
1931
+ * @type {McuSeiParams || null}
1932
+ */
1933
+ this.SeiParams = null;
1934
+
1867
1935
  }
1868
1936
 
1869
1937
  /**
@@ -1911,6 +1979,12 @@ class StartPublishCdnStreamRequest extends AbstractModel {
1911
1979
  }
1912
1980
  }
1913
1981
 
1982
+ if (params.SeiParams) {
1983
+ let obj = new McuSeiParams();
1984
+ obj.deserialize(params.SeiParams)
1985
+ this.SeiParams = obj;
1986
+ }
1987
+
1914
1988
  }
1915
1989
  }
1916
1990
 
@@ -2005,6 +2079,34 @@ class DismissRoomRequest extends AbstractModel {
2005
2079
  }
2006
2080
  }
2007
2081
 
2082
+ /**
2083
+ * RemoveUser response structure.
2084
+ * @class
2085
+ */
2086
+ class RemoveUserResponse extends AbstractModel {
2087
+ constructor(){
2088
+ super();
2089
+
2090
+ /**
2091
+ * The unique request ID, which is returned for each request. RequestId is required for locating a problem.
2092
+ * @type {string || null}
2093
+ */
2094
+ this.RequestId = null;
2095
+
2096
+ }
2097
+
2098
+ /**
2099
+ * @private
2100
+ */
2101
+ deserialize(params) {
2102
+ if (!params) {
2103
+ return;
2104
+ }
2105
+ this.RequestId = 'RequestId' in params ? params.RequestId : null;
2106
+
2107
+ }
2108
+ }
2109
+
2008
2110
  /**
2009
2111
  * CreateCloudRecording response structure.
2010
2112
  * @class
@@ -2227,6 +2329,51 @@ Grey: 0x999999
2227
2329
  }
2228
2330
  }
2229
2331
 
2332
+ /**
2333
+ * The stream mixing SEI parameters.
2334
+ * @class
2335
+ */
2336
+ class McuSeiParams extends AbstractModel {
2337
+ constructor(){
2338
+ super();
2339
+
2340
+ /**
2341
+ * The audio volume layout SEI.
2342
+ * @type {McuLayoutVolume || null}
2343
+ */
2344
+ this.LayoutVolume = null;
2345
+
2346
+ /**
2347
+ * The pass-through SEI.
2348
+ * @type {McuPassThrough || null}
2349
+ */
2350
+ this.PassThrough = null;
2351
+
2352
+ }
2353
+
2354
+ /**
2355
+ * @private
2356
+ */
2357
+ deserialize(params) {
2358
+ if (!params) {
2359
+ return;
2360
+ }
2361
+
2362
+ if (params.LayoutVolume) {
2363
+ let obj = new McuLayoutVolume();
2364
+ obj.deserialize(params.LayoutVolume)
2365
+ this.LayoutVolume = obj;
2366
+ }
2367
+
2368
+ if (params.PassThrough) {
2369
+ let obj = new McuPassThrough();
2370
+ obj.deserialize(params.PassThrough)
2371
+ this.PassThrough = obj;
2372
+ }
2373
+
2374
+ }
2375
+ }
2376
+
2230
2377
  /**
2231
2378
  * The audio parameters for relaying.
2232
2379
  * @class
@@ -2497,7 +2644,13 @@ class McuWaterMarkParams extends AbstractModel {
2497
2644
  super();
2498
2645
 
2499
2646
  /**
2500
- * The information of the watermark image.
2647
+ * The watermark type. The default is 0, which indicates an image watermark.
2648
+ * @type {number || null}
2649
+ */
2650
+ this.WaterMarkType = null;
2651
+
2652
+ /**
2653
+ * The watermark image information. This parameter is required if `WaterMarkType` is 0.
2501
2654
  * @type {McuWaterMarkImage || null}
2502
2655
  */
2503
2656
  this.WaterMarkImage = null;
@@ -2511,6 +2664,7 @@ class McuWaterMarkParams extends AbstractModel {
2511
2664
  if (!params) {
2512
2665
  return;
2513
2666
  }
2667
+ this.WaterMarkType = 'WaterMarkType' in params ? params.WaterMarkType : null;
2514
2668
 
2515
2669
  if (params.WaterMarkImage) {
2516
2670
  let obj = new McuWaterMarkImage();
@@ -2660,10 +2814,11 @@ module.exports = {
2660
2814
  StorageParams: StorageParams,
2661
2815
  MaxVideoUser: MaxVideoUser,
2662
2816
  RemoveUserByStrRoomIdResponse: RemoveUserByStrRoomIdResponse,
2663
- RemoveUserResponse: RemoveUserResponse,
2817
+ McuLayoutVolume: McuLayoutVolume,
2664
2818
  DescribeCloudRecordingRequest: DescribeCloudRecordingRequest,
2665
2819
  TencentVod: TencentVod,
2666
2820
  RecordParams: RecordParams,
2821
+ McuPassThrough: McuPassThrough,
2667
2822
  McuUserInfoParams: McuUserInfoParams,
2668
2823
  UpdatePublishCdnStreamRequest: UpdatePublishCdnStreamRequest,
2669
2824
  VideoParams: VideoParams,
@@ -2681,10 +2836,12 @@ module.exports = {
2681
2836
  StartPublishCdnStreamRequest: StartPublishCdnStreamRequest,
2682
2837
  WaterMarkImage: WaterMarkImage,
2683
2838
  DismissRoomRequest: DismissRoomRequest,
2839
+ RemoveUserResponse: RemoveUserResponse,
2684
2840
  CreateCloudRecordingResponse: CreateCloudRecordingResponse,
2685
2841
  VideoEncode: VideoEncode,
2686
2842
  DeleteCloudRecordingRequest: DeleteCloudRecordingRequest,
2687
2843
  McuLayout: McuLayout,
2844
+ McuSeiParams: McuSeiParams,
2688
2845
  McuAudioParams: McuAudioParams,
2689
2846
  McuPublishCdnParam: McuPublishCdnParam,
2690
2847
  AudioParams: AudioParams,
@@ -32,10 +32,11 @@ const RemoveUserRequest = models.RemoveUserRequest;
32
32
  const StorageParams = models.StorageParams;
33
33
  const MaxVideoUser = models.MaxVideoUser;
34
34
  const RemoveUserByStrRoomIdResponse = models.RemoveUserByStrRoomIdResponse;
35
- const RemoveUserResponse = models.RemoveUserResponse;
35
+ const McuLayoutVolume = models.McuLayoutVolume;
36
36
  const DescribeCloudRecordingRequest = models.DescribeCloudRecordingRequest;
37
37
  const TencentVod = models.TencentVod;
38
38
  const RecordParams = models.RecordParams;
39
+ const McuPassThrough = models.McuPassThrough;
39
40
  const McuUserInfoParams = models.McuUserInfoParams;
40
41
  const UpdatePublishCdnStreamRequest = models.UpdatePublishCdnStreamRequest;
41
42
  const VideoParams = models.VideoParams;
@@ -53,10 +54,12 @@ const UserMediaStream = models.UserMediaStream;
53
54
  const StartPublishCdnStreamRequest = models.StartPublishCdnStreamRequest;
54
55
  const WaterMarkImage = models.WaterMarkImage;
55
56
  const DismissRoomRequest = models.DismissRoomRequest;
57
+ const RemoveUserResponse = models.RemoveUserResponse;
56
58
  const CreateCloudRecordingResponse = models.CreateCloudRecordingResponse;
57
59
  const VideoEncode = models.VideoEncode;
58
60
  const DeleteCloudRecordingRequest = models.DeleteCloudRecordingRequest;
59
61
  const McuLayout = models.McuLayout;
62
+ const McuSeiParams = models.McuSeiParams;
60
63
  const McuAudioParams = models.McuAudioParams;
61
64
  const McuPublishCdnParam = models.McuPublishCdnParam;
62
65
  const AudioParams = models.AudioParams;
@@ -92,6 +95,7 @@ class TrtcClient extends AbstractClient {
92
95
 
93
96
  /**
94
97
  * This API is used to query the status of a recording task after it starts. It works only when a task is in progress. If the task has already ended when this API is called, an error will be returned.
98
+ If a recording file is being uploaded to VOD, the response parameter `StorageFileList` will not contain the information of the recording file. Please listen for the recording file callback to get the information.
95
99
  * @param {DescribeCloudRecordingRequest} req
96
100
  * @param {function(string, DescribeCloudRecordingResponse):void} cb
97
101
  * @public
@@ -102,18 +106,18 @@ class TrtcClient extends AbstractClient {
102
106
  }
103
107
 
104
108
  /**
105
- * ### API description
109
+ * API description:
106
110
  This API is used to start an on-cloud recording task. It records the audio and video streams in a room and saves them to the specified cloud storage. You can use this API to record the streams in a room separately, or you can mix the streams first and then record the mixed stream.
107
111
 
108
- ### You can use this API to perform the following operations:
112
+ You can use this API to perform the following operations:
109
113
  * Specify the anchors whose streams you want or do not want to record by using the `RecordParams` parameter
110
114
  * Specify the storage service you want to save recording files to by using the `StorageParams` parameter
111
115
  * Specify transcoding settings for mixed-stream recording, including video resolution, video bitrate, frame rate, and audio quality, by using `MixTranscodeParams`
112
116
  * Specify the layout of different videos in mixed-stream recording mode or select an auto-arranged layout template
113
117
 
114
- ### Key concepts
115
- * Single-stream recording: Record the audio and video of each subscribed user (`UserId`) in a room and save the recording files (M3U8/TS) to the cloud
116
- * Mixed-stream recording: Mix the audios and videos of subscribed users (`UserId`) in a room, record the mixed stream, and save the recording files (M3U8/TS) to the cloud
118
+ Key concepts:
119
+ * Single-stream recording: Record the audio and video of each subscribed user (`UserId`) in a room and save the recording files to VOD.
120
+ * Mixed-stream recording: Mix the audios and videos of subscribed users (`UserId`) in a room, record the mixed stream, and save the recording files to VOD.
117
121
  * @param {CreateCloudRecordingRequest} req
118
122
  * @param {function(string, CreateCloudRecordingResponse):void} cb
119
123
  * @public
@@ -135,7 +139,7 @@ This API is used to start an on-cloud recording task. It records the audio and v
135
139
  }
136
140
 
137
141
  /**
138
- * This API is used to stop a recording task. It works only when a task is in progress. If the task has already ended when this API is called, an error will be returned. If a task is stopped successfully, but the uploading of recording files has not completed, the backend will continue to upload the files and will notify you via a callback when the upload is completed.
142
+ * This API is used to stop a recording task. If a task is stopped successfully, but the uploading of recording files has not completed, the backend will continue to upload the files and will notify you via a callback when the upload is completed.
139
143
  * @param {DeleteCloudRecordingRequest} req
140
144
  * @param {function(string, DeleteCloudRecordingResponse):void} cb
141
145
  * @public
@@ -157,26 +161,26 @@ This API is used to start an on-cloud recording task. It records the audio and v
157
161
  }
158
162
 
159
163
  /**
160
- * This API is used to start a relaying task.
161
- 1. To ensure the stability of relaying, you cannot switch between relaying audio only, relaying audio and video, and relaying video only for the same task.
162
- 2. To ensure the stability of relaying, you cannot change the video codec, audio codec, sample rate, or number of sound channels during relay.
163
- 3. The `StartPublishCdnStream` API will return a task ID, which uniquely identifies a relaying task. You need to pass this task ID when making a request to change the relaying parameters or stop the relaying task.
164
+ * This API is used to mix streams and relay the mixed stream to CDNs. You can use this API to do the following:
165
+ 1. Publish (also known as “relay”) the audio/video stream of one anchor to CDNs. For details, see example 2 (starting a task to relay the audio and video of a stream) and example 3 (starting a task to relay only the audio of a stream).
166
+ 2. Mix the streams of multiple anchors in a room or in different rooms and publish the mixed stream to CDNs. You can use `AudioParams.SubscribeAudioList` to specify the users whose audios are mixed, and use `VideoParams.LayoutParams` to specify the layout of the anchors’ videos. For details, see example 1 (mixing streams and publishing the mixed stream to a CDN).
167
+ 3. Mix multiple streams in a room according to a template and publish the mixed stream to CDNs. The TRTC backend will detect the change of anchors in the room and adjust the video layout automatically according to the stream mixing template. The following template types are supported:
168
+ - Floating: The entire screen is covered by the video image of the first user who enters the room, and the images of other users are displayed as small images in rows in the bottom-left corner in room entry sequence. The screen allows up to 4 rows of 4 small images, which float over the large main image. Up to 1 large image and 15 small images can be displayed.
169
+ - Grid: The images of all users split the screen evenly. The more the users, the smaller the image dimensions. Up to 16 images are supported.
170
+ - Screen sharing: This is designed for video conferencing and online education. The shared screen (or camera image of the anchor) is always displayed as the large main image, which occupies the left half of the screen, and the images of other users occupy the right half in up to two columns of up to eight small images each. Up to 1 large image and 15 small images can be displayed. If the upstream aspect ratio does not match the output, the large image on the left will be scaled and displayed in whole, while the small images on the right will be cropped.
171
+ 4. Publish audio/video streams to up to 10 CDNs at a time. You can use `PublishCdnParams.PublishCdnUrl` to specify the URLs of the CDNs to publish to. To publish to Tencent Cloud’s CDN, set `PublishCdnParams.IsTencentCdn` to 1.
172
+ 5. Configure a server-side callback to have Tencent Cloud send relay status updates to your server in the form of HTTP/HTTPS POST requests. To use the callback for relay events, please contact Technical Support.
173
+ Notes:
174
+ 1. **Because On-Cloud MixTranscoding is a paid feature, calling this API will incur MixTranscoding fees. For details, see [Billing of MixTranscoding and Relay to CDN](https://intl.cloud.tencent.com/document/product/647/47631?lang=en&pg=).**
175
+ 2. **Relaying to third-party CDNs will incur relaying fees. For details, see [Billing of MixTranscoding and Relay to CDN](https://intl.cloud.tencent.com/document/product/647/47631?lang=en&pg=).**
176
+
177
+ Others:
178
+ 1. You need to first call `StartPublishCdnStream` to start a relay task and get the task ID before you can use the `UpdatePublishCdnStream` API to modify the task and `StopPublishCdnStream` to stop the task.
179
+ 2. To ensure the stability of relaying, you cannot switch between relaying audio only, relaying audio and video, and relaying video only for the same task.
180
+ 3. To ensure the stability of relaying, you cannot change the video codec, audio codec, audio sample rate, audio bitrate, or sound channels using the `UpdatePublishCdnStream` API.
164
181
  4. When you relay a single stream, specify both `AudioParams` and `VideoParams` to publish both audio and video, and specify only `AudioParams` to publish audio only. You cannot switch between the two modes during the relaying process. For `VideoParams`, set `Width`, `Height`, `Fps`, `Bitrate`, and `Gop` according to the actual settings used for publishing.
165
- 5. When you make a request to change the relaying parameters, set `AudioParams.SubscribeAudioList` to specify the audios to mix and set `VideoParams.LayoutParams` to specify the video layout.
166
- 6. The `SequenceNumber` parameter is required when you make a request to change the relaying parameters. It ensures that multiple requests for the same relaying task are in the correct order. The value of `SequenceNumber` increases each time a new request is made for the same task. If `InternalError` is returned, try again using the same `SequenceNumber`. You don’t need to handle the `FailedOperation.OutdateRequest` error.
167
- 7. In a request to change the relaying parameters, it is OK to pass only the parameters you want to change, but the value of each parameter you pass must be complete.
168
- For example, to change the destination URLs, you only need to pass `PublishCdnParams` plus the required parameters of the `UpdatePublishCdnStream` API, but make sure `PublishCdnParams` includes all the URLs you want to relay to.
169
- Pass the following parameters to change different relaying parameters:
170
- a. WithTranscoding: Pass this parameter to switch from not transcoding to transcoding (this parameter is required).
171
- b. AudioParams.UserInfoList: Pass this parameter to change the users whose audios you want to mix.
172
- c. VideoParams.VideoEncode: Pass this parameter to change video parameters other than the codec, including the output resolution, bitrate, frame rate, and GOP. This parameter is valid only if streams are transcoded.
173
- d. LayoutParams: Pass this parameter to change the video layout. This parameter is valid only if streams are transcoded.
174
- e. BackGroundColor and BackgroundImageUrl: Pass these two parameters to change the background image and color. They are valid only when streams are transcoded.
175
- f. WaterMarkList: Pass this parameter to change the watermarks. This parameter is valid only if streams are transcoded.
176
- g. PublishCdnParams: Pass this parameter to change the destination URLs.
177
- 8. You can create a relaying task even when there are no anchors in the room, but make sure you manually stop the task when relaying is finished. If you don’t, after all the users whose streams are mixed leave the room, the TRTC backend will wait for the timeout period to elapse before stopping the relaying task.
178
- 9. You can specify at most 10 destination URLs for each relaying task.
179
- 10. When making a request to switch from not transcoding to transcoding, you need to specify all the parameters of the relaying task.
182
+ 5. The `SequenceNumber` parameter is required when you call `UpdatePublishCdnStream` to change the relaying parameters. It ensures that multiple requests for the same relaying task are in the correct order. The value of `SequenceNumber` increases each time a new request is made for the same task. If `InternalError` is returned, try again using the same `SequenceNumber`. You don’t need to handle the `FailedOperation.OutdateRequest` error.
183
+ 6. You can create a relay task before anchors enter a room, in which case you need to manually call `StopPublishCdnStream` to stop the task. If you don’t, after all the users whose streams are mixed leave the room, the TRTC backend will wait for the timeout period (`AgentParams.MaxIdleTime`) to elapse before stopping the relaying task.
180
184
  * @param {StartPublishCdnStreamRequest} req
181
185
  * @param {function(string, StartPublishCdnStreamResponse):void} cb
182
186
  * @public
@@ -36,6 +36,12 @@ class TextToVoiceResponse extends AbstractModel {
36
36
  */
37
37
  this.SessionId = null;
38
38
 
39
+ /**
40
+ * Timestamp information. If the timestamp feature is not enabled, an empty array will be returned.
41
+ * @type {Array.<Subtitle> || null}
42
+ */
43
+ this.Subtitles = null;
44
+
39
45
  /**
40
46
  * The unique request ID, which is returned for each request. RequestId is required for locating a problem.
41
47
  * @type {string || null}
@@ -53,11 +59,76 @@ class TextToVoiceResponse extends AbstractModel {
53
59
  }
54
60
  this.Audio = 'Audio' in params ? params.Audio : null;
55
61
  this.SessionId = 'SessionId' in params ? params.SessionId : null;
62
+
63
+ if (params.Subtitles) {
64
+ this.Subtitles = new Array();
65
+ for (let z in params.Subtitles) {
66
+ let obj = new Subtitle();
67
+ obj.deserialize(params.Subtitles[z]);
68
+ this.Subtitles.push(obj);
69
+ }
70
+ }
56
71
  this.RequestId = 'RequestId' in params ? params.RequestId : null;
57
72
 
58
73
  }
59
74
  }
60
75
 
76
+ /**
77
+ * The information about the timestamps.
78
+ * @class
79
+ */
80
+ class Subtitle extends AbstractModel {
81
+ constructor(){
82
+ super();
83
+
84
+ /**
85
+ * The word in the text that is sent.
86
+ * @type {string || null}
87
+ */
88
+ this.Text = null;
89
+
90
+ /**
91
+ * The start timestamp of the word in the synthesized audio data, in milliseconds.
92
+ * @type {number || null}
93
+ */
94
+ this.BeginTime = null;
95
+
96
+ /**
97
+ * The end timestamp of the word in the synthesized audio data, in milliseconds.
98
+ * @type {number || null}
99
+ */
100
+ this.EndTime = null;
101
+
102
+ /**
103
+ * The start index of the character in the whole sentence, starting from 0.
104
+ * @type {number || null}
105
+ */
106
+ this.BeginIndex = null;
107
+
108
+ /**
109
+ * The end index of the character in the whole sentence, starting from 0.
110
+ * @type {number || null}
111
+ */
112
+ this.EndIndex = null;
113
+
114
+ }
115
+
116
+ /**
117
+ * @private
118
+ */
119
+ deserialize(params) {
120
+ if (!params) {
121
+ return;
122
+ }
123
+ this.Text = 'Text' in params ? params.Text : null;
124
+ this.BeginTime = 'BeginTime' in params ? params.BeginTime : null;
125
+ this.EndTime = 'EndTime' in params ? params.EndTime : null;
126
+ this.BeginIndex = 'BeginIndex' in params ? params.BeginIndex : null;
127
+ this.EndIndex = 'EndIndex' in params ? params.EndIndex : null;
128
+
129
+ }
130
+ }
131
+
61
132
  /**
62
133
  * TextToVoice request structure.
63
134
  * @class
@@ -127,6 +198,12 @@ It can contain up to 150 Chinese characters (a full-width punctuation as a Chine
127
198
  */
128
199
  this.Codec = null;
129
200
 
201
+ /**
202
+ * Whether to enable the timestamp feature. Default value: `false`.
203
+ * @type {boolean || null}
204
+ */
205
+ this.EnableSubtitle = null;
206
+
130
207
  }
131
208
 
132
209
  /**
@@ -146,12 +223,14 @@ It can contain up to 150 Chinese characters (a full-width punctuation as a Chine
146
223
  this.PrimaryLanguage = 'PrimaryLanguage' in params ? params.PrimaryLanguage : null;
147
224
  this.SampleRate = 'SampleRate' in params ? params.SampleRate : null;
148
225
  this.Codec = 'Codec' in params ? params.Codec : null;
226
+ this.EnableSubtitle = 'EnableSubtitle' in params ? params.EnableSubtitle : null;
149
227
 
150
228
  }
151
229
  }
152
230
 
153
231
  module.exports = {
154
232
  TextToVoiceResponse: TextToVoiceResponse,
233
+ Subtitle: Subtitle,
155
234
  TextToVoiceRequest: TextToVoiceRequest,
156
235
 
157
236
  }
@@ -17,6 +17,7 @@
17
17
  const models = require("./models");
18
18
  const AbstractClient = require('../../common/abstract_client')
19
19
  const TextToVoiceResponse = models.TextToVoiceResponse;
20
+ const Subtitle = models.Subtitle;
20
21
  const TextToVoiceRequest = models.TextToVoiceRequest;
21
22
 
22
23