@koi-design/callkit 2.1.0-beta.9 → 2.1.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/dist/index.d.ts +1 -0
- package/dist/index.global.js +8 -5
- package/dist/index.global.js.map +1 -1
- package/dist/index.js +8 -5
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +8 -5
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -681,7 +681,7 @@ var Call = class {
|
|
|
681
681
|
// package.json
|
|
682
682
|
var package_default = {
|
|
683
683
|
name: "@koi-design/callkit",
|
|
684
|
-
version: "2.1.
|
|
684
|
+
version: "2.1.1",
|
|
685
685
|
description: "callkit",
|
|
686
686
|
author: "koi",
|
|
687
687
|
license: "ISC",
|
|
@@ -2238,6 +2238,9 @@ var Socket = class {
|
|
|
2238
2238
|
get reconnectConfig() {
|
|
2239
2239
|
return this.callKit.config.getReconnectConfig("incall");
|
|
2240
2240
|
}
|
|
2241
|
+
isConnected() {
|
|
2242
|
+
return this.connectAuthState.isConnected;
|
|
2243
|
+
}
|
|
2241
2244
|
init() {
|
|
2242
2245
|
const { socket } = this.callKit.config.getConfig();
|
|
2243
2246
|
this.callKit.logger.info(`socket init: ${socket}`, {
|
|
@@ -2571,14 +2574,14 @@ var Socket = class {
|
|
|
2571
2574
|
if (now - this.lastPingTime > pingInterval + pingTimeout) {
|
|
2572
2575
|
if (this.ws && this.connectAuthState.isConnected) {
|
|
2573
2576
|
this.ws.close(4001, "ping timeout");
|
|
2574
|
-
} else {
|
|
2575
|
-
this.callKit.reset();
|
|
2576
2577
|
}
|
|
2577
|
-
this.callKit.
|
|
2578
|
+
this.callKit.reset();
|
|
2579
|
+
this.callKit.logger.warn("Ping timeout not connected", {
|
|
2578
2580
|
caller: "Socket.ping",
|
|
2579
2581
|
type: "INCALL",
|
|
2580
2582
|
content: {
|
|
2581
|
-
errCode: ErrorCode.SOCKET_PING_TIMEOUT
|
|
2583
|
+
errCode: ErrorCode.SOCKET_PING_TIMEOUT,
|
|
2584
|
+
isConnected: this.isConnected()
|
|
2582
2585
|
}
|
|
2583
2586
|
});
|
|
2584
2587
|
this.callKit.trigger(KitEvent.INCALL_CONNECT_EVENT, {
|