@koi-design/callkit 2.3.0-beta.9 → 2.3.1-beta.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 +45 -2
- package/dist/index.global.js +445 -47
- package/dist/index.js +440 -42
- package/dist/index.mjs +440 -42
- package/package.json +2 -2
- package/dist/index.global.js.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/index.mjs.map +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -4800,12 +4800,14 @@ interface SipConfig {
|
|
|
4800
4800
|
maxAttempts: number;
|
|
4801
4801
|
delay: number;
|
|
4802
4802
|
registererOptions: RegistererOptions;
|
|
4803
|
+
enableMessageKeepalive: boolean;
|
|
4804
|
+
messageKeepaliveInterval: number;
|
|
4803
4805
|
}
|
|
4804
4806
|
declare class Socket {
|
|
4805
4807
|
private callKit;
|
|
4806
4808
|
private ws?;
|
|
4807
4809
|
lastPingTime: any;
|
|
4808
|
-
|
|
4810
|
+
private heartbeatManager;
|
|
4809
4811
|
/**
|
|
4810
4812
|
* @description reconnect timer
|
|
4811
4813
|
*/
|
|
@@ -4828,7 +4830,17 @@ declare class Socket {
|
|
|
4828
4830
|
get startConfirm(): boolean;
|
|
4829
4831
|
get isError(): boolean;
|
|
4830
4832
|
constructor(callKit: CallKit);
|
|
4831
|
-
get
|
|
4833
|
+
get isUserSetPingTryCount(): boolean;
|
|
4834
|
+
get reconnectConfig(): IncallConfig | {
|
|
4835
|
+
maxAttempts: number;
|
|
4836
|
+
interval: number;
|
|
4837
|
+
enabled: boolean;
|
|
4838
|
+
delay: number;
|
|
4839
|
+
pingInterval: number;
|
|
4840
|
+
pingTimeout: number;
|
|
4841
|
+
excludeLogEvents: string[];
|
|
4842
|
+
};
|
|
4843
|
+
get pingInterval(): number;
|
|
4832
4844
|
isConnected(): boolean;
|
|
4833
4845
|
init(): void;
|
|
4834
4846
|
private setConnectAuthState;
|
|
@@ -4844,6 +4856,7 @@ declare class Socket {
|
|
|
4844
4856
|
private onMessage;
|
|
4845
4857
|
send(event: SocketSendEventType, message?: any): void;
|
|
4846
4858
|
private ping;
|
|
4859
|
+
handlePingTimeout(): void;
|
|
4847
4860
|
private checkPing;
|
|
4848
4861
|
/**
|
|
4849
4862
|
* reset socket connection and all states
|
|
@@ -4851,6 +4864,10 @@ declare class Socket {
|
|
|
4851
4864
|
reset(config?: {
|
|
4852
4865
|
force?: boolean;
|
|
4853
4866
|
}): Promise<void>;
|
|
4867
|
+
/**
|
|
4868
|
+
* Destroy the heartbeat manager
|
|
4869
|
+
*/
|
|
4870
|
+
destroyHeartbeat(): void;
|
|
4854
4871
|
private attemptReconnect;
|
|
4855
4872
|
}
|
|
4856
4873
|
|
|
@@ -4895,6 +4912,13 @@ interface IConfig {
|
|
|
4895
4912
|
iceGatheringTimeout: number;
|
|
4896
4913
|
encryptionMethod: EncryptionMethodType;
|
|
4897
4914
|
logGather: boolean;
|
|
4915
|
+
keepaliveInterval?: number;
|
|
4916
|
+
enableMessageKeepalive?: boolean;
|
|
4917
|
+
messageKeepaliveInterval?: number;
|
|
4918
|
+
/** Ping timeout reconnection max attempts */
|
|
4919
|
+
pingTryCount?: number;
|
|
4920
|
+
/** Ping timeout reconnection interval (seconds) */
|
|
4921
|
+
pingTryCountInterval?: number;
|
|
4898
4922
|
};
|
|
4899
4923
|
}
|
|
4900
4924
|
declare class Config {
|
|
@@ -5254,7 +5278,11 @@ declare class Connect {
|
|
|
5254
5278
|
register(): Promise<void>;
|
|
5255
5279
|
private reconnectTimer?;
|
|
5256
5280
|
private reconnectAttempts;
|
|
5281
|
+
private messageKeepaliveTimer?;
|
|
5257
5282
|
private startReconnectTimer;
|
|
5283
|
+
private stopMessageKeepalive;
|
|
5284
|
+
private startMessageKeepalive;
|
|
5285
|
+
private sendKeepaliveMessage;
|
|
5258
5286
|
stop(): Promise<void>;
|
|
5259
5287
|
unregister(): Promise<void>;
|
|
5260
5288
|
call(callback: (userInfo: IConfig['userInfo']) => void): Promise<void>;
|
|
@@ -5289,6 +5317,21 @@ declare class Connect {
|
|
|
5289
5317
|
setMute(mute: boolean): Promise<void>;
|
|
5290
5318
|
refer(referTo: string, extra?: any): Promise<void>;
|
|
5291
5319
|
private referInCall;
|
|
5320
|
+
/**
|
|
5321
|
+
* Get the SIP URI for "refer to self" (same as reconnection refer logic).
|
|
5322
|
+
* Shared by referInCallToSelf and internal reconnection refer.
|
|
5323
|
+
*/
|
|
5324
|
+
private getSelfReferUri;
|
|
5325
|
+
/**
|
|
5326
|
+
* Whether we can refer the current call to self (has active session in Established/Establishing and is calling).
|
|
5327
|
+
* Shared by reconnection logic and referInCallToSelf.
|
|
5328
|
+
*/
|
|
5329
|
+
private canReferInCallToSelf;
|
|
5330
|
+
/**
|
|
5331
|
+
* Refer the current call to self (e.g. Agent RTP loss recovery, post-reconnect recovery).
|
|
5332
|
+
* Socket and other callers can use this without constructing referTo.
|
|
5333
|
+
*/
|
|
5334
|
+
referInCallToSelf(callUuid?: string, extra?: any): Promise<void>;
|
|
5292
5335
|
}
|
|
5293
5336
|
|
|
5294
5337
|
interface CallKitConfig {
|