@rongcloud/engine 4.4.7 → 4.4.8-enterprise.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  /*
2
- * RCEngine - v4.4.7
3
- * CommitId - c8f27ba0690dc60de359e1467090faadf5b2248d
4
- * Thu Aug 26 2021 16:54:43 GMT+0800 (China Standard Time)
2
+ * RCEngine - v4.4.8-enterprise.2
3
+ * CommitId - bbd1ce6836028953773821c2b3b9ab8199bc732f
4
+ * Thu Dec 30 2021 17:52:45 GMT+0800 (China Standard Time)
5
5
  * ©2020 RongCloud, Inc. All rights reserved.
6
6
  */
7
7
  /**
@@ -337,6 +337,11 @@ interface IChrmKVEntry {
337
337
  type?: number;
338
338
  isDeleted?: boolean;
339
339
  }
340
+ interface IChrmKVPullData {
341
+ kvEntries: IChrmKVEntry[];
342
+ isFullUpdate?: boolean;
343
+ syncTime?: number;
344
+ }
340
345
  interface IServerConversationStatus {
341
346
  conversationType: number;
342
347
  targetId: string;
@@ -1409,6 +1414,7 @@ declare class DataCodec {
1409
1414
  * 全量 URI
1410
1415
  */
1411
1416
  encodeUserSetRTCData(message: any, valueInfo: string, objectName: string, mcuValInfo: string): any;
1417
+ encodeUserSetRTCCDNUris(objectName: string, CDNUris: string): any;
1412
1418
  /**
1413
1419
  * 用户属性获取
1414
1420
  */
@@ -1749,6 +1755,10 @@ declare class WebSocketChannel extends ADataChannel {
1749
1755
  * @param apiVersion - apiVersion 需符合 `/\d+(\.\d+){2}/` 规则
1750
1756
  */
1751
1757
  connect(appkey: string, token: string, hosts: string[], protocol: 'http' | 'https', apiVersion: string): Promise<ErrorCode>;
1758
+ /**
1759
+ * 发起连接请求
1760
+ */
1761
+ private _connect;
1752
1762
  /**
1753
1763
  * 当前累计心跳超时次数
1754
1764
  */
@@ -1793,6 +1803,7 @@ declare class CometChannel extends ADataChannel {
1793
1803
  */
1794
1804
  _startPullSignal(protocol: 'http' | 'https'): Promise<void>;
1795
1805
  connect(appkey: string, token: string, hosts: string[], protocol: 'http' | 'https', apiVersion: string): Promise<ErrorCode>;
1806
+ private _connect;
1796
1807
  private _idCount;
1797
1808
  private _generateMessageId;
1798
1809
  sendCometData(writer: BaseWriter, timeout?: number): Promise<void>;
@@ -2194,6 +2205,10 @@ interface IRTCRoomInfo {
2194
2205
  interface IJoinRTCRoomData extends IRTCUsers {
2195
2206
  token: string;
2196
2207
  sessionId: string;
2208
+ roomInfo: {
2209
+ key: string;
2210
+ value: string;
2211
+ }[];
2197
2212
  }
2198
2213
 
2199
2214
  /**
@@ -3325,6 +3340,10 @@ declare class APIContext {
3325
3340
  * 清除会话消息未读数
3326
3341
  */
3327
3342
  clearUnreadCount(conversationType: ConversationType, targetId: string, channelId?: string): Promise<ErrorCode>;
3343
+ /**
3344
+ * 清除全部会话消息未读数
3345
+ */
3346
+ clearAllUnreadCount(): Promise<ErrorCode>;
3328
3347
  /**
3329
3348
  * 获取指定会话消息未读数
3330
3349
  */
@@ -3654,6 +3673,7 @@ declare class APIContext {
3654
3673
  name: string;
3655
3674
  content: string;
3656
3675
  }, valueInfo: string, objectName: string, mcuValInfo?: string): Promise<ErrorCode>;
3676
+ setRTCCDNUris(roomId: string, objectName: string, CDNUris: string): Promise<ErrorCode>;
3657
3677
  getRTCData(roomId: string, keys: string[], isInner: boolean, apiType: RTCApiType): Promise<IAsyncRes<KVString>>;
3658
3678
  removeRTCData(roomId: string, keys: string[], isInner: boolean, apiType: RTCApiType, message?: {
3659
3679
  name: string;
@@ -3678,6 +3698,10 @@ declare class APIContext {
3678
3698
  * 直播身份切换
3679
3699
  */
3680
3700
  rtcIdentityChange(roomId: string, changeType: RTCIdentityChangeType, broadcastType?: number): Promise<IAsyncRes<IJoinRTCRoomData>>;
3701
+ /**
3702
+ * 拉取 RTC 全量 KV
3703
+ */
3704
+ pullRTCRoomEntry(roomId: string, timestamp: number): Promise<IAsyncRes<IChrmKVPullData>>;
3681
3705
  }
3682
3706
 
3683
3707
  declare class RTCPluginContext extends PluginContext {
@@ -3732,6 +3756,22 @@ declare class RTCPluginContext extends PluginContext {
3732
3756
  * mcu 合流发布内容,是一个 JSON 字符串,解析类型为 {mediaType: number, msid: string, uri: string}[]
3733
3757
  */
3734
3758
  mcuValInfo?: string): Promise<ErrorCode>;
3759
+ /**
3760
+ * 设置 cdn_uris 扩散
3761
+ * @param objectName 全量 URI 消息名,即 `RCRTC:TotalContentResources`
3762
+ * @param CDNUris cdn_uris 扩散字段
3763
+ * {
3764
+ "broadcast":0,
3765
+ "fps":25,
3766
+ "h":640,
3767
+ "pull_safe":true,
3768
+ "push_mode":1,
3769
+ "url":"https://rtc-media-api-service-ucbj2-01.rongcloud.net/api/rtc/cdn/player",
3770
+ "w":360,
3771
+ "enableInnerCDN":true
3772
+ }[]
3773
+ */
3774
+ setRTCCDNUris(roomId: string, objectName: string, CDNUris: string): Promise<ErrorCode>;
3735
3775
  getRTCData(roomId: string, keys: string[], isInner: boolean, apiType: RTCApiType): IPromiseResult<KVString>;
3736
3776
  removeRTCData(roomId: string, keys: string[], isInner: boolean, apiType: RTCApiType, message?: {
3737
3777
  name: string;
@@ -3756,6 +3796,10 @@ declare class RTCPluginContext extends PluginContext {
3756
3796
  * 直播身份切换
3757
3797
  */
3758
3798
  rtcIdentityChange(roomId: string, changeType: RTCIdentityChangeType, broadcastType?: number): IPromiseResult<IJoinRTCRoomData>;
3799
+ /**
3800
+ * 拉取 RTC 全量 KV
3801
+ */
3802
+ pullRTCRoomEntry(roomId: string, timestamp: number): IPromiseResult<IChrmKVPullData>;
3759
3803
  }
3760
3804
 
3761
3805
  declare abstract class ANavi {
@@ -4252,6 +4296,7 @@ interface IEngine {
4252
4296
  getRTCToken(roomId: string, mode: number, broadcastType?: number): IPromiseResult<IRtcTokenData>;
4253
4297
  setRTCState(roomId: string, reportId: string): Promise<ErrorCode>;
4254
4298
  getRTCUserList(roomId: string): IPromiseResult<IRTCUsers>;
4299
+ setRTCCDNUris(roomId: string, objectName: string, CDNUris: string): Promise<ErrorCode>;
4255
4300
  }
4256
4301
 
4257
4302
  interface IExpansionMsgContent {
@@ -4451,6 +4496,10 @@ declare abstract class AEngine implements IEngine {
4451
4496
  * 清除指定会话未读数
4452
4497
  */
4453
4498
  abstract clearConversationUnreadCount(conversationType: ConversationType, targetId: string, channelId: string): Promise<ErrorCode>;
4499
+ /**
4500
+ * 清除全部会话未读数
4501
+ */
4502
+ abstract clearAllUnreadCount(): Promise<ErrorCode>;
4454
4503
  /**
4455
4504
  * 获取第一个未读消息
4456
4505
  */
@@ -4802,6 +4851,8 @@ declare abstract class AEngine implements IEngine {
4802
4851
  }>>;
4803
4852
  abstract quitLivingRoomAsAudience(roomId: string): Promise<ErrorCode>;
4804
4853
  abstract rtcIdentityChange(roomId: string, changeType: RTCIdentityChangeType, broadcastType?: number): Promise<IAsyncRes<IJoinRTCRoomData>>;
4854
+ abstract setRTCCDNUris(roomId: string, objectName: string, CDNUris: string): Promise<ErrorCode>;
4855
+ abstract pullRTCRoomEntry(roomId: string, timestamp: number): Promise<IAsyncRes<IChrmKVPullData>>;
4805
4856
  }
4806
4857
 
4807
4858
  declare class AppStorage {