quickblox 2.21.4 → 2.21.5-alpha.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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "quickblox",
3
3
  "description": "QuickBlox JavaScript SDK",
4
- "version": "2.21.4",
4
+ "version": "2.21.5-alpha.2",
5
5
  "homepage": "https://quickblox.com/developers/Javascript",
6
6
  "main": "src/qbMain.js",
7
7
  "types": "quickblox.d.ts",
package/quickblox.d.ts CHANGED
@@ -146,10 +146,39 @@ export declare interface QBConfig {
146
146
  retry: (session: QBSession) => void,
147
147
  ) => void
148
148
  }
149
+ /**
150
+ * Ping request timeout in seconds.
151
+ * Used by ping() / pingchat(): if no pong response is received within this time,
152
+ * the SDK treats the ping as failed and calls the callback with "No answer".
153
+ */
149
154
  pingTimeout?: number
155
+
156
+ /**
157
+ * Enables additional ping-related debug logging.
158
+ * When true, the SDK may output extra logs for chat ping / connectivity checks.
159
+ */
150
160
  pingDebug?: boolean
161
+
162
+ /**
163
+ * Chat ping interval in seconds.
164
+ * Used after a successful chat connection: the SDK sends periodic XMPP pings and
165
+ * tracks consecutive misses to decide when to re-establish the connection.
166
+ * Set to 0 to disable periodic chat pinging.
167
+ */
151
168
  pingLocalhostTimeInterval?: number
169
+
170
+ /**
171
+ * Reconnect retry interval in seconds.
172
+ * Used by internal reconnection loop (_establishConnection): defines how often
173
+ * the SDK retries connect() after a disconnect or when connection is considered unhealthy.
174
+ */
152
175
  chatReconnectionTimeInterval?: number
176
+
177
+ /**
178
+ * Number of consecutive missed chat pings before SDK treats connection as unhealthy
179
+ * and starts reconnection (or connection re-establish) logic.
180
+ */
181
+ chatPingMissLimit?: number
153
182
  /** If true, QB.init will do a short synchronous block after starting account_settings. Default: true. */
154
183
  initBlockOnSettings?: boolean
155
184
  /** Busy-wait duration in ms used when initBlockOnSettings=true. Default: 3000. */
@@ -417,7 +446,7 @@ export declare interface QBChatXMPPMessage {
417
446
  date_sent: string
418
447
  save_to_history: string
419
448
  attachments?: ChatMessageAttachment[]
420
- [custom_field_N: string]: string
449
+ [custom_field_N: string]: any
421
450
  }
422
451
  }
423
452
 
package/quickblox.js CHANGED
@@ -47380,7 +47380,7 @@ ChatProxy.prototype = {
47380
47380
  '_chatPingFailedCounter: ', self._chatPingFailedCounter,
47381
47381
  ' error: ', error);
47382
47382
  self._chatPingFailedCounter += 1;
47383
- if (self._chatPingFailedCounter > 6) {
47383
+ if (self._chatPingFailedCounter >= config.chatPingMissLimit) {
47384
47384
  if (self.isConnected && typeof self.onDisconnectedListener === 'function') {
47385
47385
  Utils.safeCallbackCall(self.onDisconnectedListener);
47386
47386
  }
@@ -55132,8 +55132,8 @@ module.exports = StreamManagement;
55132
55132
  */
55133
55133
 
55134
55134
  var config = {
55135
- version: '2.21.4',
55136
- buildNumber: '1171',
55135
+ version: '2.21.5',
55136
+ buildNumber: '1172',
55137
55137
  creds: {
55138
55138
  'appId': 0,
55139
55139
  'authKey': '',
@@ -55160,6 +55160,7 @@ var config = {
55160
55160
  initBlockDurationMs: 3000,
55161
55161
  pingLocalhostTimeInterval: 5,
55162
55162
  chatReconnectionTimeInterval: 3,
55163
+ chatPingMissLimit: 3,
55163
55164
  webrtc: {
55164
55165
  answerTimeInterval: 60,
55165
55166
  autoReject: true,
@@ -881,7 +881,7 @@ ChatProxy.prototype = {
881
881
  '_chatPingFailedCounter: ', self._chatPingFailedCounter,
882
882
  ' error: ', error);
883
883
  self._chatPingFailedCounter += 1;
884
- if (self._chatPingFailedCounter > 6) {
884
+ if (self._chatPingFailedCounter >= config.chatPingMissLimit) {
885
885
  if (self.isConnected && typeof self.onDisconnectedListener === 'function') {
886
886
  Utils.safeCallbackCall(self.onDisconnectedListener);
887
887
  }
package/src/qbConfig.js CHANGED
@@ -12,8 +12,8 @@
12
12
  */
13
13
 
14
14
  var config = {
15
- version: '2.21.4',
16
- buildNumber: '1171',
15
+ version: '2.21.5',
16
+ buildNumber: '1172',
17
17
  creds: {
18
18
  'appId': 0,
19
19
  'authKey': '',
@@ -40,6 +40,7 @@ var config = {
40
40
  initBlockDurationMs: 3000,
41
41
  pingLocalhostTimeInterval: 5,
42
42
  chatReconnectionTimeInterval: 3,
43
+ chatPingMissLimit: 3,
43
44
  webrtc: {
44
45
  answerTimeInterval: 60,
45
46
  autoReject: true,