@rongcloud/engine 5.4.5 → 5.5.0-enterprise-alpha.1
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/index.d.ts +365 -312
- package/index.esm.js +1 -1
- package/index.js +1 -1
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -239,22 +239,16 @@ declare class RongStreamWriter {
|
|
|
239
239
|
getBytesArray(): Array<number>;
|
|
240
240
|
}
|
|
241
241
|
|
|
242
|
-
/**
|
|
243
|
-
* @description
|
|
244
|
-
* 与 Server 交互的信令封装
|
|
245
|
-
*/
|
|
246
242
|
/**
|
|
247
243
|
* @description
|
|
248
244
|
* 读数据处理基类
|
|
249
245
|
*/
|
|
250
246
|
declare class BaseReader {
|
|
251
247
|
readonly header: Header;
|
|
252
|
-
protected _name: string | null;
|
|
253
|
-
lengthSize: number;
|
|
254
248
|
messageId: number;
|
|
255
249
|
timestamp: number;
|
|
256
250
|
syncMsg: boolean;
|
|
257
|
-
identifier: string;
|
|
251
|
+
protected identifier: string;
|
|
258
252
|
constructor(header: Header);
|
|
259
253
|
getIdentifier(): string | number;
|
|
260
254
|
read(stream: RongStreamReader, length: number, protocolVer: ConnAckProtocolVer): void;
|
|
@@ -293,11 +287,9 @@ declare class RetryableReader extends BaseReader {
|
|
|
293
287
|
};
|
|
294
288
|
}
|
|
295
289
|
declare class RetryableWriter extends BaseWriter {
|
|
296
|
-
messageId: number;
|
|
297
290
|
writeMessage(stream: RongStreamWriter): void;
|
|
298
291
|
}
|
|
299
292
|
declare class PublishReader extends RetryableReader {
|
|
300
|
-
_name: string;
|
|
301
293
|
topic: string;
|
|
302
294
|
data: any;
|
|
303
295
|
targetId: string;
|
|
@@ -314,7 +306,6 @@ declare class PublishReader extends RetryableReader {
|
|
|
314
306
|
* 发消息使用
|
|
315
307
|
*/
|
|
316
308
|
declare class PublishWriter extends RetryableWriter {
|
|
317
|
-
_name: string;
|
|
318
309
|
topic: string;
|
|
319
310
|
data: any;
|
|
320
311
|
targetId: string;
|
|
@@ -329,7 +320,6 @@ declare class PublishWriter extends RetryableWriter {
|
|
|
329
320
|
* 发消息, Server 给的 Ack 回执
|
|
330
321
|
*/
|
|
331
322
|
declare class PubAckReader extends RetryableReader {
|
|
332
|
-
_name: string;
|
|
333
323
|
status: number;
|
|
334
324
|
date: number;
|
|
335
325
|
data: any;
|
|
@@ -349,7 +339,6 @@ declare class PubAckReader extends RetryableReader {
|
|
|
349
339
|
* Web 主动查询
|
|
350
340
|
*/
|
|
351
341
|
declare class QueryWriter extends RetryableWriter {
|
|
352
|
-
name: string;
|
|
353
342
|
topic: string;
|
|
354
343
|
data: any;
|
|
355
344
|
targetId: string;
|
|
@@ -1413,7 +1402,12 @@ declare enum LogTagId {
|
|
|
1413
1402
|
L_GET_HISTORY_MSG_R = "L-get_history_msg-R",
|
|
1414
1403
|
A_CALLBACK_O = "A-callback-O",
|
|
1415
1404
|
A_CALLBACK_E = "A-callback-E",
|
|
1416
|
-
L_CALLBACK_E = "L-callback-E"
|
|
1405
|
+
L_CALLBACK_E = "L-callback-E",
|
|
1406
|
+
/**
|
|
1407
|
+
* PB 数据编码错误
|
|
1408
|
+
*/
|
|
1409
|
+
L_PB_ENCODE_E = "L-pb-encode-E",
|
|
1410
|
+
L_PB_DECODE_E = "L-pb-decode-E"
|
|
1417
1411
|
}
|
|
1418
1412
|
|
|
1419
1413
|
/**
|
|
@@ -1490,7 +1484,15 @@ declare enum RTCMode {
|
|
|
1490
1484
|
/**
|
|
1491
1485
|
* 直播模式
|
|
1492
1486
|
*/
|
|
1493
|
-
LIVE = 2
|
|
1487
|
+
LIVE = 2,
|
|
1488
|
+
/**
|
|
1489
|
+
* 跨应用多人房间
|
|
1490
|
+
*/
|
|
1491
|
+
CROSS_MUTI = 7,
|
|
1492
|
+
/**
|
|
1493
|
+
* 跨应用直播
|
|
1494
|
+
*/
|
|
1495
|
+
CROSS_LIVE = 8
|
|
1494
1496
|
}
|
|
1495
1497
|
/**
|
|
1496
1498
|
* 直播类型
|
|
@@ -1593,6 +1595,11 @@ interface IChrmKVEntries {
|
|
|
1593
1595
|
type?: number;
|
|
1594
1596
|
isDeleted?: boolean;
|
|
1595
1597
|
}
|
|
1598
|
+
interface IChrmKVPullData {
|
|
1599
|
+
kvEntries: IChrmKVEntry[];
|
|
1600
|
+
isFullUpdate?: boolean;
|
|
1601
|
+
syncTime?: number;
|
|
1602
|
+
}
|
|
1596
1603
|
interface IServerConversationStatus {
|
|
1597
1604
|
conversationType: number;
|
|
1598
1605
|
targetId: string;
|
|
@@ -3116,122 +3123,6 @@ interface IExtraMethod {
|
|
|
3116
3123
|
updateMessageReceiptStatus(conersationType: ConversationType, targetId: string, timestamp: number, channelId?: string): Promise<IAsyncRes<boolean>>;
|
|
3117
3124
|
}
|
|
3118
3125
|
|
|
3119
|
-
interface IReqRoomPKOptions {
|
|
3120
|
-
/**
|
|
3121
|
-
* 当前房间 ID
|
|
3122
|
-
*/
|
|
3123
|
-
roomId: string;
|
|
3124
|
-
/**
|
|
3125
|
-
* 被邀请房间 ID
|
|
3126
|
-
*/
|
|
3127
|
-
invitedRoomId: string;
|
|
3128
|
-
/**
|
|
3129
|
-
* 被邀请用户 ID
|
|
3130
|
-
*/
|
|
3131
|
-
invitedUserId: string;
|
|
3132
|
-
/**
|
|
3133
|
-
* 本次邀请超时时间
|
|
3134
|
-
*/
|
|
3135
|
-
inviteTimeout: number;
|
|
3136
|
-
/**
|
|
3137
|
-
* 本次邀请额外信息
|
|
3138
|
-
*/
|
|
3139
|
-
inviteInfo: string;
|
|
3140
|
-
/**
|
|
3141
|
-
* 本次邀请唯一 ID
|
|
3142
|
-
*/
|
|
3143
|
-
inviteSessionId: string;
|
|
3144
|
-
}
|
|
3145
|
-
interface ICancelRoomPKOptions {
|
|
3146
|
-
/**
|
|
3147
|
-
* 当前房间 ID
|
|
3148
|
-
*/
|
|
3149
|
-
roomId: string;
|
|
3150
|
-
/**
|
|
3151
|
-
* 被邀请房间 ID
|
|
3152
|
-
*/
|
|
3153
|
-
invitedRoomId: string;
|
|
3154
|
-
/**
|
|
3155
|
-
* 被邀请用户 ID
|
|
3156
|
-
*/
|
|
3157
|
-
invitedUserId: string;
|
|
3158
|
-
/**
|
|
3159
|
-
* 本次邀请额外信息
|
|
3160
|
-
*/
|
|
3161
|
-
inviteInfo: string;
|
|
3162
|
-
/**
|
|
3163
|
-
* 本次邀请唯一 ID
|
|
3164
|
-
*/
|
|
3165
|
-
inviteSessionId: string;
|
|
3166
|
-
}
|
|
3167
|
-
interface IResRoomPKOptions {
|
|
3168
|
-
/**
|
|
3169
|
-
* 当前房间 ID
|
|
3170
|
-
*/
|
|
3171
|
-
roomId: string;
|
|
3172
|
-
/**
|
|
3173
|
-
* 邀请者 ID
|
|
3174
|
-
*/
|
|
3175
|
-
inviteUserId: string;
|
|
3176
|
-
/**
|
|
3177
|
-
* 邀请者房间 ID
|
|
3178
|
-
*/
|
|
3179
|
-
inviteRoomId: string;
|
|
3180
|
-
/**
|
|
3181
|
-
* 邀请的 session ID
|
|
3182
|
-
*/
|
|
3183
|
-
inviteSessionId: string;
|
|
3184
|
-
/**
|
|
3185
|
-
* 需要转发的信息
|
|
3186
|
-
*/
|
|
3187
|
-
content: string;
|
|
3188
|
-
/**
|
|
3189
|
-
* 同意邀请时要设置的 key, 放在room级别的k和v,新加入房间的能拉取到
|
|
3190
|
-
*/
|
|
3191
|
-
key: string;
|
|
3192
|
-
/**
|
|
3193
|
-
* 同意邀请时要设置的 value, 放在room级别的k和v,新加入房间的能拉取到
|
|
3194
|
-
*/
|
|
3195
|
-
value: string;
|
|
3196
|
-
/**
|
|
3197
|
-
* 是否同意邀请
|
|
3198
|
-
*/
|
|
3199
|
-
agree: boolean;
|
|
3200
|
-
}
|
|
3201
|
-
interface IEndRoomPKOptions {
|
|
3202
|
-
/**
|
|
3203
|
-
* 当前房间 ID
|
|
3204
|
-
*/
|
|
3205
|
-
roomId: string;
|
|
3206
|
-
/**
|
|
3207
|
-
* 需要结束的连麦房间 ID
|
|
3208
|
-
*/
|
|
3209
|
-
endRoomId: string;
|
|
3210
|
-
/**
|
|
3211
|
-
* 需要结束连麦的 sessionID
|
|
3212
|
-
*/
|
|
3213
|
-
sessionId: string;
|
|
3214
|
-
/**
|
|
3215
|
-
* 结束连麦的信息
|
|
3216
|
-
*/
|
|
3217
|
-
content: string;
|
|
3218
|
-
/**
|
|
3219
|
-
* 需要删除连麦的信息的 keys
|
|
3220
|
-
*/
|
|
3221
|
-
keys: string[];
|
|
3222
|
-
}
|
|
3223
|
-
|
|
3224
|
-
interface IRTCRoomBindOption {
|
|
3225
|
-
/**
|
|
3226
|
-
* 聊天室 ID
|
|
3227
|
-
*/
|
|
3228
|
-
chatRoomId: string;
|
|
3229
|
-
/**
|
|
3230
|
-
* RTC房间 ID
|
|
3231
|
-
*/
|
|
3232
|
-
rtcRoomId: string;
|
|
3233
|
-
}
|
|
3234
|
-
|
|
3235
3126
|
/**
|
|
3236
3127
|
* engine 基本接口定义,用于约束 Electron 下主进程、渲染进程、JSEngine 的编码一致性
|
|
3237
3128
|
*/
|
|
@@ -3735,45 +3626,11 @@ interface IEngine {
|
|
|
3735
3626
|
*/
|
|
3736
3627
|
getAllUnreadMentionedCount(): Promise<IAsyncRes<number>>;
|
|
3737
3628
|
clearData(): Promise<IAsyncRes<boolean>>;
|
|
3738
|
-
joinRTCRoom(roomId: string, mode: RTCMode, broadcastType?: number, joinType?: RTCJoinType, innerUserDatas?: IRTCUserData, outerUserDatas?: IRTCUserData): IPromiseResult<IJoinRTCRoomData>;
|
|
3739
|
-
quitRTCRoom(roomId: string): Promise<ErrorCode>;
|
|
3740
3629
|
rtcPing(roomId: string, mode: number, broadcastType?: number): Promise<ErrorCode>;
|
|
3741
|
-
|
|
3742
|
-
|
|
3743
|
-
|
|
3744
|
-
|
|
3745
|
-
removeRTCUserInfo(roomId: string, keys: string[]): Promise<ErrorCode>;
|
|
3746
|
-
setRTCData(roomId: string, key: string, value: string, isInner: boolean, apiType: RTCApiType, message?: {
|
|
3747
|
-
name: string;
|
|
3748
|
-
content: string;
|
|
3749
|
-
}): Promise<ErrorCode>;
|
|
3750
|
-
/**
|
|
3751
|
-
* 全量订阅资源修改
|
|
3752
|
-
* @param roomId 房间 Id
|
|
3753
|
-
* @param message 向前兼容的消息内容
|
|
3754
|
-
* @param valueInfo 全量资源数据
|
|
3755
|
-
* @param objectName 全量 URI 消息名
|
|
3756
|
-
*/
|
|
3757
|
-
setRTCTotalRes(roomId: string, message: {
|
|
3758
|
-
name: string;
|
|
3759
|
-
content: string;
|
|
3760
|
-
}, valueInfo: string, objectName: string, mcuValInfo: string): Promise<ErrorCode>;
|
|
3761
|
-
getRTCData(roomId: string, keys: string[], isInner: boolean, apiType: RTCApiType): IPromiseResult<KVString>;
|
|
3762
|
-
removeRTCData(roomId: string, keys: string[], isInner: boolean, apiType: RTCApiType, message?: {
|
|
3763
|
-
name: string;
|
|
3764
|
-
content: string;
|
|
3765
|
-
}): Promise<ErrorCode>;
|
|
3766
|
-
setRTCOutData(roomId: string, rtcData: unknown, type: number, message: unknown): Promise<ErrorCode>;
|
|
3767
|
-
getRTCOutData(roomId: string, userIds: string[]): IPromiseResult<unknown>;
|
|
3768
|
-
getRTCToken(roomId: string, mode: number, broadcastType?: number): IPromiseResult<IRtcTokenData>;
|
|
3769
|
-
setRTCState(roomId: string, reportId: string): Promise<ErrorCode>;
|
|
3770
|
-
getRTCUserList(roomId: string): IPromiseResult<IRTCUsers>;
|
|
3771
|
-
setRTCCDNUris(roomId: string, objectName: string, CDNUris: string): Promise<ErrorCode>;
|
|
3772
|
-
requestRoomPK(options: IReqRoomPKOptions): Promise<ErrorCode>;
|
|
3773
|
-
cancelRoomPK(options: ICancelRoomPKOptions): Promise<ErrorCode>;
|
|
3774
|
-
responseRoomPK(options: IResRoomPKOptions): Promise<ErrorCode>;
|
|
3775
|
-
endRoomPK(options: IEndRoomPKOptions): Promise<ErrorCode>;
|
|
3776
|
-
bindRTCRoomForChatroom(options: IRTCRoomBindOption): Promise<ErrorCode>;
|
|
3630
|
+
rtcSignaling(roomId: string, method: string, isQuery: boolean, sourceData: any): Promise<{
|
|
3631
|
+
code: ErrorCode;
|
|
3632
|
+
buffer?: any;
|
|
3633
|
+
}>;
|
|
3777
3634
|
}
|
|
3778
3635
|
|
|
3779
3636
|
interface IExpansionMsgContent {
|
|
@@ -3815,6 +3672,17 @@ interface IRTCJoinedInfo {
|
|
|
3815
3672
|
joinTime: number;
|
|
3816
3673
|
}
|
|
3817
3674
|
|
|
3675
|
+
interface IRTCRoomBindOption {
|
|
3676
|
+
/**
|
|
3677
|
+
* 聊天室 ID
|
|
3678
|
+
*/
|
|
3679
|
+
chatRoomId: string;
|
|
3680
|
+
/**
|
|
3681
|
+
* RTC房间 ID
|
|
3682
|
+
*/
|
|
3683
|
+
rtcRoomId: string;
|
|
3684
|
+
}
|
|
3685
|
+
|
|
3818
3686
|
interface IUpdatedExpansion {
|
|
3819
3687
|
expansion: {
|
|
3820
3688
|
[key: string]: any;
|
|
@@ -3868,6 +3736,111 @@ interface ITypingMessage {
|
|
|
3868
3736
|
list: Array<ITypingUser>;
|
|
3869
3737
|
}
|
|
3870
3738
|
|
|
3739
|
+
interface IReqRoomPKOptions {
|
|
3740
|
+
/**
|
|
3741
|
+
* 当前房间 ID
|
|
3742
|
+
*/
|
|
3743
|
+
roomId: string;
|
|
3744
|
+
/**
|
|
3745
|
+
* 被邀请房间 ID
|
|
3746
|
+
*/
|
|
3747
|
+
invitedRoomId: string;
|
|
3748
|
+
/**
|
|
3749
|
+
* 被邀请用户 ID
|
|
3750
|
+
*/
|
|
3751
|
+
invitedUserId: string;
|
|
3752
|
+
/**
|
|
3753
|
+
* 本次邀请超时时间
|
|
3754
|
+
*/
|
|
3755
|
+
inviteTimeout: number;
|
|
3756
|
+
/**
|
|
3757
|
+
* 本次邀请额外信息
|
|
3758
|
+
*/
|
|
3759
|
+
inviteInfo: string;
|
|
3760
|
+
/**
|
|
3761
|
+
* 本次邀请唯一 ID
|
|
3762
|
+
*/
|
|
3763
|
+
inviteSessionId: string;
|
|
3764
|
+
}
|
|
3765
|
+
interface ICancelRoomPKOptions {
|
|
3766
|
+
/**
|
|
3767
|
+
* 当前房间 ID
|
|
3768
|
+
*/
|
|
3769
|
+
roomId: string;
|
|
3770
|
+
/**
|
|
3771
|
+
* 被邀请房间 ID
|
|
3772
|
+
*/
|
|
3773
|
+
invitedRoomId: string;
|
|
3774
|
+
/**
|
|
3775
|
+
* 被邀请用户 ID
|
|
3776
|
+
*/
|
|
3777
|
+
invitedUserId: string;
|
|
3778
|
+
/**
|
|
3779
|
+
* 本次邀请额外信息
|
|
3780
|
+
*/
|
|
3781
|
+
inviteInfo: string;
|
|
3782
|
+
/**
|
|
3783
|
+
* 本次邀请唯一 ID
|
|
3784
|
+
*/
|
|
3785
|
+
inviteSessionId: string;
|
|
3786
|
+
}
|
|
3787
|
+
interface IResRoomPKOptions {
|
|
3788
|
+
/**
|
|
3789
|
+
* 当前房间 ID
|
|
3790
|
+
*/
|
|
3791
|
+
roomId: string;
|
|
3792
|
+
/**
|
|
3793
|
+
* 邀请者 ID
|
|
3794
|
+
*/
|
|
3795
|
+
inviteUserId: string;
|
|
3796
|
+
/**
|
|
3797
|
+
* 邀请者房间 ID
|
|
3798
|
+
*/
|
|
3799
|
+
inviteRoomId: string;
|
|
3800
|
+
/**
|
|
3801
|
+
* 邀请的 session ID
|
|
3802
|
+
*/
|
|
3803
|
+
inviteSessionId: string;
|
|
3804
|
+
/**
|
|
3805
|
+
* 需要转发的信息
|
|
3806
|
+
*/
|
|
3807
|
+
content: string;
|
|
3808
|
+
/**
|
|
3809
|
+
* 同意邀请时要设置的 key, 放在room级别的k和v,新加入房间的能拉取到
|
|
3810
|
+
*/
|
|
3811
|
+
key: string;
|
|
3812
|
+
/**
|
|
3813
|
+
* 同意邀请时要设置的 value, 放在room级别的k和v,新加入房间的能拉取到
|
|
3814
|
+
*/
|
|
3815
|
+
value: string;
|
|
3816
|
+
/**
|
|
3817
|
+
* 是否同意邀请
|
|
3818
|
+
*/
|
|
3819
|
+
agree: boolean;
|
|
3820
|
+
}
|
|
3821
|
+
interface IEndRoomPKOptions {
|
|
3822
|
+
/**
|
|
3823
|
+
* 当前房间 ID
|
|
3824
|
+
*/
|
|
3825
|
+
roomId: string;
|
|
3826
|
+
/**
|
|
3827
|
+
* 需要结束的连麦房间 ID
|
|
3828
|
+
*/
|
|
3829
|
+
endRoomId: string;
|
|
3830
|
+
/**
|
|
3831
|
+
* 需要结束连麦的 sessionID
|
|
3832
|
+
*/
|
|
3833
|
+
sessionId: string;
|
|
3834
|
+
/**
|
|
3835
|
+
* 结束连麦的信息
|
|
3836
|
+
*/
|
|
3837
|
+
content: string;
|
|
3838
|
+
/**
|
|
3839
|
+
* 需要删除连麦的信息的 keys
|
|
3840
|
+
*/
|
|
3841
|
+
keys: string[];
|
|
3842
|
+
}
|
|
3843
|
+
|
|
3871
3844
|
/**
|
|
3872
3845
|
* IndexDB中存储的log数据
|
|
3873
3846
|
*/
|
|
@@ -3984,18 +3957,6 @@ declare class DataCodec {
|
|
|
3984
3957
|
* 格式化 会话状态 置顶、免打扰
|
|
3985
3958
|
*/
|
|
3986
3959
|
private _formatConversationStatus;
|
|
3987
|
-
/**
|
|
3988
|
-
* 格式化 RTC 用户列表
|
|
3989
|
-
*/
|
|
3990
|
-
private _formatRTCUserList;
|
|
3991
|
-
/**
|
|
3992
|
-
* 格式化 RTC 数据
|
|
3993
|
-
*/
|
|
3994
|
-
private _formatRTCData;
|
|
3995
|
-
/**
|
|
3996
|
-
* 格式化 RTC 房间信息
|
|
3997
|
-
*/
|
|
3998
|
-
private _formatRTCRoomInfo;
|
|
3999
3960
|
/**
|
|
4000
3961
|
* 格式化 获取已读列表
|
|
4001
3962
|
*/
|
|
@@ -4004,18 +3965,10 @@ declare class DataCodec {
|
|
|
4004
3965
|
* 格式化用户配置通知
|
|
4005
3966
|
*/
|
|
4006
3967
|
private _formatUserSettingNotification;
|
|
4007
|
-
/**
|
|
4008
|
-
* 格式化 RTC 用户加入房间后通知拉取的数据(房间内主播全量列表、房间全量资源)
|
|
4009
|
-
*/
|
|
4010
|
-
private _formatRTCRoomKVList;
|
|
4011
3968
|
/**
|
|
4012
3969
|
* 拉取聊天室 kv 存储时的最新时间戳
|
|
4013
3970
|
*/
|
|
4014
3971
|
private _formatChrmKVVersion;
|
|
4015
|
-
/**
|
|
4016
|
-
* 格式化观众加房间后返回数据
|
|
4017
|
-
*/
|
|
4018
|
-
private _formatRTCAuidenceJoinRoomData;
|
|
4019
3972
|
/**
|
|
4020
3973
|
* 格式化加入 RTC 房间的用户信息
|
|
4021
3974
|
*/
|
|
@@ -4187,91 +4140,6 @@ declare class DataCodec {
|
|
|
4187
4140
|
* 序列号超级群获取会话参数
|
|
4188
4141
|
*/
|
|
4189
4142
|
encodeUltraGroup(syncTime: number, isEraseMsgContent: boolean): any;
|
|
4190
|
-
/**
|
|
4191
|
-
* ============ 以下为 RTC 相关 ============
|
|
4192
|
-
*/
|
|
4193
|
-
/**
|
|
4194
|
-
* 加入 RTC 房间
|
|
4195
|
-
*/
|
|
4196
|
-
encodeJoinRTCRoom(mode: RTCMode, broadcastType?: number, joinType?: RTCJoinType, innerUserDatas?: IRTCUserData, outerUserDatas?: IRTCUserData): any[];
|
|
4197
|
-
/**
|
|
4198
|
-
* 退出 RTC 房间
|
|
4199
|
-
*/
|
|
4200
|
-
encodeQuitRTCRoom(): any[];
|
|
4201
|
-
/**
|
|
4202
|
-
* 用户属性设置,及消息通知
|
|
4203
|
-
*/
|
|
4204
|
-
encodeSetRTCData(key: string, value: string, isInner: boolean, apiType: RTCApiType, message?: {
|
|
4205
|
-
name: string;
|
|
4206
|
-
content: string;
|
|
4207
|
-
}): any;
|
|
4208
|
-
/**
|
|
4209
|
-
* 全量 URI
|
|
4210
|
-
*/
|
|
4211
|
-
encodeUserSetRTCData(message: any, valueInfo: string, objectName: string, mcuValInfo: string): any;
|
|
4212
|
-
encodeUserSetRTCCDNUris(objectName: string, CDNUris: string): any;
|
|
4213
|
-
/**
|
|
4214
|
-
* 用户属性获取
|
|
4215
|
-
*/
|
|
4216
|
-
encodeGetRTCData(keys: Array<string>, isInner: boolean, apiType: RTCApiType): any;
|
|
4217
|
-
/**
|
|
4218
|
-
* 用户属性删除
|
|
4219
|
-
*/
|
|
4220
|
-
encodeRemoveRTCData(keys: Array<string>, isInner: boolean, apiType: RTCApiType, message: any): any;
|
|
4221
|
-
/**
|
|
4222
|
-
* 待完善注释
|
|
4223
|
-
* @deprecated
|
|
4224
|
-
*/
|
|
4225
|
-
encodeSetRTCOutData(data: any, type: number, message: any): any;
|
|
4226
|
-
/**
|
|
4227
|
-
* 待完善注释
|
|
4228
|
-
* @deprecated
|
|
4229
|
-
*/
|
|
4230
|
-
ecnodeGetRTCOutData(userIds: string[]): any;
|
|
4231
|
-
/**
|
|
4232
|
-
* rtc 北极星数据上传
|
|
4233
|
-
*/
|
|
4234
|
-
encodeSetRTCState(report: string): any;
|
|
4235
|
-
/**
|
|
4236
|
-
* 获取房间用户资源
|
|
4237
|
-
*/
|
|
4238
|
-
encodeGetRTCRoomInfo(): any;
|
|
4239
|
-
/**
|
|
4240
|
-
* 设置用户资源
|
|
4241
|
-
*/
|
|
4242
|
-
encodeSetRTCUserInfo(key: string, value: string): any;
|
|
4243
|
-
/**
|
|
4244
|
-
* 删除用户及资源
|
|
4245
|
-
*/
|
|
4246
|
-
encodeRemoveRTCUserInfo(keys: string[]): any;
|
|
4247
|
-
/**
|
|
4248
|
-
* RTC 直播房间身份切换
|
|
4249
|
-
*/
|
|
4250
|
-
encodeIdentityChangeInfo(changeType: RTCIdentityChangeType, broadcastType?: number, needSyncChrm?: boolean): any;
|
|
4251
|
-
/**
|
|
4252
|
-
* RTC 直播观众拉取房间内 KV
|
|
4253
|
-
*/
|
|
4254
|
-
encodePullRTCRoomKV(roomId: string, timestamp: number): any;
|
|
4255
|
-
/**
|
|
4256
|
-
* RTC 查询在房间内用户的信息
|
|
4257
|
-
*/
|
|
4258
|
-
encodeQueryUserJoinedInfo(userId: string): any;
|
|
4259
|
-
/**
|
|
4260
|
-
* 连麦 PK 请求
|
|
4261
|
-
*/
|
|
4262
|
-
encodeRequestRoomPK(options: IReqRoomPKOptions): any;
|
|
4263
|
-
/**
|
|
4264
|
-
* 取消连麦 PK 请求
|
|
4265
|
-
*/
|
|
4266
|
-
encodeCancelRoomPK(options: ICancelRoomPKOptions): any;
|
|
4267
|
-
/**
|
|
4268
|
-
* 响应连麦 PK 请求
|
|
4269
|
-
*/
|
|
4270
|
-
encodeResponseRoomPK(options: IResRoomPKOptions): any;
|
|
4271
|
-
/**
|
|
4272
|
-
* 结束连麦 PK
|
|
4273
|
-
*/
|
|
4274
|
-
encodeEndRoomPK(options: IEndRoomPKOptions): any;
|
|
4275
4143
|
/**
|
|
4276
4144
|
* 设置聊天室关联的rtc房间
|
|
4277
4145
|
*/
|
|
@@ -4567,6 +4435,45 @@ interface IPluginGenerator<API, InitOption> {
|
|
|
4567
4435
|
setup(context: PluginContext, runtime: IRuntime, options: InitOption): API;
|
|
4568
4436
|
}
|
|
4569
4437
|
|
|
4438
|
+
declare type CodecPBMaps = {
|
|
4439
|
+
readonly [pbname: string]: readonly string[];
|
|
4440
|
+
};
|
|
4441
|
+
declare type KeyType<T> = T[keyof T & number] & string;
|
|
4442
|
+
declare type ModuleType<T> = {
|
|
4443
|
+
[key in KeyType<T>]?: any;
|
|
4444
|
+
};
|
|
4445
|
+
declare abstract class AbsCodec<T> {
|
|
4446
|
+
/**
|
|
4447
|
+
* Key 对应的 Value 结构映射表,用于不同 Key 数据的编解码
|
|
4448
|
+
*/
|
|
4449
|
+
protected pbmaps: T;
|
|
4450
|
+
constructor(
|
|
4451
|
+
/**
|
|
4452
|
+
* Key 对应的 Value 结构映射表,用于不同 Key 数据的编解码
|
|
4453
|
+
*/
|
|
4454
|
+
pbmaps: T);
|
|
4455
|
+
/**
|
|
4456
|
+
* 数据反序列化,反序列化的结果为未加工的原始数据,decode 函数本身不处理 format 过程
|
|
4457
|
+
* @param pbname 待解码数据的 PB 名
|
|
4458
|
+
* @param data 待解码数据
|
|
4459
|
+
*/
|
|
4460
|
+
abstract decode(pbname: string, data: Uint8Array | string): any;
|
|
4461
|
+
/**
|
|
4462
|
+
* 数据序列化
|
|
4463
|
+
* @param pbname 待编码数据的 PB 名
|
|
4464
|
+
* @param params 待编码参数
|
|
4465
|
+
* @param returnSourceModule 当嵌套 PB 结构时,value 值需要使用原 module 模块而非 Uint8Array 数据
|
|
4466
|
+
* @example 对于嵌套型数据,需要由业务来进行数据组织,以 pb2 结构嵌套 pb1 举例,编码过程如下:
|
|
4467
|
+
* ```
|
|
4468
|
+
* // 对 pb1 结构进行编码
|
|
4469
|
+
* const buffer = codec.encode('pb1', { ...attrs })
|
|
4470
|
+
* // 再对 pb2 编码,pb1 作为编码用到的参数直接传入指定 key
|
|
4471
|
+
* const data = codec.encode('pb2', { key: buffer })
|
|
4472
|
+
* ```
|
|
4473
|
+
*/
|
|
4474
|
+
abstract encode<K extends string & keyof T>(pbname: K, params?: ModuleType<T[K]>, returnSourceModule?: boolean): ArrayBuffer | ModuleType<T[K]>;
|
|
4475
|
+
}
|
|
4476
|
+
|
|
4570
4477
|
declare class APIContext {
|
|
4571
4478
|
private _runtime;
|
|
4572
4479
|
private static _context?;
|
|
@@ -4596,7 +4503,13 @@ declare class APIContext {
|
|
|
4596
4503
|
* 内部连接状态标识,为 ture 时不允许调用 reconnect 方法
|
|
4597
4504
|
*/
|
|
4598
4505
|
private _isInternalConnected;
|
|
4506
|
+
/**
|
|
4507
|
+
* RTC 相关的编解码模块,用于向前兼容 RTC 旧版本的编解码,
|
|
4508
|
+
* 包括向 CppEngine 提供 RTC 业务编解码能力
|
|
4509
|
+
*/
|
|
4510
|
+
private readonly _rtcCodec;
|
|
4599
4511
|
constructor(_runtime: IRuntime, options: IAPIContextOption);
|
|
4512
|
+
createCodec<T extends CodecPBMaps>(keymaps: T, pbDesc: string): AbsCodec<T>;
|
|
4600
4513
|
/**
|
|
4601
4514
|
* 安装使用插件,并初始化插件实例
|
|
4602
4515
|
* @param plugin
|
|
@@ -4718,6 +4631,11 @@ declare class APIContext {
|
|
|
4718
4631
|
* @param isStatusMessage 是否是状态消息
|
|
4719
4632
|
*/
|
|
4720
4633
|
registerMessageType(objectName: string, isPersited: boolean, isCounted: boolean, searchProps?: string[], isStatusMessage?: boolean): void;
|
|
4634
|
+
/**
|
|
4635
|
+
* 注册 RTC KV 通知监听器
|
|
4636
|
+
* @param listener
|
|
4637
|
+
*/
|
|
4638
|
+
registerRTCSignalingListener(listener?: (buffer: Uint8Array) => void): void;
|
|
4721
4639
|
/**
|
|
4722
4640
|
* 发送消息
|
|
4723
4641
|
* @param conversationType
|
|
@@ -5235,6 +5153,10 @@ declare class APIContext {
|
|
|
5235
5153
|
getConversationListWithAllChannel(): Promise<IAsyncRes<IReceivedConversation[]>>;
|
|
5236
5154
|
getConversationListWithAllChannelByPage(index: number, limit: number): Promise<IAsyncRes<IReceivedConversation[]>>;
|
|
5237
5155
|
clearData(): Promise<IAsyncRes<boolean>>;
|
|
5156
|
+
rtcSignaling(roomId: string, method: string, isQuery: boolean, sourceData: any): Promise<{
|
|
5157
|
+
code: ErrorCode;
|
|
5158
|
+
buffer?: Uint8Array | string;
|
|
5159
|
+
}>;
|
|
5238
5160
|
/**
|
|
5239
5161
|
* 加入房间
|
|
5240
5162
|
* @param roomId
|
|
@@ -5316,6 +5238,7 @@ declare class PluginContext {
|
|
|
5316
5238
|
* 获取 context
|
|
5317
5239
|
*/
|
|
5318
5240
|
__getContext(): APIContext;
|
|
5241
|
+
createCodec<T extends CodecPBMaps>(keymaps: T, pbDesc: string): AbsCodec<T>;
|
|
5319
5242
|
/**
|
|
5320
5243
|
* 获取当前的导航数据
|
|
5321
5244
|
*/
|
|
@@ -5339,14 +5262,6 @@ declare class PluginContext {
|
|
|
5339
5262
|
* IM 客户端销毁通知
|
|
5340
5263
|
*/
|
|
5341
5264
|
ondestroy?(): void;
|
|
5342
|
-
/**
|
|
5343
|
-
* RTC 数据通知
|
|
5344
|
-
* @param roomdId 数据对应的房间 Id
|
|
5345
|
-
* @param data 通知数据为 key:value 方式
|
|
5346
|
-
* @description
|
|
5347
|
-
* 目前仅通知:主播加入、退出房间的人员列表变更,发布、取消发布资源列表变更
|
|
5348
|
-
*/
|
|
5349
|
-
onrtcdatachange?(data: IServerRTCRoomEntry[], roomdId?: string): void;
|
|
5350
5265
|
/**
|
|
5351
5266
|
* 获取 `@rongcloud/engine` 包版本
|
|
5352
5267
|
*/
|
|
@@ -5386,10 +5301,6 @@ declare class PluginContext {
|
|
|
5386
5301
|
* 获取服务时间
|
|
5387
5302
|
*/
|
|
5388
5303
|
getServerTime(): number;
|
|
5389
|
-
/**
|
|
5390
|
-
* 获取加入 RTC 房间的用户信息(当前仅能查自己的)
|
|
5391
|
-
*/
|
|
5392
|
-
getRTCJoinedUserInfo(userId: string): IPromiseResult<IRTCJoinedInfo[]>;
|
|
5393
5304
|
}
|
|
5394
5305
|
|
|
5395
5306
|
declare class RTCPluginContext extends PluginContext {
|
|
@@ -5399,6 +5310,7 @@ declare class RTCPluginContext extends PluginContext {
|
|
|
5399
5310
|
getNaviInfo(): INaviInfo | null;
|
|
5400
5311
|
/**
|
|
5401
5312
|
* 加入 RTC 房间
|
|
5313
|
+
* @deprecated
|
|
5402
5314
|
* @todo 需确认 `broadcastType` 参数的作用与有效值
|
|
5403
5315
|
* @param roomId
|
|
5404
5316
|
* @param mode 房间模式:直播 or 会议
|
|
@@ -5406,15 +5318,40 @@ declare class RTCPluginContext extends PluginContext {
|
|
|
5406
5318
|
* @param innerUserData 加副房间时的主房间 Id
|
|
5407
5319
|
*/
|
|
5408
5320
|
joinRTCRoom(roomId: string, mode: RTCMode, broadcastType?: number, joinType?: RTCJoinType, innerUserDatas?: IRTCUserData, outerUserDatas?: IRTCUserData): IPromiseResult<IJoinRTCRoomData>;
|
|
5321
|
+
/**
|
|
5322
|
+
* @deprecated
|
|
5323
|
+
*/
|
|
5409
5324
|
quitRTCRoom(roomId: string): Promise<ErrorCode>;
|
|
5325
|
+
/**
|
|
5326
|
+
* rtc 房间保活
|
|
5327
|
+
*/
|
|
5410
5328
|
rtcPing(roomId: string, mode: number, broadcastType?: number): Promise<ErrorCode>;
|
|
5329
|
+
/**
|
|
5330
|
+
* @deprecated
|
|
5331
|
+
*/
|
|
5411
5332
|
getRTCRoomInfo(roomId: string): IPromiseResult<IRTCRoomInfo>;
|
|
5333
|
+
/**
|
|
5334
|
+
* @deprecated
|
|
5335
|
+
*/
|
|
5412
5336
|
getRTCUserInfoList(roomId: string): IPromiseResult<IRTCUsers>;
|
|
5337
|
+
/**
|
|
5338
|
+
* @deprecated
|
|
5339
|
+
*/
|
|
5413
5340
|
getRTCUserInfo(roomId: string): IPromiseResult<unknown>;
|
|
5341
|
+
/**
|
|
5342
|
+
* @deprecated
|
|
5343
|
+
*/
|
|
5414
5344
|
setRTCUserInfo(roomId: string, key: string, value: string): Promise<ErrorCode>;
|
|
5345
|
+
/**
|
|
5346
|
+
* @deprecated
|
|
5347
|
+
*/
|
|
5415
5348
|
removeRTCUserInfo(roomId: string, keys: string[]): Promise<ErrorCode>;
|
|
5349
|
+
/**
|
|
5350
|
+
* @deprecated
|
|
5351
|
+
*/
|
|
5416
5352
|
setRTCData(roomId: string, key: string, value: string, isInner: boolean, apiType: RTCApiType, message?: any): Promise<ErrorCode>;
|
|
5417
5353
|
/**
|
|
5354
|
+
* @deprecated
|
|
5418
5355
|
* @param - roomId
|
|
5419
5356
|
* @param - message 向前兼容的消息数据,以兼容旧版本 SDK,即增量数据,如:
|
|
5420
5357
|
* ```
|
|
@@ -5447,6 +5384,7 @@ declare class RTCPluginContext extends PluginContext {
|
|
|
5447
5384
|
mcuValInfo?: string): Promise<ErrorCode>;
|
|
5448
5385
|
/**
|
|
5449
5386
|
* 设置 cdn_uris 扩散
|
|
5387
|
+
* @deprecated
|
|
5450
5388
|
* @param objectName 全量 URI 消息名,即 `RCRTC:TotalContentResources`
|
|
5451
5389
|
* @param CDNUris cdn_uris 扩散字段
|
|
5452
5390
|
* {
|
|
@@ -5461,18 +5399,40 @@ declare class RTCPluginContext extends PluginContext {
|
|
|
5461
5399
|
}[]
|
|
5462
5400
|
*/
|
|
5463
5401
|
setRTCCDNUris(roomId: string, objectName: string, CDNUris: string): Promise<ErrorCode>;
|
|
5402
|
+
/**
|
|
5403
|
+
* @deprecated
|
|
5404
|
+
*/
|
|
5464
5405
|
getRTCData(roomId: string, keys: string[], isInner: boolean, apiType: RTCApiType): IPromiseResult<KVString>;
|
|
5406
|
+
/**
|
|
5407
|
+
* @deprecated
|
|
5408
|
+
*/
|
|
5465
5409
|
removeRTCData(roomId: string, keys: string[], isInner: boolean, apiType: RTCApiType, message?: {
|
|
5466
5410
|
name: string;
|
|
5467
5411
|
content: string;
|
|
5468
5412
|
}): Promise<ErrorCode>;
|
|
5413
|
+
/**
|
|
5414
|
+
* @deprecated
|
|
5415
|
+
*/
|
|
5469
5416
|
setRTCOutData(roomId: string, rtcData: unknown, type: number, message: unknown): Promise<ErrorCode>;
|
|
5417
|
+
/**
|
|
5418
|
+
* @deprecated
|
|
5419
|
+
*/
|
|
5470
5420
|
getRTCOutData(roomId: string, userIds: string[]): IPromiseResult<unknown>;
|
|
5421
|
+
/**
|
|
5422
|
+
* @deprecated
|
|
5423
|
+
*/
|
|
5471
5424
|
getRTCToken(roomId: string, mode: number, broadcastType?: number): IPromiseResult<IRtcTokenData>;
|
|
5425
|
+
/**
|
|
5426
|
+
* @deprecated
|
|
5427
|
+
*/
|
|
5472
5428
|
setRTCState(roomId: string, report: string): Promise<ErrorCode>;
|
|
5429
|
+
/**
|
|
5430
|
+
* @deprecated
|
|
5431
|
+
*/
|
|
5473
5432
|
getRTCUserList(roomId: string): IPromiseResult<IRTCUsers>;
|
|
5474
5433
|
/**
|
|
5475
5434
|
* 直播观众加房间
|
|
5435
|
+
* @deprecated
|
|
5476
5436
|
*/
|
|
5477
5437
|
joinLivingRoomAsAudience(roomId: string, mode: RTCMode, broadcastType?: number): IPromiseResult<{
|
|
5478
5438
|
token: string;
|
|
@@ -5480,30 +5440,95 @@ declare class RTCPluginContext extends PluginContext {
|
|
|
5480
5440
|
}>;
|
|
5481
5441
|
/**
|
|
5482
5442
|
* 直播观众退出房间
|
|
5443
|
+
* @deprecated
|
|
5483
5444
|
*/
|
|
5484
5445
|
quitLivingRoomAsAudience(roomId: string): Promise<ErrorCode>;
|
|
5485
5446
|
/**
|
|
5486
5447
|
* 直播身份切换
|
|
5448
|
+
* @deprecated
|
|
5487
5449
|
*/
|
|
5488
5450
|
rtcIdentityChange(roomId: string, changeType: RTCIdentityChangeType, broadcastType?: number): IPromiseResult<IJoinRTCRoomData>;
|
|
5489
5451
|
/**
|
|
5490
5452
|
* 连麦 PK 请求
|
|
5453
|
+
* @deprecated
|
|
5491
5454
|
*/
|
|
5492
5455
|
requestRoomPK(options: IReqRoomPKOptions): Promise<ErrorCode>;
|
|
5493
5456
|
/**
|
|
5494
5457
|
* 取消连麦 PK 请求
|
|
5458
|
+
* @deprecated
|
|
5495
5459
|
*/
|
|
5496
5460
|
cancelRoomPK(options: ICancelRoomPKOptions): Promise<ErrorCode>;
|
|
5497
5461
|
/**
|
|
5498
5462
|
* 响应连麦 PK 请求
|
|
5463
|
+
* @deprecated
|
|
5499
5464
|
*/
|
|
5500
5465
|
responseRoomPK(options: IResRoomPKOptions): Promise<ErrorCode>;
|
|
5501
5466
|
/**
|
|
5502
5467
|
* 结束连麦 PK
|
|
5468
|
+
* @deprecated
|
|
5503
5469
|
*/
|
|
5504
5470
|
endRoomPK(options: IEndRoomPKOptions): Promise<ErrorCode>;
|
|
5471
|
+
/**
|
|
5472
|
+
* 监听 RTC KV 变更通知,在监听到通知后续解码数据并重新拉取 KV
|
|
5473
|
+
* @param listener
|
|
5474
|
+
*/
|
|
5475
|
+
registerRTCSignalListener(listener?: (buffer: Uint8Array) => void): void;
|
|
5476
|
+
/**
|
|
5477
|
+
* RTC 调用 signal 服务的通用接口
|
|
5478
|
+
* @param roomId 房间 ID
|
|
5479
|
+
* @param method signal 服务接口名
|
|
5480
|
+
* @param isQuery qry or pub
|
|
5481
|
+
* @param sourceData 待发送的编码数据
|
|
5482
|
+
*/
|
|
5483
|
+
rtcSignaling(roomId: string, method: string, isQuery: boolean, sourceData: any): Promise<{
|
|
5484
|
+
code: ErrorCode;
|
|
5485
|
+
buffer?: Uint8Array | string;
|
|
5486
|
+
}>;
|
|
5487
|
+
/**
|
|
5488
|
+
* RTC KV 数据通知
|
|
5489
|
+
* @deprecated
|
|
5490
|
+
* @param roomdId 数据对应的房间 Id
|
|
5491
|
+
* @param data 通知数据为 key:value 方式
|
|
5492
|
+
* @description
|
|
5493
|
+
* 目前仅通知:主播加入、退出房间的人员列表变更,发布、取消发布资源列表变更
|
|
5494
|
+
*/
|
|
5495
|
+
onrtcdatachange?(data: IServerRTCRoomEntry[], roomdId?: string): void;
|
|
5496
|
+
/**
|
|
5497
|
+
* 获取加入 RTC 房间的用户信息(当前仅能查自己的)
|
|
5498
|
+
* @deprecated
|
|
5499
|
+
*/
|
|
5500
|
+
getRTCJoinedUserInfo(userId: string): IPromiseResult<IRTCJoinedInfo[]>;
|
|
5505
5501
|
}
|
|
5506
5502
|
|
|
5503
|
+
declare const keymaps: {
|
|
5504
|
+
readonly RtcInput: readonly ["roomType", "broadcastType", "extraInnerData", "needSysChatroom", "identityChangeType", "joinType", "innerDatas", "outerDatas"];
|
|
5505
|
+
readonly RtcUserListOutput: readonly ["users", "token", "sessionId", "roomInfo"];
|
|
5506
|
+
readonly SetUserStatusInput: readonly ["status"];
|
|
5507
|
+
readonly RtcSetDataInput: readonly ["interior", "target", "key", "value", "objectName", "content"];
|
|
5508
|
+
readonly RtcUserSetDataInput: readonly ["valueInfo", "objectName", "content"];
|
|
5509
|
+
readonly RtcDataInput: readonly ["interior", "target", "key", "objectName", "content"];
|
|
5510
|
+
readonly RtcSetOutDataInput: readonly ["target", "valueInfo", "objectName", "content"];
|
|
5511
|
+
readonly MCFollowInput: readonly ["state"];
|
|
5512
|
+
readonly RtcTokenOutput: readonly ["rtcToken"];
|
|
5513
|
+
readonly RtcQryOutput: readonly ["outInfo"];
|
|
5514
|
+
readonly RtcQryUserOutDataInput: readonly ["userId"];
|
|
5515
|
+
readonly RtcUserOutDataOutput: readonly ["user"];
|
|
5516
|
+
readonly RtcQueryListInput: readonly ["order"];
|
|
5517
|
+
readonly RtcRoomInfoOutput: readonly ["roomId", "roomData", "userCount", "list"];
|
|
5518
|
+
readonly RtcValueInfo: readonly ["key", "value"];
|
|
5519
|
+
readonly RtcKeyDeleteInput: readonly ["key"];
|
|
5520
|
+
readonly RtcNotifyMsg: readonly ["type", "time", "roomId"];
|
|
5521
|
+
readonly RtcPullKV: readonly ["timestamp", "roomId"];
|
|
5522
|
+
readonly RtcKVOutput: readonly ["entries", "bFullUpdate", "syncTime"];
|
|
5523
|
+
readonly RtcQueryUserJoinedInput: readonly ["userId"];
|
|
5524
|
+
readonly RtcQueryUserJoinedOutput: readonly ["info"];
|
|
5525
|
+
readonly RtcInviteInput: readonly ["invitedUserId", "timeoutTime", "invitedRoomId", "inviteInfo", "inviteSessionId"];
|
|
5526
|
+
readonly RtcCancelInviteInput: readonly ["invitedUserId", "invitedRoomId", "inviteInfo", "inviteSessionId"];
|
|
5527
|
+
readonly RtcInviteAnswerInput: readonly ["inviteUserId", "answerCode", "inviteRoomId", "inviteSessionId", "content", "key", "value"];
|
|
5528
|
+
readonly RtcEndInviteInput: readonly ["inviteRoomId", "inviteSessionId", "inviteContent", "inviteRoomKeys"];
|
|
5529
|
+
};
|
|
5530
|
+
declare type RTCKeyMaps = typeof keymaps;
|
|
5531
|
+
|
|
5507
5532
|
interface IEngineWatcher {
|
|
5508
5533
|
/**
|
|
5509
5534
|
* @param message 消息
|
|
@@ -5536,6 +5561,7 @@ interface IEngineWatcher {
|
|
|
5536
5561
|
*/
|
|
5537
5562
|
declare abstract class AEngine implements IEngine {
|
|
5538
5563
|
readonly runtime: IRuntime;
|
|
5564
|
+
readonly rtcCodec: AbsCodec<RTCKeyMaps>;
|
|
5539
5565
|
protected readonly _watcher: IEngineWatcher;
|
|
5540
5566
|
protected readonly _options: IAPIContextOption;
|
|
5541
5567
|
/**
|
|
@@ -5545,11 +5571,18 @@ declare abstract class AEngine implements IEngine {
|
|
|
5545
5571
|
protected readonly _appkey: string;
|
|
5546
5572
|
protected readonly _apiVer: string;
|
|
5547
5573
|
protected readonly _apiVersion: string;
|
|
5574
|
+
private _rtcKVManager;
|
|
5548
5575
|
/**
|
|
5549
5576
|
* 引擎初始化
|
|
5550
5577
|
* @param _appkey
|
|
5551
5578
|
*/
|
|
5552
|
-
constructor(runtime: IRuntime, _watcher: IEngineWatcher, _options: IAPIContextOption);
|
|
5579
|
+
constructor(runtime: IRuntime, rtcCodec: AbsCodec<RTCKeyMaps>, _watcher: IEngineWatcher, _options: IAPIContextOption);
|
|
5580
|
+
protected _rtcSignalingListener?: (buffer: Uint8Array) => void;
|
|
5581
|
+
/**
|
|
5582
|
+
* 注册 RTC KV 变更监听器
|
|
5583
|
+
* @param listener
|
|
5584
|
+
*/
|
|
5585
|
+
registerRTCSignalingListener(listener: ((buffer: Uint8Array) => void) | undefined): void;
|
|
5553
5586
|
abstract requestNaviInfo(uris: string[], appkey: string, token: string, checkCA?: boolean): Promise<INaviInfo | null>;
|
|
5554
5587
|
/**
|
|
5555
5588
|
* 获取导航数据
|
|
@@ -6175,15 +6208,27 @@ declare abstract class AEngine implements IEngine {
|
|
|
6175
6208
|
*/
|
|
6176
6209
|
abstract getAllConversationState(): Promise<IAsyncRes<IConversationState[]>>;
|
|
6177
6210
|
abstract clearData(): Promise<IAsyncRes<boolean>>;
|
|
6178
|
-
|
|
6179
|
-
|
|
6211
|
+
/**
|
|
6212
|
+
* RTC 通用调用接口
|
|
6213
|
+
* 在非 Comet 协议下,入参 sourceData 应为 ArrayBuffer 数据,返回结果为 Uint8Array 数据
|
|
6214
|
+
* @param roomId 房间 ID
|
|
6215
|
+
* @param method CMP 接口方法名
|
|
6216
|
+
* @param isQuery 使用 `qry` or `pub` 进行请求,按服务要求传递
|
|
6217
|
+
* @param sourceData PB 数据
|
|
6218
|
+
*/
|
|
6219
|
+
abstract rtcSignaling(roomId: string, method: string, isQuery: boolean, sourceData: ArrayBuffer | object): Promise<{
|
|
6220
|
+
code: ErrorCode;
|
|
6221
|
+
buffer?: Uint8Array | string;
|
|
6222
|
+
}>;
|
|
6180
6223
|
abstract rtcPing(roomId: string, mode: number, broadcastType?: number): Promise<ErrorCode>;
|
|
6181
|
-
|
|
6182
|
-
|
|
6183
|
-
|
|
6184
|
-
|
|
6185
|
-
|
|
6186
|
-
|
|
6224
|
+
joinRTCRoom(roomId: string, mode: RTCMode, broadcastType?: number, joinType?: RTCJoinType, innerUserDatas?: IRTCUserData, outerUserDatas?: IRTCUserData): IPromiseResult<IJoinRTCRoomData>;
|
|
6225
|
+
quitRTCRoom(roomId: string): Promise<ErrorCode>;
|
|
6226
|
+
getRTCRoomInfo(roomId: string): IPromiseResult<IRTCRoomInfo>;
|
|
6227
|
+
getRTCUserInfoList(roomId: string): IPromiseResult<IRTCUsers>;
|
|
6228
|
+
getRTCUserInfo(roomId: string): IPromiseResult<unknown>;
|
|
6229
|
+
setRTCUserInfo(roomId: string, key: string, value: string): Promise<ErrorCode>;
|
|
6230
|
+
removeRTCUserInfo(roomId: string, keys: string[]): Promise<ErrorCode>;
|
|
6231
|
+
setRTCData(roomId: string, key: string, value: string, isInner: boolean, apiType: RTCApiType, message?: {
|
|
6187
6232
|
name: string;
|
|
6188
6233
|
content: string;
|
|
6189
6234
|
}): Promise<ErrorCode>;
|
|
@@ -6194,33 +6239,41 @@ declare abstract class AEngine implements IEngine {
|
|
|
6194
6239
|
* @param valueInfo 全量资源数据
|
|
6195
6240
|
* @param objectName 全量 URI 消息名
|
|
6196
6241
|
*/
|
|
6197
|
-
|
|
6242
|
+
setRTCTotalRes(roomId: string, message: {
|
|
6198
6243
|
name: string;
|
|
6199
6244
|
content: string;
|
|
6200
6245
|
}, valueInfo: string, objectName: string, mcuValInfo: string): Promise<ErrorCode>;
|
|
6201
|
-
|
|
6202
|
-
|
|
6246
|
+
getRTCData(roomId: string, keys: string[], isInner: boolean, apiType: RTCApiType): IPromiseResult<KVString>;
|
|
6247
|
+
removeRTCData(roomId: string, keys: string[], isInner: boolean, apiType: RTCApiType, message?: {
|
|
6203
6248
|
name: string;
|
|
6204
6249
|
content: string;
|
|
6205
6250
|
}): Promise<ErrorCode>;
|
|
6206
|
-
|
|
6207
|
-
|
|
6208
|
-
|
|
6209
|
-
|
|
6210
|
-
|
|
6211
|
-
|
|
6251
|
+
setRTCOutData(roomId: string, rtcData: unknown, type: number, message: unknown): Promise<ErrorCode>;
|
|
6252
|
+
getRTCOutData(roomId: string, userIds: string[]): IPromiseResult<unknown>;
|
|
6253
|
+
getRTCToken(roomId: string, mode: number, broadcastType?: number): IPromiseResult<IRtcTokenData>;
|
|
6254
|
+
setRTCState(roomId: string, report: string): Promise<ErrorCode>;
|
|
6255
|
+
getRTCUserList(roomId: string): IPromiseResult<IRTCUsers>;
|
|
6256
|
+
joinLivingRoomAsAudience(roomId: string, mode: RTCMode, broadcastType?: number): Promise<IAsyncRes<{
|
|
6212
6257
|
token: string;
|
|
6213
6258
|
kvEntries: IServerRTCRoomEntry[];
|
|
6214
6259
|
}>>;
|
|
6215
|
-
|
|
6216
|
-
|
|
6217
|
-
|
|
6218
|
-
|
|
6219
|
-
|
|
6220
|
-
|
|
6221
|
-
|
|
6222
|
-
|
|
6260
|
+
pullRTCRoomEntry(roomId: string, _timestamp: number): Promise<IAsyncRes<IChrmKVPullData>>;
|
|
6261
|
+
quitLivingRoomAsAudience(roomId: string): Promise<ErrorCode>;
|
|
6262
|
+
rtcIdentityChange(roomId: string, changeType: RTCIdentityChangeType, broadcastType?: number): Promise<IAsyncRes<IJoinRTCRoomData>>;
|
|
6263
|
+
getRTCJoinedUserInfo(userId: string): Promise<IAsyncRes<IRTCJoinedInfo[]>>;
|
|
6264
|
+
setRTCCDNUris(roomId: string, objectName: string, CDNUris: string): Promise<ErrorCode>;
|
|
6265
|
+
requestRoomPK(options: IReqRoomPKOptions): Promise<ErrorCode>;
|
|
6266
|
+
cancelRoomPK(options: ICancelRoomPKOptions): Promise<ErrorCode>;
|
|
6267
|
+
responseRoomPK(options: IResRoomPKOptions): Promise<ErrorCode>;
|
|
6268
|
+
endRoomPK(options: IEndRoomPKOptions): Promise<ErrorCode>;
|
|
6269
|
+
/**
|
|
6270
|
+
* 设置聊天室关联的rtc房间
|
|
6271
|
+
*/
|
|
6223
6272
|
abstract bindRTCRoomForChatroom(options: IRTCRoomBindOption): Promise<ErrorCode>;
|
|
6273
|
+
/**
|
|
6274
|
+
* 接收 rtc 资源变更
|
|
6275
|
+
*/
|
|
6276
|
+
protected _receiveRtcKv(buffer: Uint8Array): void;
|
|
6224
6277
|
}
|
|
6225
6278
|
|
|
6226
6279
|
declare class AppStorage {
|
|
@@ -6764,4 +6817,4 @@ declare const ONE_LOG_SIZE_MAX = 1000;
|
|
|
6764
6817
|
*/
|
|
6765
6818
|
declare const version: string;
|
|
6766
6819
|
|
|
6767
|
-
export { AEngine, APIContext, AppStorage, AssertRules, CONNECTION_TYPE, CPP_PROTOCAL_MSGTYPE_OPTION, CallLibMsgType, ChatroomEntryType, ChatroomUserChangeType, CometChannel, ConnectResultCode, ConnectionStatus, ConversationType, DB_LOG_FLUSH_FREQUENCY, DB_LOG_MAX_SIZE, DelayTimer, ErrorCode, EventEmitter, FileType, HttpMethod, IAPIContextOption, IAndroidPushConfig, IAsyncRes, IBaseConversationInfo, IBlockedMessageInfo, ICancelRoomPKOptions, IChatRoomEntries, IChatRoomEntry, IChatroomEntries, IChatroomEntry, IChatroomEntryListenerData, IChatroomInfo, IChatroomListener, IChatroomListenerData, IChatroomRejoinedFailed, IChatroomRejoinedInfo, IChatroomRejoinedSuccessed, IChatroomUser, IChatroomUserChangeInfo, IChrmKVEntries, IChrmKVEntry, IConnectResult, IConnectionStatusListener, IConversationOption, IConversationState, IConversationStateListener, IConversationTag, IConversationTagListener, IDataChannelWatcher, IDeletedExpansion, IEndRoomPKOptions, IEngine, IEngineWatcher, IEventListener, IExpansionListener, IExpansionListenerData, IExpansionMsgContent, IExtraMethod, IGetMsgOption, IGetUltraGroupListOption, IGooglePushConfig, IInsertMsgOptions, IIsValidExpansion, IJoinRTCRoomData, ILocalReadReceiptInfo, ILocalTagStatus, ILogExtensions, ILogInfo, ILogInit, IM_CHATROOM_PULL_INTERVAL_TIME, 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, IRTCRoomBindOption, IRTCRoomInfo, IRTCUserData, IRTCUsers, IReadReceiptInfo, IRealTimeLog, IRecallMsgContent, IRecallMsgOptions, IReceivedConversation, IReceivedConversationByTag, IReceivedMessage, IRemoveChatRoomEntries, IRemoveChatRoomEntry, IRemoveChatroomEntries, IRemoveChatroomEntry, IReqRoomPKOptions, IRequest, IResRoomPKOptions, IResponse, IRtcTokenData, IRuntime, ISendExMsgOptions, ISendMsgOptions, IServerConversationStatus, IServerRTCRoomEntry, IServerUserSetting, ISetConversationStatusOptions, IStorage, ITagInfo, ITagListener, ITagParam, ITagStatus, ITypingInfo, ITypingMessage, ITypingUser, IUltraExMsgOptions, IUltraGroupConversation, IUltraGroupOption, IUltraModifyMsgOptions, IUltraMsgQueryOptions, IUpdatedConversation, IUpdatedExpansion, IUploadAuth, IUserProfile, IWatcher, IWebSocket, IiOSPushConfig, ItypingStateListener, KVString, LiveRole, LiveType, LogLevel, LogSource, LogTagId, Logger, MAX_MESSAGE_CONTENT_BYTES, MAX_MESSAGE_EXPANSION_KEY_LENGTH, MAX_MESSAGE_EXPANSION_VAL_LENGTH, MINI_COMET_CONNECT_URIS, MINI_SOCKET_CONNECT_URIS, MentionedType, MessageBlockSourceType, MessageBlockType, MessageDirection, MessageType, NAVI_CACHE_DURATION, NAVI_REQ_TIMEOUT, NetworkType, NotificationLevel, NotificationStatus, ONE_LOG_SIZE_MAX, OperateStatus, PING_REQ_TIMEOUT, PUBLIC_CLOUD_NAVI_URIS, PluginContext, RCAssertError, REAT_TIME_LOG_SIZE, RTCApiType, RTCIdentityChangeType, RTCJoinType, RTCMode, RTCPluginContext, ReceivedStatus, SEND_MESSAGE_TYPE_OPTION, STATUS_MESSAGE, STORAGE_ROOT_KEY, TagChangeType, UltraGroupChannelChangeType, UltraGroupChannelType, UltraMsgChangeType, UltraMsgSubChangeType, UploadMethod, VersionManage, WEB_SOCKET_TIMEOUT, WebSocketChannel, appendUrl, assert, clone, cloneByJSON, _default as engineLogger, forEach, formatConnectResponseCode, getBrowser, getMimeKey, getUUID, getUUID22, getUploadFileName, indexOf, isArray, isArrayBuffer, isBoolean, isFunction, isHttpUrl, isInObject, isInclude, isNull, isNumber, isObject, isString, isUndefined, isValidChannelId, isValidChrmEntryKey, isValidChrmEntryValue, isValidConversationType, isValidExpansion, isValidFileType, base as logger, map, notEmptyArray, notEmptyObject, notEmptyString, pushConfigsToJSON, pushJSONToConfigs, randomNum, todo, usingCppEngine, validate, version };
|
|
6820
|
+
export { AEngine, APIContext, AbsCodec, AppStorage, AssertRules, CONNECTION_TYPE, CPP_PROTOCAL_MSGTYPE_OPTION, CallLibMsgType, ChatroomEntryType, ChatroomUserChangeType, CometChannel, ConnectResultCode, ConnectionStatus, ConversationType, DB_LOG_FLUSH_FREQUENCY, DB_LOG_MAX_SIZE, DelayTimer, ErrorCode, EventEmitter, FileType, HttpMethod, IAPIContextOption, IAndroidPushConfig, IAsyncRes, IBaseConversationInfo, IBlockedMessageInfo, ICancelRoomPKOptions, IChatRoomEntries, IChatRoomEntry, IChatroomEntries, IChatroomEntry, IChatroomEntryListenerData, IChatroomInfo, IChatroomListener, IChatroomListenerData, IChatroomRejoinedFailed, IChatroomRejoinedInfo, IChatroomRejoinedSuccessed, IChatroomUser, IChatroomUserChangeInfo, IChrmKVEntries, IChrmKVEntry, IConnectResult, IConnectionStatusListener, IConversationOption, IConversationState, IConversationStateListener, IConversationTag, IConversationTagListener, IDataChannelWatcher, IDeletedExpansion, IEndRoomPKOptions, IEngine, IEngineWatcher, IEventListener, IExpansionListener, IExpansionListenerData, IExpansionMsgContent, IExtraMethod, IGetMsgOption, IGetUltraGroupListOption, IGooglePushConfig, IInsertMsgOptions, IIsValidExpansion, IJoinRTCRoomData, ILocalReadReceiptInfo, ILocalTagStatus, ILogExtensions, ILogInfo, ILogInit, IM_CHATROOM_PULL_INTERVAL_TIME, 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, IRTCRoomBindOption, IRTCRoomInfo, IRTCUserData, IRTCUsers, IReadReceiptInfo, IRealTimeLog, IRecallMsgContent, IRecallMsgOptions, IReceivedConversation, IReceivedConversationByTag, IReceivedMessage, IRemoveChatRoomEntries, IRemoveChatRoomEntry, IRemoveChatroomEntries, IRemoveChatroomEntry, IReqRoomPKOptions, IRequest, IResRoomPKOptions, IResponse, IRtcTokenData, IRuntime, ISendExMsgOptions, ISendMsgOptions, IServerConversationStatus, IServerRTCRoomEntry, IServerUserSetting, ISetConversationStatusOptions, IStorage, ITagInfo, ITagListener, ITagParam, ITagStatus, ITypingInfo, ITypingMessage, ITypingUser, IUltraExMsgOptions, IUltraGroupConversation, IUltraGroupOption, IUltraModifyMsgOptions, IUltraMsgQueryOptions, IUpdatedConversation, IUpdatedExpansion, IUploadAuth, IUserProfile, IWatcher, IWebSocket, IiOSPushConfig, ItypingStateListener, KVString, LiveRole, LiveType, LogLevel, LogSource, LogTagId, Logger, MAX_MESSAGE_CONTENT_BYTES, MAX_MESSAGE_EXPANSION_KEY_LENGTH, MAX_MESSAGE_EXPANSION_VAL_LENGTH, MINI_COMET_CONNECT_URIS, MINI_SOCKET_CONNECT_URIS, MentionedType, MessageBlockSourceType, MessageBlockType, MessageDirection, MessageType, NAVI_CACHE_DURATION, NAVI_REQ_TIMEOUT, NetworkType, NotificationLevel, NotificationStatus, ONE_LOG_SIZE_MAX, OperateStatus, PING_REQ_TIMEOUT, PUBLIC_CLOUD_NAVI_URIS, PluginContext, RCAssertError, REAT_TIME_LOG_SIZE, RTCApiType, RTCIdentityChangeType, RTCJoinType, RTCKeyMaps, RTCMode, RTCPluginContext, ReceivedStatus, SEND_MESSAGE_TYPE_OPTION, STATUS_MESSAGE, STORAGE_ROOT_KEY, TagChangeType, UltraGroupChannelChangeType, UltraGroupChannelType, UltraMsgChangeType, UltraMsgSubChangeType, UploadMethod, VersionManage, WEB_SOCKET_TIMEOUT, WebSocketChannel, appendUrl, assert, clone, cloneByJSON, _default as engineLogger, forEach, formatConnectResponseCode, getBrowser, getMimeKey, getUUID, getUUID22, getUploadFileName, indexOf, isArray, isArrayBuffer, isBoolean, isFunction, isHttpUrl, isInObject, isInclude, isNull, isNumber, isObject, isString, isUndefined, isValidChannelId, isValidChrmEntryKey, isValidChrmEntryValue, isValidConversationType, isValidExpansion, isValidFileType, base as logger, map, notEmptyArray, notEmptyObject, notEmptyString, pushConfigsToJSON, pushJSONToConfigs, randomNum, todo, usingCppEngine, validate, version };
|