@rongcloud/engine 5.0.0-alpha.1 → 5.0.0-alpha.5
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.
- package/dist/index.d.ts +254 -48
- package/dist/index.esm.js +1 -1
- package/dist/index.js +1 -1
- package/dist/index.umd.js +1 -1
- package/package.json +6 -4
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* RCEngine - v5.0.0-alpha.
|
|
3
|
-
* CommitId -
|
|
4
|
-
*
|
|
2
|
+
* RCEngine - v5.0.0-alpha.5
|
|
3
|
+
* CommitId - fdd7669c36efb128309e9ef87a895076dff812bc
|
|
4
|
+
* Fri Oct 15 2021 13:45:07 GMT+0800 (China Standard Time)
|
|
5
5
|
* ©2020 RongCloud, Inc. All rights reserved.
|
|
6
6
|
*/
|
|
7
7
|
/**
|
|
@@ -138,6 +138,42 @@ declare enum OperationType {
|
|
|
138
138
|
DISCONNECT = 14,
|
|
139
139
|
RESERVER2 = 15
|
|
140
140
|
}
|
|
141
|
+
/**
|
|
142
|
+
* connect 版本号,用于区分 ConnAckMessage 的解析规则
|
|
143
|
+
*/
|
|
144
|
+
declare enum ConnAckProtocolVer {
|
|
145
|
+
/**
|
|
146
|
+
* V4 说明:
|
|
147
|
+
* ```
|
|
148
|
+
* 增加 flag 来标识每个位置是否有内容,如果没有 messageId 说明此 APP 没有配置防重放,默认取0
|
|
149
|
+
* status | 4byte
|
|
150
|
+
* flag | 1byte 每一位标识是否有对应值,由低到高
|
|
151
|
+
* userId | 可变长
|
|
152
|
+
* sessionId | 可变长
|
|
153
|
+
* timestamp | 8byte
|
|
154
|
+
* messageId | 4byte
|
|
155
|
+
* onlineClientInfo | 可变长
|
|
156
|
+
* ===
|
|
157
|
+
* flag 描述:
|
|
158
|
+
* | | | | 4 | 3 | 2 | 1 | 0 |
|
|
159
|
+
* | | | | hasOnlineClientInfo | hasMessageId | hasTimeStamp | hasSessionId | hasUserId |
|
|
160
|
+
* ```
|
|
161
|
+
*/
|
|
162
|
+
V4 = 4,
|
|
163
|
+
/**
|
|
164
|
+
* V3 说明:
|
|
165
|
+
* ```
|
|
166
|
+
* status | 4byte
|
|
167
|
+
* userId | 可变长
|
|
168
|
+
* sessionId | 可变长
|
|
169
|
+
* timestamp | 8byte
|
|
170
|
+
* descyptionType | 1byte
|
|
171
|
+
* secretKey | 可变长
|
|
172
|
+
* onlineClientInfo | 可变长
|
|
173
|
+
* ```
|
|
174
|
+
*/
|
|
175
|
+
V3 = 3
|
|
176
|
+
}
|
|
141
177
|
|
|
142
178
|
/**
|
|
143
179
|
* @todo 注释补全
|
|
@@ -163,6 +199,10 @@ declare class RongStreamReader {
|
|
|
163
199
|
private _poolLen;
|
|
164
200
|
constructor(arr: Uint8Array);
|
|
165
201
|
check(): boolean;
|
|
202
|
+
/**
|
|
203
|
+
* 读 2 位
|
|
204
|
+
*/
|
|
205
|
+
read2Byte(): number;
|
|
166
206
|
/**
|
|
167
207
|
* 读 4 位
|
|
168
208
|
*/
|
|
@@ -219,8 +259,8 @@ declare class BaseReader {
|
|
|
219
259
|
identifier: string;
|
|
220
260
|
constructor(header: Header);
|
|
221
261
|
getIdentifier(): string | number;
|
|
222
|
-
read(stream: RongStreamReader, length: number): void;
|
|
223
|
-
readMessage(stream: RongStreamReader, length?: number): {
|
|
262
|
+
read(stream: RongStreamReader, length: number, protocolVer: ConnAckProtocolVer): void;
|
|
263
|
+
readMessage(stream: RongStreamReader, length?: number, protocolVer?: ConnAckProtocolVer): {
|
|
224
264
|
stream: RongStreamReader;
|
|
225
265
|
length: number | undefined;
|
|
226
266
|
};
|
|
@@ -408,6 +448,24 @@ declare enum ChatroomEntryType {
|
|
|
408
448
|
DELETE = 2
|
|
409
449
|
}
|
|
410
450
|
|
|
451
|
+
/**
|
|
452
|
+
* 消息被拦截类型
|
|
453
|
+
*/
|
|
454
|
+
declare enum MessageBlockType {
|
|
455
|
+
/*!
|
|
456
|
+
全局敏感词:命中了融云内置的全局敏感词
|
|
457
|
+
*/
|
|
458
|
+
GLOBAL = 1,
|
|
459
|
+
/*!
|
|
460
|
+
自定义敏感词拦截:命中了客户在融云自定义的敏感词
|
|
461
|
+
*/
|
|
462
|
+
CUSTOM = 2,
|
|
463
|
+
/*!
|
|
464
|
+
第三方审核拦截:命中了第三方(数美)或模板路由决定不下发的状态
|
|
465
|
+
*/
|
|
466
|
+
THIRD_PARTY = 3
|
|
467
|
+
}
|
|
468
|
+
|
|
411
469
|
declare enum MessageDirection {
|
|
412
470
|
/**
|
|
413
471
|
* 己方发送消息
|
|
@@ -866,6 +924,15 @@ interface ISendExMsgOptions {
|
|
|
866
924
|
[key: string]: string;
|
|
867
925
|
} | null;
|
|
868
926
|
}
|
|
927
|
+
/**
|
|
928
|
+
* 被拦截的消息信息
|
|
929
|
+
*/
|
|
930
|
+
interface IBlockedMessageInfo {
|
|
931
|
+
blockedMessageUId: string;
|
|
932
|
+
conversationType: number;
|
|
933
|
+
targetId: string;
|
|
934
|
+
blockType: MessageBlockType;
|
|
935
|
+
}
|
|
869
936
|
|
|
870
937
|
/**
|
|
871
938
|
* TODO: 确定对外暴露的必要性
|
|
@@ -1108,6 +1175,18 @@ declare enum ErrorCode {
|
|
|
1108
1175
|
* Disconnect,由服务器返回,比如用户互踢。
|
|
1109
1176
|
*/
|
|
1110
1177
|
RC_DISCONN_EXCEPTION = 31011,
|
|
1178
|
+
/**
|
|
1179
|
+
* app 验证Token 验证不通过。所有内部超时,访问失败,返回给客户端sdk都是验证不通过,由服务端日志去看具体是那种失败。
|
|
1180
|
+
*/
|
|
1181
|
+
RC_APP_AUTH_NOT_PASS = 31026,
|
|
1182
|
+
/**
|
|
1183
|
+
* One Time Password 已经被使用过
|
|
1184
|
+
*/
|
|
1185
|
+
RC_OTP_USED = 31027,
|
|
1186
|
+
/**
|
|
1187
|
+
* token平台验证失败
|
|
1188
|
+
*/
|
|
1189
|
+
RC_PLATFORM_ERROR = 31028,
|
|
1111
1190
|
/**
|
|
1112
1191
|
* 协议层内部错误。query,上传下载过程中数据错误。
|
|
1113
1192
|
*/
|
|
@@ -1146,10 +1225,14 @@ declare enum ErrorCode {
|
|
|
1146
1225
|
MSG_ROAMING_SERVICE_UNAVAILABLE = 33007,
|
|
1147
1226
|
MSG_INSERT_ERROR = 33008,
|
|
1148
1227
|
MSG_DEL_ERROR = 33009,
|
|
1228
|
+
/**
|
|
1229
|
+
* 标签已存在
|
|
1230
|
+
*/
|
|
1231
|
+
TAG_EXISTS = 33101,
|
|
1149
1232
|
/**
|
|
1150
1233
|
* 标签不存在
|
|
1151
1234
|
*/
|
|
1152
|
-
TAG_NOT_EXIST =
|
|
1235
|
+
TAG_NOT_EXIST = 33100,
|
|
1153
1236
|
/**
|
|
1154
1237
|
* 会话中不存在此标签
|
|
1155
1238
|
*/
|
|
@@ -1430,6 +1513,23 @@ declare enum RTCIdentityChangeType {
|
|
|
1430
1513
|
AnchorToViewer = 1,
|
|
1431
1514
|
ViewerToAnchor = 2
|
|
1432
1515
|
}
|
|
1516
|
+
/**
|
|
1517
|
+
* RTC 房间加入类型
|
|
1518
|
+
*/
|
|
1519
|
+
declare enum RTCJoinType {
|
|
1520
|
+
/**
|
|
1521
|
+
* 踢前一个设备
|
|
1522
|
+
*/
|
|
1523
|
+
KICK = 0,
|
|
1524
|
+
/**
|
|
1525
|
+
* 当前加入拒绝
|
|
1526
|
+
*/
|
|
1527
|
+
REFUSE = 1,
|
|
1528
|
+
/**
|
|
1529
|
+
* 两个设备共存
|
|
1530
|
+
*/
|
|
1531
|
+
COEXIST = 2
|
|
1532
|
+
}
|
|
1433
1533
|
|
|
1434
1534
|
/**
|
|
1435
1535
|
* 序列化、反序列化数据通道
|
|
@@ -1512,7 +1612,14 @@ declare class DataCodec {
|
|
|
1512
1612
|
* 格式化 RTC 用户加入房间后通知拉取的数据(房间内主播全量列表、房间全量资源)
|
|
1513
1613
|
*/
|
|
1514
1614
|
private _formatRTCRoomKVList;
|
|
1615
|
+
/**
|
|
1616
|
+
* 格式化观众加房间后返回数据
|
|
1617
|
+
*/
|
|
1515
1618
|
private _formatRTCAuidenceJoinRoomData;
|
|
1619
|
+
/**
|
|
1620
|
+
* 格式化加入 RTC 房间的用户信息
|
|
1621
|
+
*/
|
|
1622
|
+
private _formatRTCJoinedUserInfo;
|
|
1516
1623
|
/**
|
|
1517
1624
|
* ===== 以下为通用数据 序列化为 PB 数据 =====
|
|
1518
1625
|
* Engine Index 调用处理数据
|
|
@@ -1642,7 +1749,7 @@ declare class DataCodec {
|
|
|
1642
1749
|
/**
|
|
1643
1750
|
* 加入 RTC 房间
|
|
1644
1751
|
*/
|
|
1645
|
-
encodeJoinRTCRoom(mode: RTCMode, broadcastType?: number): any[];
|
|
1752
|
+
encodeJoinRTCRoom(mode: RTCMode, broadcastType?: number, joinType?: RTCJoinType): any[];
|
|
1646
1753
|
/**
|
|
1647
1754
|
* 退出 RTC 房间
|
|
1648
1755
|
*/
|
|
@@ -1658,6 +1765,7 @@ declare class DataCodec {
|
|
|
1658
1765
|
* 全量 URI
|
|
1659
1766
|
*/
|
|
1660
1767
|
encodeUserSetRTCData(message: any, valueInfo: string, objectName: string, mcuValInfo: string): any;
|
|
1768
|
+
encodeUserSetRTCCDNUris(objectName: string, CDNUris: string): any;
|
|
1661
1769
|
/**
|
|
1662
1770
|
* 用户属性获取
|
|
1663
1771
|
*/
|
|
@@ -1700,6 +1808,10 @@ declare class DataCodec {
|
|
|
1700
1808
|
* RTC 直播观众拉取房间内 KV
|
|
1701
1809
|
*/
|
|
1702
1810
|
encodePullRTCRoomKV(roomId: string, timestamp: number): any;
|
|
1811
|
+
/**
|
|
1812
|
+
* RTC 查询在房间内用户的信息
|
|
1813
|
+
*/
|
|
1814
|
+
encodeQueryUserJoinedInfo(userId: string): any;
|
|
1703
1815
|
}
|
|
1704
1816
|
|
|
1705
1817
|
/**
|
|
@@ -1840,7 +1952,7 @@ declare abstract class ADataChannel {
|
|
|
1840
1952
|
* @param protocol 请求导航数据时使用的网络协议, /ping 与 websocket 需要继续遵循该协议
|
|
1841
1953
|
* @param apiVersion - apiVersion 需符合 `/\d+(\.\d+){2}/` 规则,对于预发布版本号如 `3.1.0-alpha.1` 需认定为 `3.1.0`
|
|
1842
1954
|
*/
|
|
1843
|
-
abstract connect(appkey: string, token: string, host: string[], protocol: 'http' | 'https', apiVersion: string): Promise<ErrorCode>;
|
|
1955
|
+
abstract connect(appkey: string, token: string, host: string[], protocol: 'http' | 'https', apiVersion: string, protocolVer: ConnAckProtocolVer): Promise<ErrorCode>;
|
|
1844
1956
|
/**
|
|
1845
1957
|
* 只发送数据,无需响应
|
|
1846
1958
|
*/
|
|
@@ -2007,7 +2119,7 @@ declare class WebSocketChannel extends ADataChannel {
|
|
|
2007
2119
|
* @param protocol
|
|
2008
2120
|
* @param apiVersion - apiVersion 需符合 `/\d+(\.\d+){2}/` 规则
|
|
2009
2121
|
*/
|
|
2010
|
-
connect(appkey: string, token: string, hosts: string[], protocol: 'http' | 'https', apiVersion: string): Promise<ErrorCode>;
|
|
2122
|
+
connect(appkey: string, token: string, hosts: string[], protocol: 'http' | 'https', apiVersion: string, protocolVer: ConnAckProtocolVer): Promise<ErrorCode>;
|
|
2011
2123
|
/**
|
|
2012
2124
|
* 当前累计心跳超时次数
|
|
2013
2125
|
*/
|
|
@@ -2051,7 +2163,12 @@ declare class CometChannel extends ADataChannel {
|
|
|
2051
2163
|
* 长轮询心跳
|
|
2052
2164
|
*/
|
|
2053
2165
|
_startPullSignal(protocol: 'http' | 'https'): Promise<void>;
|
|
2054
|
-
|
|
2166
|
+
/**
|
|
2167
|
+
* 连接
|
|
2168
|
+
* comet 连接暂时不走 protocolVer=v4 的协议
|
|
2169
|
+
* @returns
|
|
2170
|
+
*/
|
|
2171
|
+
connect(appkey: string, token: string, hosts: string[], protocol: 'http' | 'https', apiVersion: string, protocolVer: ConnAckProtocolVer): Promise<ErrorCode>;
|
|
2055
2172
|
private _idCount;
|
|
2056
2173
|
private _generateMessageId;
|
|
2057
2174
|
sendCometData(writer: BaseWriter, timeout?: number): Promise<void>;
|
|
@@ -2258,7 +2375,7 @@ interface IChatroomListenerData {
|
|
|
2258
2375
|
*/
|
|
2259
2376
|
chatroomDestroyed?: string;
|
|
2260
2377
|
}
|
|
2261
|
-
interface
|
|
2378
|
+
interface IChatRoomEntry {
|
|
2262
2379
|
/**
|
|
2263
2380
|
* 属性名称, 支持英文字母、数字、+、=、-、_ 的组合方式, 最大长度 128 字符
|
|
2264
2381
|
*/
|
|
@@ -2301,7 +2418,7 @@ interface IChatroomInfo {
|
|
|
2301
2418
|
*/
|
|
2302
2419
|
userCount: number;
|
|
2303
2420
|
}
|
|
2304
|
-
interface
|
|
2421
|
+
interface IRemoveChatRoomEntry {
|
|
2305
2422
|
/**
|
|
2306
2423
|
* 属性名称, 支持英文字母、数字、+、=、-、_ 的组合方式, 最大长度 128 字符
|
|
2307
2424
|
*/
|
|
@@ -2315,7 +2432,22 @@ interface IRemoveChatRoomEntryOption {
|
|
|
2315
2432
|
*/
|
|
2316
2433
|
notificationExtra?: string;
|
|
2317
2434
|
}
|
|
2318
|
-
interface
|
|
2435
|
+
interface IRemoveChatRoomEntries {
|
|
2436
|
+
/**
|
|
2437
|
+
* key 属性名称, 支持英文字母、数字、+、=、-、_ 的组合方式, 最大长度 128 字符
|
|
2438
|
+
*/
|
|
2439
|
+
entries: {
|
|
2440
|
+
key: string;
|
|
2441
|
+
}[];
|
|
2442
|
+
/**
|
|
2443
|
+
* 删除成功后是否发送通知消息
|
|
2444
|
+
*/
|
|
2445
|
+
/**
|
|
2446
|
+
* RC:chrmKVNotiMsg 消息中携带的附加信息
|
|
2447
|
+
*/
|
|
2448
|
+
notificationExtra?: string;
|
|
2449
|
+
}
|
|
2450
|
+
interface IChatRoomEntries {
|
|
2319
2451
|
/**
|
|
2320
2452
|
* entries ,要设置的属性列表
|
|
2321
2453
|
* key 属性名称, 支持英文字母、数字、+、=、-、_ 的组合方式, 最大长度 128 字符
|
|
@@ -2460,6 +2592,10 @@ interface IRTCUsers {
|
|
|
2460
2592
|
interface IJoinRTCRoomData extends IRTCUsers {
|
|
2461
2593
|
token: string;
|
|
2462
2594
|
sessionId: string;
|
|
2595
|
+
roomInfo: {
|
|
2596
|
+
key: string;
|
|
2597
|
+
value: string;
|
|
2598
|
+
}[];
|
|
2463
2599
|
}
|
|
2464
2600
|
interface KVString {
|
|
2465
2601
|
[key: string]: string;
|
|
@@ -2719,6 +2855,10 @@ interface INaviInfo {
|
|
|
2719
2855
|
* 群组回执开关, 1: 打开,0(或者没有): 关闭
|
|
2720
2856
|
*/
|
|
2721
2857
|
grpRRVer?: number;
|
|
2858
|
+
/**
|
|
2859
|
+
* 防黑产开关, 1: 打开,0:关闭
|
|
2860
|
+
*/
|
|
2861
|
+
openAnti?: number;
|
|
2722
2862
|
}
|
|
2723
2863
|
|
|
2724
2864
|
declare enum ReceivedStatus {
|
|
@@ -2808,6 +2948,22 @@ declare const ConnectResultCode: {
|
|
|
2808
2948
|
* 开启`禁止把已在线客户端踢下线`开关后,该错误码标识已有同类型端在线,禁止链接
|
|
2809
2949
|
*/
|
|
2810
2950
|
HASOHTERSAMECLIENTONLINE: number;
|
|
2951
|
+
/**
|
|
2952
|
+
* 客户端连错环境,引发连接拒绝
|
|
2953
|
+
*/
|
|
2954
|
+
IN_OTHER_CLUSTER: number;
|
|
2955
|
+
/**
|
|
2956
|
+
* app 验证Token 验证不通过。所有内部超时,访问失败,返回给客户端sdk都是验证不通过,由服务端日志去看具体是那种失败。
|
|
2957
|
+
*/
|
|
2958
|
+
APP_AUTH_NOT_PASS: number;
|
|
2959
|
+
/**
|
|
2960
|
+
* One Time Password 已经被使用过
|
|
2961
|
+
*/
|
|
2962
|
+
OTP_USED: number;
|
|
2963
|
+
/**
|
|
2964
|
+
* token平台验证失败
|
|
2965
|
+
*/
|
|
2966
|
+
PLATFORM_ERROR: number;
|
|
2811
2967
|
};
|
|
2812
2968
|
|
|
2813
2969
|
/**
|
|
@@ -2905,7 +3061,15 @@ declare enum MessageType {
|
|
|
2905
3061
|
/**
|
|
2906
3062
|
* 用户加入退出聊天室的集合
|
|
2907
3063
|
*/
|
|
2908
|
-
CHATROOM_MERGE_CHANGE = "RC:ChrmMemChange"
|
|
3064
|
+
CHATROOM_MERGE_CHANGE = "RC:ChrmMemChange",
|
|
3065
|
+
/**
|
|
3066
|
+
* 输入状态消息
|
|
3067
|
+
*/
|
|
3068
|
+
TYPING_STATUS = "RC:TypSts",
|
|
3069
|
+
/**
|
|
3070
|
+
* 拦截消息,(当发送的消息的敏感词时,服务会下发一个拦截消息,内容包含被拦截消息信息)
|
|
3071
|
+
*/
|
|
3072
|
+
INTERCEPT = "RC:InterceptMsg"
|
|
2909
3073
|
}
|
|
2910
3074
|
|
|
2911
3075
|
/**
|
|
@@ -3311,6 +3475,10 @@ interface IEngine {
|
|
|
3311
3475
|
* 获取设备ID
|
|
3312
3476
|
*/
|
|
3313
3477
|
getDeviceId(): string;
|
|
3478
|
+
/**
|
|
3479
|
+
* 获取当前 userId
|
|
3480
|
+
*/
|
|
3481
|
+
getCurrentUserId(): string;
|
|
3314
3482
|
/**
|
|
3315
3483
|
* 设置用户在线状态监听器
|
|
3316
3484
|
*/
|
|
@@ -3450,6 +3618,7 @@ interface IEngine {
|
|
|
3450
3618
|
getRTCToken(roomId: string, mode: number, broadcastType?: number): IPromiseResult<IRtcTokenData>;
|
|
3451
3619
|
setRTCState(roomId: string, reportId: string): Promise<ErrorCode>;
|
|
3452
3620
|
getRTCUserList(roomId: string): IPromiseResult<IRTCUsers>;
|
|
3621
|
+
setRTCCDNUris(roomId: string, objectName: string, CDNUris: string): Promise<ErrorCode>;
|
|
3453
3622
|
}
|
|
3454
3623
|
|
|
3455
3624
|
interface IExpansionMsgContent {
|
|
@@ -3473,6 +3642,24 @@ interface IExpansionMsgContent {
|
|
|
3473
3642
|
removeAll?: number;
|
|
3474
3643
|
}
|
|
3475
3644
|
|
|
3645
|
+
/**
|
|
3646
|
+
* 加入 RTC 房间的用户信息
|
|
3647
|
+
*/
|
|
3648
|
+
interface IRTCJoinedInfo {
|
|
3649
|
+
/**
|
|
3650
|
+
* 设备 ID
|
|
3651
|
+
*/
|
|
3652
|
+
deviceId: string;
|
|
3653
|
+
/**
|
|
3654
|
+
* RTC 房间 ID
|
|
3655
|
+
*/
|
|
3656
|
+
roomId: string;
|
|
3657
|
+
/**
|
|
3658
|
+
* 加入的时间戳
|
|
3659
|
+
*/
|
|
3660
|
+
joinTime: number;
|
|
3661
|
+
}
|
|
3662
|
+
|
|
3476
3663
|
/**
|
|
3477
3664
|
* typing相关接口
|
|
3478
3665
|
*/
|
|
@@ -3538,10 +3725,9 @@ declare type IRTCInnerListener = {
|
|
|
3538
3725
|
};
|
|
3539
3726
|
declare type IExpansionListener = (data: IExpansionListenerData) => void;
|
|
3540
3727
|
declare type ITagListener = () => void;
|
|
3541
|
-
declare type IConversationTagListener = (
|
|
3542
|
-
tags: ILocalTagStatus;
|
|
3543
|
-
}) => void;
|
|
3728
|
+
declare type IConversationTagListener = () => void;
|
|
3544
3729
|
declare type ItypingStateListener = (data: ITypingMessage[]) => void;
|
|
3730
|
+
declare type IMessageBlockedListener = (data: IBlockedMessageInfo) => void;
|
|
3545
3731
|
interface IWatcher {
|
|
3546
3732
|
message?: IMessageListnenr;
|
|
3547
3733
|
batchMessage?: IMessagesListnenr;
|
|
@@ -3575,6 +3761,10 @@ interface IWatcher {
|
|
|
3575
3761
|
messageReceiptResponse?: (conversation: IConversationOption, messageUId: string, sender: {
|
|
3576
3762
|
[responseUserIdList: string]: number;
|
|
3577
3763
|
}) => void;
|
|
3764
|
+
/**
|
|
3765
|
+
* 敏感词被拦截监听
|
|
3766
|
+
*/
|
|
3767
|
+
messageBlocked?: IMessageBlockedListener;
|
|
3578
3768
|
}
|
|
3579
3769
|
interface IAPIContextOption {
|
|
3580
3770
|
/**
|
|
@@ -3636,23 +3826,6 @@ interface IAPIContextOption {
|
|
|
3636
3826
|
checkCA?: boolean;
|
|
3637
3827
|
}
|
|
3638
3828
|
|
|
3639
|
-
interface IRemoveChatRoomEntriesOption {
|
|
3640
|
-
/**
|
|
3641
|
-
* key 属性名称, 支持英文字母、数字、+、=、-、_ 的组合方式, 最大长度 128 字符
|
|
3642
|
-
*/
|
|
3643
|
-
entries: {
|
|
3644
|
-
key: string;
|
|
3645
|
-
}[];
|
|
3646
|
-
/**
|
|
3647
|
-
* 删除成功后是否发送通知消息
|
|
3648
|
-
*/
|
|
3649
|
-
isSendNotification?: boolean;
|
|
3650
|
-
/**
|
|
3651
|
-
* RC:chrmKVNotiMsg 消息中携带的附加信息
|
|
3652
|
-
*/
|
|
3653
|
-
notificationExtra?: string;
|
|
3654
|
-
}
|
|
3655
|
-
|
|
3656
3829
|
declare class APIContext {
|
|
3657
3830
|
private _runtime;
|
|
3658
3831
|
private static _context?;
|
|
@@ -3726,7 +3899,8 @@ declare class APIContext {
|
|
|
3726
3899
|
*/
|
|
3727
3900
|
private _conversationTagListener;
|
|
3728
3901
|
private _typingStatusListener;
|
|
3729
|
-
private
|
|
3902
|
+
private _pullFinishedListener;
|
|
3903
|
+
private _MessageBlockedListener;
|
|
3730
3904
|
/**
|
|
3731
3905
|
* rtc 数据变更通知 pluginContext
|
|
3732
3906
|
*/
|
|
@@ -3920,36 +4094,36 @@ declare class APIContext {
|
|
|
3920
4094
|
* @param roomId 聊天室房间 id
|
|
3921
4095
|
* @param entry 属性信息
|
|
3922
4096
|
*/
|
|
3923
|
-
setChatroomEntry(roomId: string, entry:
|
|
3924
|
-
setChatroomEntries(roomId: string, entryOptions:
|
|
4097
|
+
setChatroomEntry(roomId: string, entry: IChatRoomEntry): Promise<ErrorCode>;
|
|
4098
|
+
setChatroomEntries(roomId: string, entryOptions: IChatRoomEntries): Promise<ErrorCode>;
|
|
3925
4099
|
/**
|
|
3926
4100
|
* 在指定聊天室中强制增加 / 修改任意聊天室属性
|
|
3927
4101
|
* @description 仅聊天室中不存在此属性或属性设置者为己方时可设置成功
|
|
3928
4102
|
* @param roomId 聊天室房间 id
|
|
3929
4103
|
* @param entry 属性信息
|
|
3930
4104
|
*/
|
|
3931
|
-
forceSetChatroomEntry(roomId: string, entry:
|
|
4105
|
+
forceSetChatroomEntry(roomId: string, entry: IChatRoomEntry): Promise<ErrorCode>;
|
|
3932
4106
|
/**
|
|
3933
4107
|
* 删除聊天室属性
|
|
3934
4108
|
* @description 该方法仅限于删除自己设置的聊天室属性
|
|
3935
4109
|
* @param roomId 聊天室房间 id
|
|
3936
4110
|
* @param entry 要移除的属性信息
|
|
3937
4111
|
*/
|
|
3938
|
-
removeChatroomEntry(roomId: string, entry:
|
|
4112
|
+
removeChatroomEntry(roomId: string, entry: IRemoveChatRoomEntry): Promise<ErrorCode>;
|
|
3939
4113
|
/**
|
|
3940
4114
|
* 批量删除聊天室属性
|
|
3941
4115
|
* @description 该方法仅限于删除自己设置的聊天室属性
|
|
3942
4116
|
* @param roomId 聊天室房间 id
|
|
3943
4117
|
* @param entry 要移除的属性信息
|
|
3944
4118
|
*/
|
|
3945
|
-
removeChatroomEntries(roomId: string, entryOptions:
|
|
4119
|
+
removeChatroomEntries(roomId: string, entryOptions: IRemoveChatRoomEntries): Promise<ErrorCode>;
|
|
3946
4120
|
/**
|
|
3947
4121
|
* 强制删除任意聊天室属性
|
|
3948
4122
|
* @description 该方法仅限于删除自己设置的聊天室属性
|
|
3949
4123
|
* @param roomId 聊天室房间 id
|
|
3950
4124
|
* @param entry 要移除的属性信息
|
|
3951
4125
|
*/
|
|
3952
|
-
forceRemoveChatroomEntry(roomId: string, entry:
|
|
4126
|
+
forceRemoveChatroomEntry(roomId: string, entry: IRemoveChatRoomEntry): Promise<ErrorCode>;
|
|
3953
4127
|
/**
|
|
3954
4128
|
* 获取聊天室中的指定属性
|
|
3955
4129
|
* @param roomId 聊天室房间 id
|
|
@@ -4172,7 +4346,7 @@ declare class APIContext {
|
|
|
4172
4346
|
* @param mode 房间模式:直播 or 会议
|
|
4173
4347
|
* @param mediaType 直播房间模式下的媒体资源类型
|
|
4174
4348
|
*/
|
|
4175
|
-
joinRTCRoom(roomId: string, mode: RTCMode, mediaType?: number): Promise<IAsyncRes<IJoinRTCRoomData>>;
|
|
4349
|
+
joinRTCRoom(roomId: string, mode: RTCMode, mediaType?: number, joinType?: RTCJoinType): Promise<IAsyncRes<IJoinRTCRoomData>>;
|
|
4176
4350
|
quitRTCRoom(roomId: string): Promise<ErrorCode>;
|
|
4177
4351
|
rtcPing(roomId: string, mode: number, mediaType?: number): Promise<ErrorCode>;
|
|
4178
4352
|
getRTCRoomInfo(roomId: string): Promise<IAsyncRes<IRTCRoomInfo>>;
|
|
@@ -4188,6 +4362,7 @@ declare class APIContext {
|
|
|
4188
4362
|
name: string;
|
|
4189
4363
|
content: string;
|
|
4190
4364
|
}, valueInfo: string, objectName: string, mcuValInfo?: string): Promise<ErrorCode>;
|
|
4365
|
+
setRTCCDNUris(roomId: string, objectName: string, CDNUris: string): Promise<ErrorCode>;
|
|
4191
4366
|
getRTCData(roomId: string, keys: string[], isInner: boolean, apiType: RTCApiType): Promise<IAsyncRes<KVString>>;
|
|
4192
4367
|
removeRTCData(roomId: string, keys: string[], isInner: boolean, apiType: RTCApiType, message?: {
|
|
4193
4368
|
name: string;
|
|
@@ -4203,6 +4378,7 @@ declare class APIContext {
|
|
|
4203
4378
|
*/
|
|
4204
4379
|
joinLivingRoomAsAudience(roomId: string, mode: RTCMode, broadcastType?: number): Promise<IAsyncRes<{
|
|
4205
4380
|
token: string;
|
|
4381
|
+
kvEntries: IServerRTCRoomEntry[];
|
|
4206
4382
|
}>>;
|
|
4207
4383
|
/**
|
|
4208
4384
|
* 直播观众退出房间
|
|
@@ -4212,6 +4388,10 @@ declare class APIContext {
|
|
|
4212
4388
|
* 直播身份切换
|
|
4213
4389
|
*/
|
|
4214
4390
|
rtcIdentityChange(roomId: string, changeType: RTCIdentityChangeType, broadcastType?: number): Promise<IAsyncRes<IJoinRTCRoomData>>;
|
|
4391
|
+
/**
|
|
4392
|
+
* 获取加入 RTC 房间的用户信息(当前仅能查自己的)
|
|
4393
|
+
*/
|
|
4394
|
+
getRTCJoinedUserInfo(userId: string): Promise<IAsyncRes<IRTCJoinedInfo[]>>;
|
|
4215
4395
|
}
|
|
4216
4396
|
|
|
4217
4397
|
declare class PluginContext {
|
|
@@ -4283,6 +4463,10 @@ declare class PluginContext {
|
|
|
4283
4463
|
* 获取服务时间
|
|
4284
4464
|
*/
|
|
4285
4465
|
getServerTime(): number;
|
|
4466
|
+
/**
|
|
4467
|
+
* 获取加入 RTC 房间的用户信息(当前仅能查自己的)
|
|
4468
|
+
*/
|
|
4469
|
+
getRTCJoinedUserInfo(userId: string): IPromiseResult<IRTCJoinedInfo[]>;
|
|
4286
4470
|
}
|
|
4287
4471
|
|
|
4288
4472
|
declare class RTCPluginContext extends PluginContext {
|
|
@@ -4297,7 +4481,7 @@ declare class RTCPluginContext extends PluginContext {
|
|
|
4297
4481
|
* @param mode 房间模式:直播 or 会议
|
|
4298
4482
|
* @param broadcastType
|
|
4299
4483
|
*/
|
|
4300
|
-
joinRTCRoom(roomId: string, mode: RTCMode, broadcastType?: number): IPromiseResult<IJoinRTCRoomData>;
|
|
4484
|
+
joinRTCRoom(roomId: string, mode: RTCMode, broadcastType?: number, joinType?: RTCJoinType): IPromiseResult<IJoinRTCRoomData>;
|
|
4301
4485
|
quitRTCRoom(roomId: string): Promise<ErrorCode>;
|
|
4302
4486
|
rtcPing(roomId: string, mode: number, broadcastType?: number): Promise<ErrorCode>;
|
|
4303
4487
|
getRTCRoomInfo(roomId: string): IPromiseResult<IRTCRoomInfo>;
|
|
@@ -4337,6 +4521,22 @@ declare class RTCPluginContext extends PluginContext {
|
|
|
4337
4521
|
* mcu 合流发布内容,是一个 JSON 字符串,解析类型为 {mediaType: number, msid: string, uri: string}[]
|
|
4338
4522
|
*/
|
|
4339
4523
|
mcuValInfo?: string): Promise<ErrorCode>;
|
|
4524
|
+
/**
|
|
4525
|
+
* 设置 cdn_uris 扩散
|
|
4526
|
+
* @param objectName 全量 URI 消息名,即 `RCRTC:TotalContentResources`
|
|
4527
|
+
* @param CDNUris cdn_uris 扩散字段
|
|
4528
|
+
* {
|
|
4529
|
+
"broadcast":0,
|
|
4530
|
+
"fps":25,
|
|
4531
|
+
"h":640,
|
|
4532
|
+
"pull_safe":true,
|
|
4533
|
+
"push_mode":1,
|
|
4534
|
+
"url":"https://rtc-media-api-service-ucbj2-01.rongcloud.net/api/rtc/cdn/player",
|
|
4535
|
+
"w":360,
|
|
4536
|
+
"enableInnerCDN":true
|
|
4537
|
+
}[]
|
|
4538
|
+
*/
|
|
4539
|
+
setRTCCDNUris(roomId: string, objectName: string, CDNUris: string): Promise<ErrorCode>;
|
|
4340
4540
|
getRTCData(roomId: string, keys: string[], isInner: boolean, apiType: RTCApiType): IPromiseResult<KVString>;
|
|
4341
4541
|
removeRTCData(roomId: string, keys: string[], isInner: boolean, apiType: RTCApiType, message?: {
|
|
4342
4542
|
name: string;
|
|
@@ -4352,6 +4552,7 @@ declare class RTCPluginContext extends PluginContext {
|
|
|
4352
4552
|
*/
|
|
4353
4553
|
joinLivingRoomAsAudience(roomId: string, mode: RTCMode, broadcastType?: number): IPromiseResult<{
|
|
4354
4554
|
token: string;
|
|
4555
|
+
kvEntries: IServerRTCRoomEntry[];
|
|
4355
4556
|
}>;
|
|
4356
4557
|
/**
|
|
4357
4558
|
* 直播观众退出房间
|
|
@@ -4403,9 +4604,7 @@ interface IEngineWatcher {
|
|
|
4403
4604
|
conversation: (event: any) => void;
|
|
4404
4605
|
expansion: (event: IExpansionListenerData) => void;
|
|
4405
4606
|
tag: () => void;
|
|
4406
|
-
conversationTag: (
|
|
4407
|
-
tags: ILocalTagStatus;
|
|
4408
|
-
}) => void;
|
|
4607
|
+
conversationTag: () => void;
|
|
4409
4608
|
/**
|
|
4410
4609
|
* RTC 数据变更
|
|
4411
4610
|
*/
|
|
@@ -4784,6 +4983,10 @@ declare abstract class AEngine implements IEngine {
|
|
|
4784
4983
|
* 获取设备ID
|
|
4785
4984
|
*/
|
|
4786
4985
|
abstract getDeviceId(): string;
|
|
4986
|
+
/**
|
|
4987
|
+
* 获取当前 userId
|
|
4988
|
+
*/
|
|
4989
|
+
abstract getCurrentUserId(): string;
|
|
4787
4990
|
/**
|
|
4788
4991
|
* 设置用户在线状态监听器
|
|
4789
4992
|
*/
|
|
@@ -4890,7 +5093,7 @@ declare abstract class AEngine implements IEngine {
|
|
|
4890
5093
|
list: IReceivedMessage[];
|
|
4891
5094
|
hasMore: boolean;
|
|
4892
5095
|
}>;
|
|
4893
|
-
abstract joinRTCRoom(roomId: string, mode: RTCMode, broadcastType?: number): IPromiseResult<IJoinRTCRoomData>;
|
|
5096
|
+
abstract joinRTCRoom(roomId: string, mode: RTCMode, broadcastType?: number, joinType?: RTCJoinType): IPromiseResult<IJoinRTCRoomData>;
|
|
4894
5097
|
abstract quitRTCRoom(roomId: string): Promise<ErrorCode>;
|
|
4895
5098
|
abstract rtcPing(roomId: string, mode: number, broadcastType?: number): Promise<ErrorCode>;
|
|
4896
5099
|
abstract getRTCRoomInfo(roomId: string): IPromiseResult<IRTCRoomInfo>;
|
|
@@ -4925,9 +5128,12 @@ declare abstract class AEngine implements IEngine {
|
|
|
4925
5128
|
abstract getRTCUserList(roomId: string): IPromiseResult<IRTCUsers>;
|
|
4926
5129
|
abstract joinLivingRoomAsAudience(roomId: string, mode: RTCMode, broadcastType?: number): Promise<IAsyncRes<{
|
|
4927
5130
|
token: string;
|
|
5131
|
+
kvEntries: IServerRTCRoomEntry[];
|
|
4928
5132
|
}>>;
|
|
4929
5133
|
abstract quitLivingRoomAsAudience(roomId: string): Promise<ErrorCode>;
|
|
4930
5134
|
abstract rtcIdentityChange(roomId: string, changeType: RTCIdentityChangeType, broadcastType?: number): Promise<IAsyncRes<IJoinRTCRoomData>>;
|
|
5135
|
+
abstract getRTCJoinedUserInfo(userId: string): Promise<IAsyncRes<IRTCJoinedInfo[]>>;
|
|
5136
|
+
abstract setRTCCDNUris(roomId: string, objectName: string, CDNUris: string): Promise<ErrorCode>;
|
|
4931
5137
|
}
|
|
4932
5138
|
|
|
4933
5139
|
declare class AppStorage {
|
|
@@ -5378,4 +5584,4 @@ declare enum CONNECTION_TYPE {
|
|
|
5378
5584
|
*/
|
|
5379
5585
|
declare const version: string;
|
|
5380
5586
|
|
|
5381
|
-
export { AEngine, ANavi, APIContext, AppStorage, AssertRules, CONNECTION_TYPE, CPP_PROTOCAL_MSGTYPE_OPTION, CallLibMsgType, ChatroomEntryType, ChatroomUserChangeType as ChatroomMemberChangeType, CometChannel, ConnectResultCode, ConnectionStatus, ConversationType, DelayTimer, ErrorCode, EventEmitter, FileType, HttpMethod, IAPIContextOption, IAsyncRes,
|
|
5587
|
+
export { AEngine, ANavi, APIContext, AppStorage, AssertRules, CONNECTION_TYPE, CPP_PROTOCAL_MSGTYPE_OPTION, CallLibMsgType, ChatroomEntryType, ChatroomUserChangeType as ChatroomMemberChangeType, CometChannel, ConnectResultCode, ConnectionStatus, ConversationType, DelayTimer, ErrorCode, EventEmitter, FileType, HttpMethod, IAPIContextOption, IAsyncRes, IBlockedMessageInfo, IChatRoomEntries, IChatRoomEntry, IChatroomInfo, IChatroomListener, IChatroomListenerData, IChrmKVEntries, IChrmKVEntry, IConnectResult, IConnectionStatusListener, IConversationOption, IConversationStateListener, IConversationTag, IConversationTagListener, IDataChannelWatcher, IDeletedExpansion, IEngine, IEngineWatcher, IEventListener, IExpansionListener, IExpansionListenerData, IExpansionMsgContent, IExtraMethod, IInsertMsgOptions, IJoinRTCRoomData, ILocalReadReceiptInfo, ILocalTagStatus, IM_COMET_PULLMSG_TIMEOUT, IM_PING_INTERVAL_TIME, IM_PING_MIN_TIMEOUT, IM_PING_TIMEOUT, IM_SIGNAL_TIMEOUT, IMessageListnenr, IMessageReader, IMessageReaderResponse, IMetionedData, INaviInfo, IPluginGenerator, IPromiseResult, IPushConfig, IRTCInnerListener, IRTCJoinedInfo, IRTCRoomInfo, IRTCUsers, IReadReceiptInfo, IRecallMsgOptions, IReceivedConversation, IReceivedConversationByTag, IReceivedMessage, IRemoveChatRoomEntries, IRemoveChatRoomEntry, IRequest, IResponse, IRtcTokenData, IRuntime, ISendExMsgOptions, ISendMsgOptions, IServerConversationStatus, IServerRTCRoomEntry, IServerUserSetting, ISetConversationStatusOptions, IStorage, ITagInfo, ITagListener, ITagParam, ITagStatus, ITypingInfo, ITypingMessage, ITypingUser, IUpdatedConversation, IUpdatedExpansion, IUploadAuth, IUserProfile, IWatcher, IWebSocket, ItypingStateListener, KVString, LiveRole, LiveType, LogLevel, LogType, Logger, MAX_MESSAGE_CONTENT_BYTES, MINI_COMET_CONNECT_URIS, MINI_SOCKET_CONNECT_URIS, MentionedType, MessageDirection, MessageType, NAVI_CACHE_DURATION, NAVI_REQ_TIMEOUT, NotificationStatus, PING_REQ_TIMEOUT, PUBLIC_CLOUD_NAVI_URIS, PluginContext, RCAssertError, RTCApiType, RTCIdentityChangeType, RTCJoinType, RTCMode, RTCPluginContext, ReceivedStatus, SEND_MESSAGE_TYPE_OPTION, STATUS_MESSAGE, STORAGE_ROOT_KEY, TagChangeType, UploadMethod, WEB_SOCKET_TIMEOUT, WebSocketChannel, appendUrl, assert, cloneByJSON, forEach, formatConnectResponseCode, getBrowser, getMimeKey, getUploadFileName, indexOf, isArray, isArrayBuffer, isBoolean, isFunction, isHttpUrl, isInObject, isInclude, isNull, isNumber, isObject, isString, isUndefined, isValidChrmEntryKey, isValidChrmEntryValue, isValidConversationType, isValidFileType, map, notEmptyArray, notEmptyObject, notEmptyString, pushConfigsToJSON, pushJSONToConfigs, todo, usingCppEngine, validate, version };
|