videomail-client 15.7.8 → 15.7.9
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/cjs/index.cjs +5 -39
- package/dist/esm/index.js +5 -39
- package/dist/esm/wrappers/visuals/recorder.d.ts +0 -4
- package/dist/umd/index.js +4 -40
- package/package.json +1 -1
package/dist/cjs/index.cjs
CHANGED
|
@@ -10970,7 +10970,7 @@ var __webpack_exports__ = {};
|
|
|
10970
10970
|
var client = __webpack_require__("Q");
|
|
10971
10971
|
var client_default = /*#__PURE__*/ __webpack_require__.n(client);
|
|
10972
10972
|
var package_namespaceObject = {
|
|
10973
|
-
rE: "15.7.
|
|
10973
|
+
rE: "15.7.9"
|
|
10974
10974
|
};
|
|
10975
10975
|
function isAudioEnabled(options) {
|
|
10976
10976
|
return Boolean(options.audio.enabled);
|
|
@@ -17497,7 +17497,6 @@ var __webpack_exports__ = {};
|
|
|
17497
17497
|
return obj;
|
|
17498
17498
|
}
|
|
17499
17499
|
const PIPE_SYMBOL = "°º¤ø,¸¸,ø¤º°`°º¤ø,¸,ø¤°º¤ø,¸¸,ø¤º°`°º¤ø,¸ ";
|
|
17500
|
-
const INITIAL_CONNECTION_RETRY_DELAY = 1e3;
|
|
17501
17500
|
class Recorder extends util_Despot {
|
|
17502
17501
|
writeStream(buffer, opts) {
|
|
17503
17502
|
if (this.stream) if (this.stream.destroyed) {
|
|
@@ -17591,41 +17590,13 @@ var __webpack_exports__ = {};
|
|
|
17591
17590
|
window.clearTimeout(this.connectionTimeout);
|
|
17592
17591
|
this.connectionTimeout = void 0;
|
|
17593
17592
|
}
|
|
17594
|
-
clearConnectionRetryTimeout() {
|
|
17595
|
-
if (!this.connectionRetryTimeout) return;
|
|
17596
|
-
this.options.logger.debug("Recorder: clearConnectionRetryTimeout()");
|
|
17597
|
-
window.clearTimeout(this.connectionRetryTimeout);
|
|
17598
|
-
this.connectionRetryTimeout = void 0;
|
|
17599
|
-
}
|
|
17600
|
-
retryInitialConnection(url2Connect) {
|
|
17601
|
-
const retryStartedAt = this.connectionRetryStartedAt;
|
|
17602
|
-
if (!retryStartedAt) return false;
|
|
17603
|
-
const retryElapsedMs = Date.now() - retryStartedAt;
|
|
17604
|
-
if (retryElapsedMs >= this.options.timeouts.connection) {
|
|
17605
|
-
this.connectionRetryStartedAt = void 0;
|
|
17606
|
-
return false;
|
|
17607
|
-
}
|
|
17608
|
-
const retryRemainingMs = this.options.timeouts.connection - retryElapsedMs;
|
|
17609
|
-
this.options.logger.debug(`Recorder: retrying initial web socket connection to ${url2Connect}`);
|
|
17610
|
-
this.connecting = false;
|
|
17611
|
-
if (this.stream) {
|
|
17612
|
-
this.stream.destroy();
|
|
17613
|
-
this.stream = void 0;
|
|
17614
|
-
}
|
|
17615
|
-
this.connectionRetryTimeout = window.setTimeout(()=>{
|
|
17616
|
-
this.connectionRetryTimeout = void 0;
|
|
17617
|
-
this.initSocket();
|
|
17618
|
-
}, Math.min(INITIAL_CONNECTION_RETRY_DELAY, retryRemainingMs));
|
|
17619
|
-
return true;
|
|
17620
|
-
}
|
|
17621
17593
|
failConnection(params) {
|
|
17622
17594
|
var _ref, _ref1;
|
|
17623
17595
|
if (this.connectionFailed || this.connected || this.unloaded) return;
|
|
17624
|
-
this.clearConnectionTimeout();
|
|
17625
|
-
const { url2Connect, cause } = params;
|
|
17626
|
-
if (this.retryInitialConnection(url2Connect)) return;
|
|
17627
17596
|
this.connectionFailed = true;
|
|
17628
17597
|
this.connecting = false;
|
|
17598
|
+
this.clearConnectionTimeout();
|
|
17599
|
+
const { url2Connect, cause } = params;
|
|
17629
17600
|
const online = navigator.onLine;
|
|
17630
17601
|
const elapsedMs = this.connectingStartedAt ? Date.now() - this.connectingStartedAt : void 0;
|
|
17631
17602
|
const closeEvent = this.lastCloseEvent;
|
|
@@ -17792,9 +17763,7 @@ var __webpack_exports__ = {};
|
|
|
17792
17763
|
});
|
|
17793
17764
|
}
|
|
17794
17765
|
if (this.stream) {
|
|
17795
|
-
|
|
17796
|
-
const connectionRetryElapsedMs = this.connectionRetryStartedAt ? Date.now() - this.connectionRetryStartedAt : 0;
|
|
17797
|
-
const connectionTimeoutMs = this.connectionRetryStartedAt ? Math.max(0, this.options.timeouts.connection - connectionRetryElapsedMs) : this.options.timeouts.connection;
|
|
17766
|
+
const connectionTimeoutMs = this.options.timeouts.connection;
|
|
17798
17767
|
this.connectionTimeout = window.setTimeout(()=>{
|
|
17799
17768
|
this.failConnection({
|
|
17800
17769
|
url2Connect,
|
|
@@ -17822,7 +17791,6 @@ var __webpack_exports__ = {};
|
|
|
17822
17791
|
if (!this.connected && !isClosing && !this.unloaded) {
|
|
17823
17792
|
this.connected = true;
|
|
17824
17793
|
this.connecting = this.unloaded = false;
|
|
17825
|
-
this.connectionRetryStartedAt = void 0;
|
|
17826
17794
|
this.emit("CONNECTED");
|
|
17827
17795
|
null == cb || cb();
|
|
17828
17796
|
}
|
|
@@ -18183,8 +18151,6 @@ var __webpack_exports__ = {};
|
|
|
18183
18151
|
this.reset();
|
|
18184
18152
|
this.clearUserMediaTimeout();
|
|
18185
18153
|
this.clearConnectionTimeout();
|
|
18186
|
-
this.clearConnectionRetryTimeout();
|
|
18187
|
-
this.connectionRetryStartedAt = void 0;
|
|
18188
18154
|
this.connecting = false;
|
|
18189
18155
|
if (this.userMedia) this.userMedia.unloadRemainingEventListeners();
|
|
18190
18156
|
if (this.submitting) ;
|
|
@@ -18597,7 +18563,7 @@ var __webpack_exports__ = {};
|
|
|
18597
18563
|
return this.userMediaLoaded;
|
|
18598
18564
|
}
|
|
18599
18565
|
constructor(visuals, replay, options){
|
|
18600
|
-
super("Recorder", options), recorder_define_property(this, "visuals", void 0), recorder_define_property(this, "replay", void 0), recorder_define_property(this, "loop", void 0), recorder_define_property(this, "originalAnimationFrameObject", void 0), recorder_define_property(this, "samplesCount", 0), recorder_define_property(this, "framesCount", 0), recorder_define_property(this, "recordingStats", void 0), recorder_define_property(this, "confirmedFrameNumber", 0), recorder_define_property(this, "confirmedSampleNumber", 0), recorder_define_property(this, "recorderElement", void 0), recorder_define_property(this, "userMedia", void 0), recorder_define_property(this, "userMediaTimeout", void 0), recorder_define_property(this, "retryTimeout", void 0), recorder_define_property(this, "connectionTimeout", void 0), recorder_define_property(this, "
|
|
18566
|
+
super("Recorder", options), recorder_define_property(this, "visuals", void 0), recorder_define_property(this, "replay", void 0), recorder_define_property(this, "loop", void 0), recorder_define_property(this, "originalAnimationFrameObject", void 0), recorder_define_property(this, "samplesCount", 0), recorder_define_property(this, "framesCount", 0), recorder_define_property(this, "recordingStats", void 0), recorder_define_property(this, "confirmedFrameNumber", 0), recorder_define_property(this, "confirmedSampleNumber", 0), recorder_define_property(this, "recorderElement", void 0), recorder_define_property(this, "userMedia", void 0), recorder_define_property(this, "userMediaTimeout", void 0), recorder_define_property(this, "retryTimeout", void 0), recorder_define_property(this, "connectionTimeout", void 0), recorder_define_property(this, "frameProgress", void 0), recorder_define_property(this, "sampleProgress", void 0), recorder_define_property(this, "canvas", void 0), recorder_define_property(this, "ctx", void 0), recorder_define_property(this, "userMediaLoaded", void 0), recorder_define_property(this, "userMediaLoading", false), recorder_define_property(this, "submitting", false), recorder_define_property(this, "unloaded", void 0), recorder_define_property(this, "stopTime", void 0), recorder_define_property(this, "stream", void 0), recorder_define_property(this, "connecting", false), recorder_define_property(this, "connected", false), recorder_define_property(this, "connectionFailed", false), recorder_define_property(this, "blocking", false), recorder_define_property(this, "built", false), recorder_define_property(this, "key", void 0), recorder_define_property(this, "waitingTime", void 0), recorder_define_property(this, "connectingStartedAt", void 0), recorder_define_property(this, "lastCloseEvent", void 0), recorder_define_property(this, "pingInterval", void 0), recorder_define_property(this, "frame", void 0), recorder_define_property(this, "recordingBuffer", void 0), recorder_define_property(this, "facingMode", void 0);
|
|
18601
18567
|
this.visuals = visuals;
|
|
18602
18568
|
this.replay = replay;
|
|
18603
18569
|
this.facingMode = options.video.facingMode;
|
package/dist/esm/index.js
CHANGED
|
@@ -3619,7 +3619,7 @@ const constants = {
|
|
|
3619
3619
|
}
|
|
3620
3620
|
};
|
|
3621
3621
|
var package_namespaceObject = {
|
|
3622
|
-
rE: "15.7.
|
|
3622
|
+
rE: "15.7.9"
|
|
3623
3623
|
};
|
|
3624
3624
|
function isAudioEnabled(options) {
|
|
3625
3625
|
return Boolean(options.audio.enabled);
|
|
@@ -6521,7 +6521,6 @@ function recorder_define_property(obj, key, value) {
|
|
|
6521
6521
|
return obj;
|
|
6522
6522
|
}
|
|
6523
6523
|
const PIPE_SYMBOL = "°º¤ø,¸¸,ø¤º°`°º¤ø,¸,ø¤°º¤ø,¸¸,ø¤º°`°º¤ø,¸ ";
|
|
6524
|
-
const INITIAL_CONNECTION_RETRY_DELAY = 1e3;
|
|
6525
6524
|
class Recorder extends util_Despot {
|
|
6526
6525
|
writeStream(buffer, opts) {
|
|
6527
6526
|
if (this.stream) if (this.stream.destroyed) {
|
|
@@ -6615,40 +6614,12 @@ class Recorder extends util_Despot {
|
|
|
6615
6614
|
window.clearTimeout(this.connectionTimeout);
|
|
6616
6615
|
this.connectionTimeout = void 0;
|
|
6617
6616
|
}
|
|
6618
|
-
clearConnectionRetryTimeout() {
|
|
6619
|
-
if (!this.connectionRetryTimeout) return;
|
|
6620
|
-
this.options.logger.debug("Recorder: clearConnectionRetryTimeout()");
|
|
6621
|
-
window.clearTimeout(this.connectionRetryTimeout);
|
|
6622
|
-
this.connectionRetryTimeout = void 0;
|
|
6623
|
-
}
|
|
6624
|
-
retryInitialConnection(url2Connect) {
|
|
6625
|
-
const retryStartedAt = this.connectionRetryStartedAt;
|
|
6626
|
-
if (!retryStartedAt) return false;
|
|
6627
|
-
const retryElapsedMs = Date.now() - retryStartedAt;
|
|
6628
|
-
if (retryElapsedMs >= this.options.timeouts.connection) {
|
|
6629
|
-
this.connectionRetryStartedAt = void 0;
|
|
6630
|
-
return false;
|
|
6631
|
-
}
|
|
6632
|
-
const retryRemainingMs = this.options.timeouts.connection - retryElapsedMs;
|
|
6633
|
-
this.options.logger.debug(`Recorder: retrying initial web socket connection to ${url2Connect}`);
|
|
6634
|
-
this.connecting = false;
|
|
6635
|
-
if (this.stream) {
|
|
6636
|
-
this.stream.destroy();
|
|
6637
|
-
this.stream = void 0;
|
|
6638
|
-
}
|
|
6639
|
-
this.connectionRetryTimeout = window.setTimeout(()=>{
|
|
6640
|
-
this.connectionRetryTimeout = void 0;
|
|
6641
|
-
this.initSocket();
|
|
6642
|
-
}, Math.min(INITIAL_CONNECTION_RETRY_DELAY, retryRemainingMs));
|
|
6643
|
-
return true;
|
|
6644
|
-
}
|
|
6645
6617
|
failConnection(params) {
|
|
6646
6618
|
if (this.connectionFailed || this.connected || this.unloaded) return;
|
|
6647
|
-
this.clearConnectionTimeout();
|
|
6648
|
-
const { url2Connect, cause } = params;
|
|
6649
|
-
if (this.retryInitialConnection(url2Connect)) return;
|
|
6650
6619
|
this.connectionFailed = true;
|
|
6651
6620
|
this.connecting = false;
|
|
6621
|
+
this.clearConnectionTimeout();
|
|
6622
|
+
const { url2Connect, cause } = params;
|
|
6652
6623
|
const online = navigator.onLine;
|
|
6653
6624
|
const elapsedMs = this.connectingStartedAt ? Date.now() - this.connectingStartedAt : void 0;
|
|
6654
6625
|
const closeEvent = this.lastCloseEvent;
|
|
@@ -6814,9 +6785,7 @@ class Recorder extends util_Despot {
|
|
|
6814
6785
|
});
|
|
6815
6786
|
}
|
|
6816
6787
|
if (this.stream) {
|
|
6817
|
-
|
|
6818
|
-
const connectionRetryElapsedMs = this.connectionRetryStartedAt ? Date.now() - this.connectionRetryStartedAt : 0;
|
|
6819
|
-
const connectionTimeoutMs = this.connectionRetryStartedAt ? Math.max(0, this.options.timeouts.connection - connectionRetryElapsedMs) : this.options.timeouts.connection;
|
|
6788
|
+
const connectionTimeoutMs = this.options.timeouts.connection;
|
|
6820
6789
|
this.connectionTimeout = window.setTimeout(()=>{
|
|
6821
6790
|
this.failConnection({
|
|
6822
6791
|
url2Connect,
|
|
@@ -6843,7 +6812,6 @@ class Recorder extends util_Despot {
|
|
|
6843
6812
|
if (!this.connected && !isClosing && !this.unloaded) {
|
|
6844
6813
|
this.connected = true;
|
|
6845
6814
|
this.connecting = this.unloaded = false;
|
|
6846
|
-
this.connectionRetryStartedAt = void 0;
|
|
6847
6815
|
this.emit("CONNECTED");
|
|
6848
6816
|
cb?.();
|
|
6849
6817
|
}
|
|
@@ -7198,8 +7166,6 @@ class Recorder extends util_Despot {
|
|
|
7198
7166
|
this.reset();
|
|
7199
7167
|
this.clearUserMediaTimeout();
|
|
7200
7168
|
this.clearConnectionTimeout();
|
|
7201
|
-
this.clearConnectionRetryTimeout();
|
|
7202
|
-
this.connectionRetryStartedAt = void 0;
|
|
7203
7169
|
this.connecting = false;
|
|
7204
7170
|
if (this.userMedia) this.userMedia.unloadRemainingEventListeners();
|
|
7205
7171
|
if (this.submitting) ;
|
|
@@ -7603,7 +7569,7 @@ class Recorder extends util_Despot {
|
|
|
7603
7569
|
return this.userMediaLoaded;
|
|
7604
7570
|
}
|
|
7605
7571
|
constructor(visuals, replay, options){
|
|
7606
|
-
super("Recorder", options), recorder_define_property(this, "visuals", void 0), recorder_define_property(this, "replay", void 0), recorder_define_property(this, "loop", void 0), recorder_define_property(this, "originalAnimationFrameObject", void 0), recorder_define_property(this, "samplesCount", 0), recorder_define_property(this, "framesCount", 0), recorder_define_property(this, "recordingStats", void 0), recorder_define_property(this, "confirmedFrameNumber", 0), recorder_define_property(this, "confirmedSampleNumber", 0), recorder_define_property(this, "recorderElement", void 0), recorder_define_property(this, "userMedia", void 0), recorder_define_property(this, "userMediaTimeout", void 0), recorder_define_property(this, "retryTimeout", void 0), recorder_define_property(this, "connectionTimeout", void 0), recorder_define_property(this, "
|
|
7572
|
+
super("Recorder", options), recorder_define_property(this, "visuals", void 0), recorder_define_property(this, "replay", void 0), recorder_define_property(this, "loop", void 0), recorder_define_property(this, "originalAnimationFrameObject", void 0), recorder_define_property(this, "samplesCount", 0), recorder_define_property(this, "framesCount", 0), recorder_define_property(this, "recordingStats", void 0), recorder_define_property(this, "confirmedFrameNumber", 0), recorder_define_property(this, "confirmedSampleNumber", 0), recorder_define_property(this, "recorderElement", void 0), recorder_define_property(this, "userMedia", void 0), recorder_define_property(this, "userMediaTimeout", void 0), recorder_define_property(this, "retryTimeout", void 0), recorder_define_property(this, "connectionTimeout", void 0), recorder_define_property(this, "frameProgress", void 0), recorder_define_property(this, "sampleProgress", void 0), recorder_define_property(this, "canvas", void 0), recorder_define_property(this, "ctx", void 0), recorder_define_property(this, "userMediaLoaded", void 0), recorder_define_property(this, "userMediaLoading", false), recorder_define_property(this, "submitting", false), recorder_define_property(this, "unloaded", void 0), recorder_define_property(this, "stopTime", void 0), recorder_define_property(this, "stream", void 0), recorder_define_property(this, "connecting", false), recorder_define_property(this, "connected", false), recorder_define_property(this, "connectionFailed", false), recorder_define_property(this, "blocking", false), recorder_define_property(this, "built", false), recorder_define_property(this, "key", void 0), recorder_define_property(this, "waitingTime", void 0), recorder_define_property(this, "connectingStartedAt", void 0), recorder_define_property(this, "lastCloseEvent", void 0), recorder_define_property(this, "pingInterval", void 0), recorder_define_property(this, "frame", void 0), recorder_define_property(this, "recordingBuffer", void 0), recorder_define_property(this, "facingMode", void 0);
|
|
7607
7573
|
this.visuals = visuals;
|
|
7608
7574
|
this.replay = replay;
|
|
7609
7575
|
this.facingMode = options.video.facingMode;
|
|
@@ -26,7 +26,6 @@ declare class Recorder extends Despot {
|
|
|
26
26
|
private userMediaTimeout?;
|
|
27
27
|
private retryTimeout?;
|
|
28
28
|
private connectionTimeout?;
|
|
29
|
-
private connectionRetryTimeout?;
|
|
30
29
|
private frameProgress?;
|
|
31
30
|
private sampleProgress?;
|
|
32
31
|
private canvas?;
|
|
@@ -45,7 +44,6 @@ declare class Recorder extends Despot {
|
|
|
45
44
|
private key?;
|
|
46
45
|
private waitingTime?;
|
|
47
46
|
private connectingStartedAt?;
|
|
48
|
-
private connectionRetryStartedAt?;
|
|
49
47
|
private lastCloseEvent?;
|
|
50
48
|
private pingInterval?;
|
|
51
49
|
private frame?;
|
|
@@ -60,8 +58,6 @@ declare class Recorder extends Despot {
|
|
|
60
58
|
private onUserMediaReady;
|
|
61
59
|
private clearRetryTimeout;
|
|
62
60
|
private clearConnectionTimeout;
|
|
63
|
-
private clearConnectionRetryTimeout;
|
|
64
|
-
private retryInitialConnection;
|
|
65
61
|
private failConnection;
|
|
66
62
|
private calculateFrameProgress;
|
|
67
63
|
private calculateSampleProgress;
|
package/dist/umd/index.js
CHANGED
|
@@ -10976,7 +10976,7 @@
|
|
|
10976
10976
|
var client = __webpack_require__("Q");
|
|
10977
10977
|
var client_default = /*#__PURE__*/ __webpack_require__.n(client);
|
|
10978
10978
|
var package_namespaceObject = {
|
|
10979
|
-
rE: "15.7.
|
|
10979
|
+
rE: "15.7.9"
|
|
10980
10980
|
};
|
|
10981
10981
|
function isAudioEnabled(options) {
|
|
10982
10982
|
return Boolean(options.audio.enabled);
|
|
@@ -17227,7 +17227,6 @@
|
|
|
17227
17227
|
const visuals_userMedia = UserMedia;
|
|
17228
17228
|
var Buffer = __webpack_require__("dY").Buffer;
|
|
17229
17229
|
const PIPE_SYMBOL = "°º¤ø,¸¸,ø¤º°`°º¤ø,¸,ø¤°º¤ø,¸¸,ø¤º°`°º¤ø,¸ ";
|
|
17230
|
-
const INITIAL_CONNECTION_RETRY_DELAY = 1e3;
|
|
17231
17230
|
class Recorder extends util_Despot {
|
|
17232
17231
|
visuals;
|
|
17233
17232
|
replay;
|
|
@@ -17243,7 +17242,6 @@
|
|
|
17243
17242
|
userMediaTimeout;
|
|
17244
17243
|
retryTimeout;
|
|
17245
17244
|
connectionTimeout;
|
|
17246
|
-
connectionRetryTimeout;
|
|
17247
17245
|
frameProgress;
|
|
17248
17246
|
sampleProgress;
|
|
17249
17247
|
canvas;
|
|
@@ -17262,7 +17260,6 @@
|
|
|
17262
17260
|
key;
|
|
17263
17261
|
waitingTime;
|
|
17264
17262
|
connectingStartedAt;
|
|
17265
|
-
connectionRetryStartedAt;
|
|
17266
17263
|
lastCloseEvent;
|
|
17267
17264
|
pingInterval;
|
|
17268
17265
|
frame;
|
|
@@ -17366,40 +17363,12 @@
|
|
|
17366
17363
|
window.clearTimeout(this.connectionTimeout);
|
|
17367
17364
|
this.connectionTimeout = void 0;
|
|
17368
17365
|
}
|
|
17369
|
-
clearConnectionRetryTimeout() {
|
|
17370
|
-
if (!this.connectionRetryTimeout) return;
|
|
17371
|
-
this.options.logger.debug("Recorder: clearConnectionRetryTimeout()");
|
|
17372
|
-
window.clearTimeout(this.connectionRetryTimeout);
|
|
17373
|
-
this.connectionRetryTimeout = void 0;
|
|
17374
|
-
}
|
|
17375
|
-
retryInitialConnection(url2Connect) {
|
|
17376
|
-
const retryStartedAt = this.connectionRetryStartedAt;
|
|
17377
|
-
if (!retryStartedAt) return false;
|
|
17378
|
-
const retryElapsedMs = Date.now() - retryStartedAt;
|
|
17379
|
-
if (retryElapsedMs >= this.options.timeouts.connection) {
|
|
17380
|
-
this.connectionRetryStartedAt = void 0;
|
|
17381
|
-
return false;
|
|
17382
|
-
}
|
|
17383
|
-
const retryRemainingMs = this.options.timeouts.connection - retryElapsedMs;
|
|
17384
|
-
this.options.logger.debug(`Recorder: retrying initial web socket connection to ${url2Connect}`);
|
|
17385
|
-
this.connecting = false;
|
|
17386
|
-
if (this.stream) {
|
|
17387
|
-
this.stream.destroy();
|
|
17388
|
-
this.stream = void 0;
|
|
17389
|
-
}
|
|
17390
|
-
this.connectionRetryTimeout = window.setTimeout(()=>{
|
|
17391
|
-
this.connectionRetryTimeout = void 0;
|
|
17392
|
-
this.initSocket();
|
|
17393
|
-
}, Math.min(INITIAL_CONNECTION_RETRY_DELAY, retryRemainingMs));
|
|
17394
|
-
return true;
|
|
17395
|
-
}
|
|
17396
17366
|
failConnection(params) {
|
|
17397
17367
|
if (this.connectionFailed || this.connected || this.unloaded) return;
|
|
17398
|
-
this.clearConnectionTimeout();
|
|
17399
|
-
const { url2Connect, cause } = params;
|
|
17400
|
-
if (this.retryInitialConnection(url2Connect)) return;
|
|
17401
17368
|
this.connectionFailed = true;
|
|
17402
17369
|
this.connecting = false;
|
|
17370
|
+
this.clearConnectionTimeout();
|
|
17371
|
+
const { url2Connect, cause } = params;
|
|
17403
17372
|
const online = navigator.onLine;
|
|
17404
17373
|
const elapsedMs = this.connectingStartedAt ? Date.now() - this.connectingStartedAt : void 0;
|
|
17405
17374
|
const closeEvent = this.lastCloseEvent;
|
|
@@ -17565,9 +17534,7 @@
|
|
|
17565
17534
|
});
|
|
17566
17535
|
}
|
|
17567
17536
|
if (this.stream) {
|
|
17568
|
-
|
|
17569
|
-
const connectionRetryElapsedMs = this.connectionRetryStartedAt ? Date.now() - this.connectionRetryStartedAt : 0;
|
|
17570
|
-
const connectionTimeoutMs = this.connectionRetryStartedAt ? Math.max(0, this.options.timeouts.connection - connectionRetryElapsedMs) : this.options.timeouts.connection;
|
|
17537
|
+
const connectionTimeoutMs = this.options.timeouts.connection;
|
|
17571
17538
|
this.connectionTimeout = window.setTimeout(()=>{
|
|
17572
17539
|
this.failConnection({
|
|
17573
17540
|
url2Connect,
|
|
@@ -17594,7 +17561,6 @@
|
|
|
17594
17561
|
if (!this.connected && !isClosing && !this.unloaded) {
|
|
17595
17562
|
this.connected = true;
|
|
17596
17563
|
this.connecting = this.unloaded = false;
|
|
17597
|
-
this.connectionRetryStartedAt = void 0;
|
|
17598
17564
|
this.emit("CONNECTED");
|
|
17599
17565
|
cb?.();
|
|
17600
17566
|
}
|
|
@@ -17949,8 +17915,6 @@
|
|
|
17949
17915
|
this.reset();
|
|
17950
17916
|
this.clearUserMediaTimeout();
|
|
17951
17917
|
this.clearConnectionTimeout();
|
|
17952
|
-
this.clearConnectionRetryTimeout();
|
|
17953
|
-
this.connectionRetryStartedAt = void 0;
|
|
17954
17918
|
this.connecting = false;
|
|
17955
17919
|
if (this.userMedia) this.userMedia.unloadRemainingEventListeners();
|
|
17956
17920
|
if (this.submitting) ;
|