videomail-client 15.7.8 → 15.7.10
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 +10 -39
- package/dist/esm/index.js +9 -39
- package/dist/esm/wrappers/visuals/recorder.d.ts +0 -4
- package/dist/umd/index.js +8 -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.10"
|
|
10974
10974
|
};
|
|
10975
10975
|
function isAudioEnabled(options) {
|
|
10976
10976
|
return Boolean(options.audio.enabled);
|
|
@@ -15218,6 +15218,7 @@ var __webpack_exports__ = {};
|
|
|
15218
15218
|
}
|
|
15219
15219
|
reportError(err) {
|
|
15220
15220
|
return resource_async_to_generator(function*() {
|
|
15221
|
+
var _this_options_versions;
|
|
15221
15222
|
const queryParams = {
|
|
15222
15223
|
[constants.WHITELIST_KEY_LABEL]: this.options.whitelistKey
|
|
15223
15224
|
};
|
|
@@ -15234,6 +15235,10 @@ var __webpack_exports__ = {};
|
|
|
15234
15235
|
enumerateDevices = void 0;
|
|
15235
15236
|
}
|
|
15236
15237
|
const fullVideomailErrorData = {
|
|
15238
|
+
versions: {
|
|
15239
|
+
videomailClient: package_namespaceObject.rE,
|
|
15240
|
+
videomailNinjaFormPlugin: null == (_this_options_versions = this.options.versions) ? void 0 : _this_options_versions.videomailNinjaFormPlugin
|
|
15241
|
+
},
|
|
15237
15242
|
browser: err.browser,
|
|
15238
15243
|
code: err.code,
|
|
15239
15244
|
cookie: err.cookie,
|
|
@@ -17497,7 +17502,6 @@ var __webpack_exports__ = {};
|
|
|
17497
17502
|
return obj;
|
|
17498
17503
|
}
|
|
17499
17504
|
const PIPE_SYMBOL = "°º¤ø,¸¸,ø¤º°`°º¤ø,¸,ø¤°º¤ø,¸¸,ø¤º°`°º¤ø,¸ ";
|
|
17500
|
-
const INITIAL_CONNECTION_RETRY_DELAY = 1e3;
|
|
17501
17505
|
class Recorder extends util_Despot {
|
|
17502
17506
|
writeStream(buffer, opts) {
|
|
17503
17507
|
if (this.stream) if (this.stream.destroyed) {
|
|
@@ -17591,41 +17595,13 @@ var __webpack_exports__ = {};
|
|
|
17591
17595
|
window.clearTimeout(this.connectionTimeout);
|
|
17592
17596
|
this.connectionTimeout = void 0;
|
|
17593
17597
|
}
|
|
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
17598
|
failConnection(params) {
|
|
17622
17599
|
var _ref, _ref1;
|
|
17623
17600
|
if (this.connectionFailed || this.connected || this.unloaded) return;
|
|
17624
|
-
this.clearConnectionTimeout();
|
|
17625
|
-
const { url2Connect, cause } = params;
|
|
17626
|
-
if (this.retryInitialConnection(url2Connect)) return;
|
|
17627
17601
|
this.connectionFailed = true;
|
|
17628
17602
|
this.connecting = false;
|
|
17603
|
+
this.clearConnectionTimeout();
|
|
17604
|
+
const { url2Connect, cause } = params;
|
|
17629
17605
|
const online = navigator.onLine;
|
|
17630
17606
|
const elapsedMs = this.connectingStartedAt ? Date.now() - this.connectingStartedAt : void 0;
|
|
17631
17607
|
const closeEvent = this.lastCloseEvent;
|
|
@@ -17792,9 +17768,7 @@ var __webpack_exports__ = {};
|
|
|
17792
17768
|
});
|
|
17793
17769
|
}
|
|
17794
17770
|
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;
|
|
17771
|
+
const connectionTimeoutMs = this.options.timeouts.connection;
|
|
17798
17772
|
this.connectionTimeout = window.setTimeout(()=>{
|
|
17799
17773
|
this.failConnection({
|
|
17800
17774
|
url2Connect,
|
|
@@ -17822,7 +17796,6 @@ var __webpack_exports__ = {};
|
|
|
17822
17796
|
if (!this.connected && !isClosing && !this.unloaded) {
|
|
17823
17797
|
this.connected = true;
|
|
17824
17798
|
this.connecting = this.unloaded = false;
|
|
17825
|
-
this.connectionRetryStartedAt = void 0;
|
|
17826
17799
|
this.emit("CONNECTED");
|
|
17827
17800
|
null == cb || cb();
|
|
17828
17801
|
}
|
|
@@ -18183,8 +18156,6 @@ var __webpack_exports__ = {};
|
|
|
18183
18156
|
this.reset();
|
|
18184
18157
|
this.clearUserMediaTimeout();
|
|
18185
18158
|
this.clearConnectionTimeout();
|
|
18186
|
-
this.clearConnectionRetryTimeout();
|
|
18187
|
-
this.connectionRetryStartedAt = void 0;
|
|
18188
18159
|
this.connecting = false;
|
|
18189
18160
|
if (this.userMedia) this.userMedia.unloadRemainingEventListeners();
|
|
18190
18161
|
if (this.submitting) ;
|
|
@@ -18597,7 +18568,7 @@ var __webpack_exports__ = {};
|
|
|
18597
18568
|
return this.userMediaLoaded;
|
|
18598
18569
|
}
|
|
18599
18570
|
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, "
|
|
18571
|
+
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
18572
|
this.visuals = visuals;
|
|
18602
18573
|
this.replay = replay;
|
|
18603
18574
|
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.10"
|
|
3623
3623
|
};
|
|
3624
3624
|
function isAudioEnabled(options) {
|
|
3625
3625
|
return Boolean(options.audio.enabled);
|
|
@@ -4424,6 +4424,10 @@ class Resource {
|
|
|
4424
4424
|
enumerateDevices = void 0;
|
|
4425
4425
|
}
|
|
4426
4426
|
const fullVideomailErrorData = {
|
|
4427
|
+
versions: {
|
|
4428
|
+
videomailClient: package_namespaceObject.rE,
|
|
4429
|
+
videomailNinjaFormPlugin: this.options.versions?.videomailNinjaFormPlugin
|
|
4430
|
+
},
|
|
4427
4431
|
browser: err.browser,
|
|
4428
4432
|
code: err.code,
|
|
4429
4433
|
cookie: err.cookie,
|
|
@@ -6521,7 +6525,6 @@ function recorder_define_property(obj, key, value) {
|
|
|
6521
6525
|
return obj;
|
|
6522
6526
|
}
|
|
6523
6527
|
const PIPE_SYMBOL = "°º¤ø,¸¸,ø¤º°`°º¤ø,¸,ø¤°º¤ø,¸¸,ø¤º°`°º¤ø,¸ ";
|
|
6524
|
-
const INITIAL_CONNECTION_RETRY_DELAY = 1e3;
|
|
6525
6528
|
class Recorder extends util_Despot {
|
|
6526
6529
|
writeStream(buffer, opts) {
|
|
6527
6530
|
if (this.stream) if (this.stream.destroyed) {
|
|
@@ -6615,40 +6618,12 @@ class Recorder extends util_Despot {
|
|
|
6615
6618
|
window.clearTimeout(this.connectionTimeout);
|
|
6616
6619
|
this.connectionTimeout = void 0;
|
|
6617
6620
|
}
|
|
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
6621
|
failConnection(params) {
|
|
6646
6622
|
if (this.connectionFailed || this.connected || this.unloaded) return;
|
|
6647
|
-
this.clearConnectionTimeout();
|
|
6648
|
-
const { url2Connect, cause } = params;
|
|
6649
|
-
if (this.retryInitialConnection(url2Connect)) return;
|
|
6650
6623
|
this.connectionFailed = true;
|
|
6651
6624
|
this.connecting = false;
|
|
6625
|
+
this.clearConnectionTimeout();
|
|
6626
|
+
const { url2Connect, cause } = params;
|
|
6652
6627
|
const online = navigator.onLine;
|
|
6653
6628
|
const elapsedMs = this.connectingStartedAt ? Date.now() - this.connectingStartedAt : void 0;
|
|
6654
6629
|
const closeEvent = this.lastCloseEvent;
|
|
@@ -6814,9 +6789,7 @@ class Recorder extends util_Despot {
|
|
|
6814
6789
|
});
|
|
6815
6790
|
}
|
|
6816
6791
|
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;
|
|
6792
|
+
const connectionTimeoutMs = this.options.timeouts.connection;
|
|
6820
6793
|
this.connectionTimeout = window.setTimeout(()=>{
|
|
6821
6794
|
this.failConnection({
|
|
6822
6795
|
url2Connect,
|
|
@@ -6843,7 +6816,6 @@ class Recorder extends util_Despot {
|
|
|
6843
6816
|
if (!this.connected && !isClosing && !this.unloaded) {
|
|
6844
6817
|
this.connected = true;
|
|
6845
6818
|
this.connecting = this.unloaded = false;
|
|
6846
|
-
this.connectionRetryStartedAt = void 0;
|
|
6847
6819
|
this.emit("CONNECTED");
|
|
6848
6820
|
cb?.();
|
|
6849
6821
|
}
|
|
@@ -7198,8 +7170,6 @@ class Recorder extends util_Despot {
|
|
|
7198
7170
|
this.reset();
|
|
7199
7171
|
this.clearUserMediaTimeout();
|
|
7200
7172
|
this.clearConnectionTimeout();
|
|
7201
|
-
this.clearConnectionRetryTimeout();
|
|
7202
|
-
this.connectionRetryStartedAt = void 0;
|
|
7203
7173
|
this.connecting = false;
|
|
7204
7174
|
if (this.userMedia) this.userMedia.unloadRemainingEventListeners();
|
|
7205
7175
|
if (this.submitting) ;
|
|
@@ -7603,7 +7573,7 @@ class Recorder extends util_Despot {
|
|
|
7603
7573
|
return this.userMediaLoaded;
|
|
7604
7574
|
}
|
|
7605
7575
|
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, "
|
|
7576
|
+
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
7577
|
this.visuals = visuals;
|
|
7608
7578
|
this.replay = replay;
|
|
7609
7579
|
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.10"
|
|
10980
10980
|
};
|
|
10981
10981
|
function isAudioEnabled(options) {
|
|
10982
10982
|
return Boolean(options.audio.enabled);
|
|
@@ -15125,6 +15125,10 @@
|
|
|
15125
15125
|
enumerateDevices = void 0;
|
|
15126
15126
|
}
|
|
15127
15127
|
const fullVideomailErrorData = {
|
|
15128
|
+
versions: {
|
|
15129
|
+
videomailClient: package_namespaceObject.rE,
|
|
15130
|
+
videomailNinjaFormPlugin: this.options.versions?.videomailNinjaFormPlugin
|
|
15131
|
+
},
|
|
15128
15132
|
browser: err.browser,
|
|
15129
15133
|
code: err.code,
|
|
15130
15134
|
cookie: err.cookie,
|
|
@@ -17227,7 +17231,6 @@
|
|
|
17227
17231
|
const visuals_userMedia = UserMedia;
|
|
17228
17232
|
var Buffer = __webpack_require__("dY").Buffer;
|
|
17229
17233
|
const PIPE_SYMBOL = "°º¤ø,¸¸,ø¤º°`°º¤ø,¸,ø¤°º¤ø,¸¸,ø¤º°`°º¤ø,¸ ";
|
|
17230
|
-
const INITIAL_CONNECTION_RETRY_DELAY = 1e3;
|
|
17231
17234
|
class Recorder extends util_Despot {
|
|
17232
17235
|
visuals;
|
|
17233
17236
|
replay;
|
|
@@ -17243,7 +17246,6 @@
|
|
|
17243
17246
|
userMediaTimeout;
|
|
17244
17247
|
retryTimeout;
|
|
17245
17248
|
connectionTimeout;
|
|
17246
|
-
connectionRetryTimeout;
|
|
17247
17249
|
frameProgress;
|
|
17248
17250
|
sampleProgress;
|
|
17249
17251
|
canvas;
|
|
@@ -17262,7 +17264,6 @@
|
|
|
17262
17264
|
key;
|
|
17263
17265
|
waitingTime;
|
|
17264
17266
|
connectingStartedAt;
|
|
17265
|
-
connectionRetryStartedAt;
|
|
17266
17267
|
lastCloseEvent;
|
|
17267
17268
|
pingInterval;
|
|
17268
17269
|
frame;
|
|
@@ -17366,40 +17367,12 @@
|
|
|
17366
17367
|
window.clearTimeout(this.connectionTimeout);
|
|
17367
17368
|
this.connectionTimeout = void 0;
|
|
17368
17369
|
}
|
|
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
17370
|
failConnection(params) {
|
|
17397
17371
|
if (this.connectionFailed || this.connected || this.unloaded) return;
|
|
17398
|
-
this.clearConnectionTimeout();
|
|
17399
|
-
const { url2Connect, cause } = params;
|
|
17400
|
-
if (this.retryInitialConnection(url2Connect)) return;
|
|
17401
17372
|
this.connectionFailed = true;
|
|
17402
17373
|
this.connecting = false;
|
|
17374
|
+
this.clearConnectionTimeout();
|
|
17375
|
+
const { url2Connect, cause } = params;
|
|
17403
17376
|
const online = navigator.onLine;
|
|
17404
17377
|
const elapsedMs = this.connectingStartedAt ? Date.now() - this.connectingStartedAt : void 0;
|
|
17405
17378
|
const closeEvent = this.lastCloseEvent;
|
|
@@ -17565,9 +17538,7 @@
|
|
|
17565
17538
|
});
|
|
17566
17539
|
}
|
|
17567
17540
|
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;
|
|
17541
|
+
const connectionTimeoutMs = this.options.timeouts.connection;
|
|
17571
17542
|
this.connectionTimeout = window.setTimeout(()=>{
|
|
17572
17543
|
this.failConnection({
|
|
17573
17544
|
url2Connect,
|
|
@@ -17594,7 +17565,6 @@
|
|
|
17594
17565
|
if (!this.connected && !isClosing && !this.unloaded) {
|
|
17595
17566
|
this.connected = true;
|
|
17596
17567
|
this.connecting = this.unloaded = false;
|
|
17597
|
-
this.connectionRetryStartedAt = void 0;
|
|
17598
17568
|
this.emit("CONNECTED");
|
|
17599
17569
|
cb?.();
|
|
17600
17570
|
}
|
|
@@ -17949,8 +17919,6 @@
|
|
|
17949
17919
|
this.reset();
|
|
17950
17920
|
this.clearUserMediaTimeout();
|
|
17951
17921
|
this.clearConnectionTimeout();
|
|
17952
|
-
this.clearConnectionRetryTimeout();
|
|
17953
|
-
this.connectionRetryStartedAt = void 0;
|
|
17954
17922
|
this.connecting = false;
|
|
17955
17923
|
if (this.userMedia) this.userMedia.unloadRemainingEventListeners();
|
|
17956
17924
|
if (this.submitting) ;
|