@koi-design/callkit 2.1.0-beta.8 → 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.d.ts
CHANGED
package/dist/index.global.js
CHANGED
|
@@ -3879,7 +3879,7 @@ var WebCall = (() => {
|
|
|
3879
3879
|
// package.json
|
|
3880
3880
|
var package_default = {
|
|
3881
3881
|
name: "@koi-design/callkit",
|
|
3882
|
-
version: "2.1.
|
|
3882
|
+
version: "2.1.1",
|
|
3883
3883
|
description: "callkit",
|
|
3884
3884
|
author: "koi",
|
|
3885
3885
|
license: "ISC",
|
|
@@ -19828,6 +19828,9 @@ ${log}` : log;
|
|
|
19828
19828
|
get reconnectConfig() {
|
|
19829
19829
|
return this.callKit.config.getReconnectConfig("incall");
|
|
19830
19830
|
}
|
|
19831
|
+
isConnected() {
|
|
19832
|
+
return this.connectAuthState.isConnected;
|
|
19833
|
+
}
|
|
19831
19834
|
init() {
|
|
19832
19835
|
const { socket } = this.callKit.config.getConfig();
|
|
19833
19836
|
this.callKit.logger.info(`socket init: ${socket}`, {
|
|
@@ -20161,14 +20164,14 @@ ${log}` : log;
|
|
|
20161
20164
|
if (now - this.lastPingTime > pingInterval + pingTimeout) {
|
|
20162
20165
|
if (this.ws && this.connectAuthState.isConnected) {
|
|
20163
20166
|
this.ws.close(4001, "ping timeout");
|
|
20164
|
-
} else {
|
|
20165
|
-
this.callKit.reset();
|
|
20166
20167
|
}
|
|
20167
|
-
this.callKit.
|
|
20168
|
+
this.callKit.reset();
|
|
20169
|
+
this.callKit.logger.warn("Ping timeout not connected", {
|
|
20168
20170
|
caller: "Socket.ping",
|
|
20169
20171
|
type: "INCALL",
|
|
20170
20172
|
content: {
|
|
20171
|
-
errCode: ErrorCode.SOCKET_PING_TIMEOUT
|
|
20173
|
+
errCode: ErrorCode.SOCKET_PING_TIMEOUT,
|
|
20174
|
+
isConnected: this.isConnected()
|
|
20172
20175
|
}
|
|
20173
20176
|
});
|
|
20174
20177
|
this.callKit.trigger(KitEvent.INCALL_CONNECT_EVENT, {
|