diff --git a/lib/types/index.d.ts b/lib/types/index.d.ts index eef78cdc4..81caf5db5 100644 --- a/lib/types/index.d.ts +++ b/lib/types/index.d.ts @@ -2667,6 +2667,18 @@ declare namespace PubNub { * @default `false` */ autoNetworkDetection?: boolean; + + /** + * If the browser fails to detect the network changes from Wi-Fi to LAN and vice versa, or you + * get reconnection issues, set the flag to `false`. This allows the SDK reconnection logic to + * take over. + * + * **Note:** This option is available only in the **browser** environment. + * + * @default `true` + */ + listenToBrowserNetworkEvents?: boolean; + /** * Whether to use the standardized workflows for subscribe and presence. * diff --git a/package-lock.json b/package-lock.json index 39f129312..24a2ad6ef 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "pubnub", - "version": "10.2.6", + "version": "10.2.8", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "pubnub", - "version": "10.2.6", + "version": "10.2.8", "license": "SEE LICENSE IN LICENSE", "dependencies": { "agentkeepalive": "^3.5.2", diff --git a/src/core/interfaces/configuration.ts b/src/core/interfaces/configuration.ts index 1cd449deb..45888f3c1 100644 --- a/src/core/interfaces/configuration.ts +++ b/src/core/interfaces/configuration.ts @@ -284,6 +284,17 @@ export type UserConfiguration = { */ autoNetworkDetection?: boolean; + /** + * If the browser fails to detect the network changes from Wi-Fi to LAN and vice versa, or you + * get reconnection issues, set the flag to `false`. This allows the SDK reconnection logic to + * take over. + * + * **Note:** This option is available only in the **browser** environment. + * + * @default `true` + */ + listenToBrowserNetworkEvents?: boolean; + /** * Whether to use the standardized workflows for subscribe and presence. *