vani-meeting-client 2.1.2 → 2.1.3
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.
|
@@ -77,9 +77,13 @@ var CommunicationHandler = /** @class */ (function () {
|
|
|
77
77
|
(_a = _this.meetingHandler) === null || _a === void 0 ? void 0 : _a.endAndDestory();
|
|
78
78
|
return;
|
|
79
79
|
}
|
|
80
|
-
if (count ===
|
|
80
|
+
if (count === 10) {
|
|
81
81
|
_this.emitMessageToSource(VaniEvent.OnNotReachable, {});
|
|
82
|
+
if (_this.meetingStartRequest.isMobileApp) {
|
|
83
|
+
_this.emitMessageToSource(VaniEvent.OnSocketError, {});
|
|
84
|
+
}
|
|
82
85
|
}
|
|
86
|
+
_this.emitMessageToSource(VaniEvent.CheckingInternetConnection, {});
|
|
83
87
|
_this.isReachable = false;
|
|
84
88
|
_this.meetingStartRequest && _this.meetingStartRequest.logLevel === LogLevel.Debug && console.log("checkIfInternetReachable");
|
|
85
89
|
fetch(_this.meetingStartRequest.urlToCheckInternetPresent, {
|
|
@@ -560,7 +564,12 @@ var CommunicationHandler = /** @class */ (function () {
|
|
|
560
564
|
// if (count < 2 && this.websocketCallHandler?.isWebScoketConnected()) {
|
|
561
565
|
// this.videoCallHandler?.reconnectedWithoutPing()
|
|
562
566
|
// }
|
|
563
|
-
(
|
|
567
|
+
if (this.meetingStartRequest && this.meetingStartRequest.isMobileApp) {
|
|
568
|
+
this.websocketCallHandler.reconnectOnInternetFailur();
|
|
569
|
+
}
|
|
570
|
+
else {
|
|
571
|
+
(_a = this.videoCallHandler) === null || _a === void 0 ? void 0 : _a.reconnectedWithoutPing();
|
|
572
|
+
}
|
|
564
573
|
}
|
|
565
574
|
};
|
|
566
575
|
CommunicationHandler.prototype.cleanup = function () {
|
package/lib/model/Event.d.ts
CHANGED
|
@@ -29,6 +29,7 @@ export declare enum VaniEvent {
|
|
|
29
29
|
OnOldMessages = "onOldMessages",
|
|
30
30
|
OnSpeakerChanged = "onSpeakerChanged",
|
|
31
31
|
OnAudioVolumeChanged = "OnAudioVolumeChanged",
|
|
32
|
+
CheckingInternetConnection = "CheckingInternetConnection",
|
|
32
33
|
OnNotReachable = "notReachable",
|
|
33
34
|
OnReconectionTimeout = "reconectionTimeout",
|
|
34
35
|
OnReconecting = "reconecting",
|
|
@@ -45,6 +46,7 @@ interface VaniConnectionEvents {
|
|
|
45
46
|
[VaniEvent.OnSocketError]: (error: any) => any;
|
|
46
47
|
[VaniEvent.OnSocketConnected]: () => any;
|
|
47
48
|
[VaniEvent.OnSocketReconnectTimeOut]: () => any;
|
|
49
|
+
[VaniEvent.CheckingInternetConnection]: () => any;
|
|
48
50
|
[VaniEvent.OnConnected]: () => any;
|
|
49
51
|
[VaniEvent.OnConnectionBack]: () => any;
|
|
50
52
|
[VaniEvent.OnPermissionError]: (error: DOMException) => any;
|
package/lib/model/Event.js
CHANGED
|
@@ -27,6 +27,7 @@ export var VaniEvent;
|
|
|
27
27
|
VaniEvent["OnOldMessages"] = "onOldMessages";
|
|
28
28
|
VaniEvent["OnSpeakerChanged"] = "onSpeakerChanged";
|
|
29
29
|
VaniEvent["OnAudioVolumeChanged"] = "OnAudioVolumeChanged";
|
|
30
|
+
VaniEvent["CheckingInternetConnection"] = "CheckingInternetConnection";
|
|
30
31
|
VaniEvent["OnNotReachable"] = "notReachable";
|
|
31
32
|
VaniEvent["OnReconectionTimeout"] = "reconectionTimeout";
|
|
32
33
|
VaniEvent["OnReconecting"] = "reconecting";
|
|
@@ -277,10 +277,15 @@ var WebsocketHandler = /** @class */ (function (_super) {
|
|
|
277
277
|
this.wss.onerror = function (event) {
|
|
278
278
|
var _a;
|
|
279
279
|
_this.meetingStartRequest && _this.meetingStartRequest.logLevel === LogLevel.Debug && console.log("wss error", event);
|
|
280
|
-
_this.
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
280
|
+
if (_this.meetingStartRequest.isMobileApp) {
|
|
281
|
+
_this.communicationHandler.onIceCandidateDisconnected();
|
|
282
|
+
}
|
|
283
|
+
else {
|
|
284
|
+
_this.isWebSocketConnectionInProgress = false;
|
|
285
|
+
(_a = _this.communicationHandler) === null || _a === void 0 ? void 0 : _a.emitMessageToSource(VaniEvent.OnSocketError, event);
|
|
286
|
+
if (_this.wss) {
|
|
287
|
+
_this.wss.close();
|
|
288
|
+
}
|
|
284
289
|
}
|
|
285
290
|
};
|
|
286
291
|
this.wss.onclose = function (event) {
|