videomail-client 15.7.3 → 15.7.5

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.
@@ -10932,7 +10932,7 @@ var __webpack_exports__ = {};
10932
10932
  var client = __webpack_require__(5734);
10933
10933
  var client_default = /*#__PURE__*/ __webpack_require__.n(client);
10934
10934
  var package_namespaceObject = {
10935
- rE: "15.7.3"
10935
+ rE: "15.7.5"
10936
10936
  };
10937
10937
  function isAudioEnabled(options) {
10938
10938
  return Boolean(options.audio.enabled);
@@ -10949,9 +10949,10 @@ var __webpack_exports__ = {};
10949
10949
  function inspect(element) {
10950
10950
  return util_default().inspect(element, {
10951
10951
  colors: false,
10952
- compact: true,
10952
+ compact: false,
10953
10953
  depth: 4,
10954
- breakLength: 1 / 0
10954
+ breakLength: 1 / 0,
10955
+ showHidden: true
10955
10956
  }).replace(/\s+/gu, " ").replace(/\r?\n/gu, "");
10956
10957
  }
10957
10958
  function pretty(anything) {
@@ -14362,7 +14363,7 @@ var __webpack_exports__ = {};
14362
14363
  }
14363
14364
  constructor(message, options, classList, errData){
14364
14365
  var _ref;
14365
- super(message, errData), VideomailError_define_property(this, "title", "Error from videomail-client npm package"), VideomailError_define_property(this, "location", window.location.href), VideomailError_define_property(this, "logLines", void 0), VideomailError_define_property(this, "whitelistKey", void 0), VideomailError_define_property(this, "cookie", void 0), VideomailError_define_property(this, "err", void 0), VideomailError_define_property(this, "promise", void 0), VideomailError_define_property(this, "reason", void 0), VideomailError_define_property(this, "browser", void 0), VideomailError_define_property(this, "cpu", void 0), VideomailError_define_property(this, "device", void 0), VideomailError_define_property(this, "engine", void 0), VideomailError_define_property(this, "os", void 0), VideomailError_define_property(this, "screen", void 0), VideomailError_define_property(this, "orientation", void 0), VideomailError_define_property(this, "classList", void 0);
14366
+ super(message, errData), VideomailError_define_property(this, "title", "Error from videomail-client npm package"), VideomailError_define_property(this, "location", window.location.href), VideomailError_define_property(this, "logLines", void 0), VideomailError_define_property(this, "whitelistKey", void 0), VideomailError_define_property(this, "cookie", void 0), VideomailError_define_property(this, "err", void 0), VideomailError_define_property(this, "promise", void 0), VideomailError_define_property(this, "reason", void 0), VideomailError_define_property(this, "browser", void 0), VideomailError_define_property(this, "cpu", void 0), VideomailError_define_property(this, "device", void 0), VideomailError_define_property(this, "engine", void 0), VideomailError_define_property(this, "os", void 0), VideomailError_define_property(this, "screen", void 0), VideomailError_define_property(this, "orientation", void 0), VideomailError_define_property(this, "versions", void 0), VideomailError_define_property(this, "classList", void 0);
14366
14367
  this.explanation = null == errData ? void 0 : errData.explanation;
14367
14368
  this.logLines = null == errData ? void 0 : errData.logLines;
14368
14369
  this.whitelistKey = options.whitelistKey;
@@ -14405,6 +14406,7 @@ var __webpack_exports__ = {};
14405
14406
  const error_VideomailError = VideomailError;
14406
14407
  function createError(errorParams) {
14407
14408
  var _errorParams_classList, _ref;
14409
+ var _options_versions;
14408
14410
  const { exc, options } = errorParams;
14409
14411
  let err = errorParams.err;
14410
14412
  if (!err && exc instanceof Error) err = exc;
@@ -14530,6 +14532,10 @@ var __webpack_exports__ = {};
14530
14532
  videomailError.constraint = err.constraint;
14531
14533
  videomailError.usedConstraints = err.usedConstraints;
14532
14534
  }
14535
+ videomailError.versions = {
14536
+ videomailClient: package_namespaceObject.rE,
14537
+ videomailNinjaFormPlugin: null == (_options_versions = options.versions) ? void 0 : _options_versions.videomailNinjaFormPlugin
14538
+ };
14533
14539
  if (options.reportErrors) {
14534
14540
  const resource = new src_resource(options);
14535
14541
  resource.reportError(videomailError).catch((reason)=>{
@@ -15174,7 +15180,6 @@ var __webpack_exports__ = {};
15174
15180
  }
15175
15181
  reportError(err) {
15176
15182
  return resource_async_to_generator(function*() {
15177
- var _this_options_versions;
15178
15183
  const queryParams = {
15179
15184
  [constants.WHITELIST_KEY_LABEL]: this.options.whitelistKey
15180
15185
  };
@@ -15202,11 +15207,7 @@ var __webpack_exports__ = {};
15202
15207
  stack: err.stack,
15203
15208
  supportedConstraints,
15204
15209
  enumerateDevices,
15205
- usedConstraints: err.usedConstraints,
15206
- versions: {
15207
- videomailClient: package_namespaceObject.rE,
15208
- videomailNinjaFormPlugin: null == (_this_options_versions = this.options.versions) ? void 0 : _this_options_versions.videomailNinjaFormPlugin
15209
- }
15210
+ usedConstraints: err.usedConstraints
15210
15211
  };
15211
15212
  yield client_default()(FormMethod.POST, url).query(queryParams).set("Timezone-Id", this.timezoneId).withCredentials().send(fullVideomailErrorData).timeout(this.options.timeouts.connection);
15212
15213
  }).call(this);
@@ -15423,7 +15424,7 @@ var __webpack_exports__ = {};
15423
15424
  class CollectLogger {
15424
15425
  lifo(level, parameters) {
15425
15426
  const line = parameters.join();
15426
- if (this.stack.length > this.options.logStackSize) this.stack.pop();
15427
+ if (this.stack.length >= this.options.logStackSize) this.stack.shift();
15427
15428
  this.stack.push(`[${level}] ${line}`);
15428
15429
  return line;
15429
15430
  }
@@ -16949,6 +16950,10 @@ var __webpack_exports__ = {};
16949
16950
  return dimension;
16950
16951
  }
16951
16952
  const dimensions_calculateWidth = calculateWidth;
16953
+ function isAutomatedUserAgent(userAgent = navigator.userAgent) {
16954
+ return /bot|crawler|spider|headlesschrome|phantomjs|puppeteer|playwright/iu.test(userAgent);
16955
+ }
16956
+ const util_isAutomatedUserAgent = isAutomatedUserAgent;
16952
16957
  function esm_define_property(obj, key, value) {
16953
16958
  if (key in obj) Object.defineProperty(obj, key, {
16954
16959
  value: value,
@@ -17554,7 +17559,7 @@ var __webpack_exports__ = {};
17554
17559
  if (online) if ("timeout" === cause) explanation = `The server at ${url2Connect} did not respond within ${this.options.timeouts.connection}ms, even though your device is online. This usually points to a firewall or proxy silently dropping the connection. Please try a different network. If the problem persists, contact us.`;
17555
17560
  else {
17556
17561
  const closeSuffix = closeEvent ? ` (close code ${closeEvent.code})` : "";
17557
- explanation = `The connection to ${url2Connect} was refused or could not be reached${closeSuffix}. Please check your internet connection and try again. If the problem persists, contact us.\n\nDebug info: ${debugLine}`;
17562
+ explanation = `The connection to ${url2Connect} was refused or could not be reached${closeSuffix}. Please check your internet connection and try again. If the problem persists, contact us.`;
17558
17563
  }
17559
17564
  else explanation = "Your device appears to be offline. Please check your internet connection and try again.";
17560
17565
  if (this.stream) {
@@ -17641,6 +17646,11 @@ var __webpack_exports__ = {};
17641
17646
  }
17642
17647
  initSocket(cb) {
17643
17648
  if (!this.connected) {
17649
+ if (util_isAutomatedUserAgent()) {
17650
+ this.connecting = false;
17651
+ this.options.logger.debug("Recorder: skipping web socket connection for an automated crawler");
17652
+ return;
17653
+ }
17644
17654
  this.connecting = true;
17645
17655
  this.connectionFailed = false;
17646
17656
  this.connectingStartedAt = Date.now();
@@ -17718,10 +17728,12 @@ var __webpack_exports__ = {};
17718
17728
  const neverConnected = this.connecting && !this.connected;
17719
17729
  this.clearConnectionTimeout();
17720
17730
  this.connecting = this.connected = false;
17721
- if (neverConnected) this.failConnection({
17722
- url2Connect,
17723
- cause: "closed"
17724
- });
17731
+ if (neverConnected) window.setTimeout(()=>{
17732
+ this.failConnection({
17733
+ url2Connect,
17734
+ cause: "closed"
17735
+ });
17736
+ }, 0);
17725
17737
  else if (this.userMediaLoaded) this.initSocket();
17726
17738
  });
17727
17739
  this.stream.on("connect", ()=>{
package/dist/esm/index.js CHANGED
@@ -3620,7 +3620,7 @@ const constants = {
3620
3620
  }
3621
3621
  };
3622
3622
  var package_namespaceObject = {
3623
- rE: "15.7.3"
3623
+ rE: "15.7.5"
3624
3624
  };
3625
3625
  function isAudioEnabled(options) {
3626
3626
  return Boolean(options.audio.enabled);
@@ -3637,9 +3637,10 @@ var util_default = /*#__PURE__*/ __webpack_require__.n(util);
3637
3637
  function inspect(element) {
3638
3638
  return util_default().inspect(element, {
3639
3639
  colors: false,
3640
- compact: true,
3640
+ compact: false,
3641
3641
  depth: 4,
3642
- breakLength: 1 / 0
3642
+ breakLength: 1 / 0,
3643
+ showHidden: true
3643
3644
  }).replace(/\s+/gu, " ").replace(/\r?\n/gu, "");
3644
3645
  }
3645
3646
  function pretty(anything) {
@@ -3787,7 +3788,7 @@ class VideomailError extends error_HTTPVideomailError {
3787
3788
  return this.classList;
3788
3789
  }
3789
3790
  constructor(message, options, classList, errData){
3790
- super(message, errData), VideomailError_define_property(this, "title", "Error from videomail-client npm package"), VideomailError_define_property(this, "location", window.location.href), VideomailError_define_property(this, "logLines", void 0), VideomailError_define_property(this, "whitelistKey", void 0), VideomailError_define_property(this, "cookie", void 0), VideomailError_define_property(this, "err", void 0), VideomailError_define_property(this, "promise", void 0), VideomailError_define_property(this, "reason", void 0), VideomailError_define_property(this, "browser", void 0), VideomailError_define_property(this, "cpu", void 0), VideomailError_define_property(this, "device", void 0), VideomailError_define_property(this, "engine", void 0), VideomailError_define_property(this, "os", void 0), VideomailError_define_property(this, "screen", void 0), VideomailError_define_property(this, "orientation", void 0), VideomailError_define_property(this, "classList", void 0);
3791
+ super(message, errData), VideomailError_define_property(this, "title", "Error from videomail-client npm package"), VideomailError_define_property(this, "location", window.location.href), VideomailError_define_property(this, "logLines", void 0), VideomailError_define_property(this, "whitelistKey", void 0), VideomailError_define_property(this, "cookie", void 0), VideomailError_define_property(this, "err", void 0), VideomailError_define_property(this, "promise", void 0), VideomailError_define_property(this, "reason", void 0), VideomailError_define_property(this, "browser", void 0), VideomailError_define_property(this, "cpu", void 0), VideomailError_define_property(this, "device", void 0), VideomailError_define_property(this, "engine", void 0), VideomailError_define_property(this, "os", void 0), VideomailError_define_property(this, "screen", void 0), VideomailError_define_property(this, "orientation", void 0), VideomailError_define_property(this, "versions", void 0), VideomailError_define_property(this, "classList", void 0);
3791
3792
  this.explanation = errData?.explanation;
3792
3793
  this.logLines = errData?.logLines;
3793
3794
  this.whitelistKey = options.whitelistKey;
@@ -3954,6 +3955,10 @@ function createError(errorParams) {
3954
3955
  videomailError.constraint = err.constraint;
3955
3956
  videomailError.usedConstraints = err.usedConstraints;
3956
3957
  }
3958
+ videomailError.versions = {
3959
+ videomailClient: package_namespaceObject.rE,
3960
+ videomailNinjaFormPlugin: options.versions?.videomailNinjaFormPlugin
3961
+ };
3957
3962
  if (options.reportErrors) {
3958
3963
  const resource = new src_resource(options);
3959
3964
  resource.reportError(videomailError).catch((reason)=>{
@@ -4431,11 +4436,7 @@ class Resource {
4431
4436
  stack: err.stack,
4432
4437
  supportedConstraints,
4433
4438
  enumerateDevices,
4434
- usedConstraints: err.usedConstraints,
4435
- versions: {
4436
- videomailClient: package_namespaceObject.rE,
4437
- videomailNinjaFormPlugin: this.options.versions?.videomailNinjaFormPlugin
4438
- }
4439
+ usedConstraints: err.usedConstraints
4439
4440
  };
4440
4441
  await superagent(FormMethod.POST, url).query(queryParams).set("Timezone-Id", this.timezoneId).withCredentials().send(fullVideomailErrorData).timeout(this.options.timeouts.connection);
4441
4442
  }
@@ -4643,7 +4644,7 @@ function CollectLogger_define_property(obj, key, value) {
4643
4644
  class CollectLogger {
4644
4645
  lifo(level, parameters) {
4645
4646
  const line = parameters.join();
4646
- if (this.stack.length > this.options.logStackSize) this.stack.pop();
4647
+ if (this.stack.length >= this.options.logStackSize) this.stack.shift();
4647
4648
  this.stack.push(`[${level}] ${line}`);
4648
4649
  return line;
4649
4650
  }
@@ -6056,6 +6057,10 @@ function calculateWidth(responsive, options, videoHeight, ratio) {
6056
6057
  return dimension;
6057
6058
  }
6058
6059
  const dimensions_calculateWidth = calculateWidth;
6060
+ function isAutomatedUserAgent(userAgent = navigator.userAgent) {
6061
+ return /bot|crawler|spider|headlesschrome|phantomjs|puppeteer|playwright/iu.test(userAgent);
6062
+ }
6063
+ const util_isAutomatedUserAgent = isAutomatedUserAgent;
6059
6064
  function AudioRecorder_define_property(obj, key, value) {
6060
6065
  if (key in obj) Object.defineProperty(obj, key, {
6061
6066
  value: value,
@@ -6616,7 +6621,7 @@ class Recorder extends util_Despot {
6616
6621
  if (online) if ("timeout" === cause) explanation = `The server at ${url2Connect} did not respond within ${this.options.timeouts.connection}ms, even though your device is online. This usually points to a firewall or proxy silently dropping the connection. Please try a different network. If the problem persists, contact us.`;
6617
6622
  else {
6618
6623
  const closeSuffix = closeEvent ? ` (close code ${closeEvent.code})` : "";
6619
- explanation = `The connection to ${url2Connect} was refused or could not be reached${closeSuffix}. Please check your internet connection and try again. If the problem persists, contact us.\n\nDebug info: ${debugLine}`;
6624
+ explanation = `The connection to ${url2Connect} was refused or could not be reached${closeSuffix}. Please check your internet connection and try again. If the problem persists, contact us.`;
6620
6625
  }
6621
6626
  else explanation = "Your device appears to be offline. Please check your internet connection and try again.";
6622
6627
  if (this.stream) {
@@ -6702,6 +6707,11 @@ class Recorder extends util_Despot {
6702
6707
  }
6703
6708
  initSocket(cb) {
6704
6709
  if (!this.connected) {
6710
+ if (util_isAutomatedUserAgent()) {
6711
+ this.connecting = false;
6712
+ this.options.logger.debug("Recorder: skipping web socket connection for an automated crawler");
6713
+ return;
6714
+ }
6705
6715
  this.connecting = true;
6706
6716
  this.connectionFailed = false;
6707
6717
  this.connectingStartedAt = Date.now();
@@ -6779,10 +6789,12 @@ class Recorder extends util_Despot {
6779
6789
  const neverConnected = this.connecting && !this.connected;
6780
6790
  this.clearConnectionTimeout();
6781
6791
  this.connecting = this.connected = false;
6782
- if (neverConnected) this.failConnection({
6783
- url2Connect,
6784
- cause: "closed"
6785
- });
6792
+ if (neverConnected) window.setTimeout(()=>{
6793
+ this.failConnection({
6794
+ url2Connect,
6795
+ cause: "closed"
6796
+ });
6797
+ }, 0);
6786
6798
  else if (this.userMediaLoaded) this.initSocket();
6787
6799
  });
6788
6800
  this.stream.on("connect", ()=>{
@@ -1,5 +1,11 @@
1
1
  import { ErrorObject } from "serialize-error";
2
2
  import type { IBrowser, ICPU, IDevice, IEngine, IOS } from "ua-parser-js";
3
+ export interface VideomailErrorVersions {
4
+ videomailNinjaFormPlugin?: string | undefined;
5
+ videomailClient: string;
6
+ videomailUI?: string | undefined;
7
+ videomailServer?: string | undefined;
8
+ }
3
9
  export interface VideomailErrorData {
4
10
  cause?: any;
5
11
  promise?: any;
@@ -15,17 +21,12 @@ export interface VideomailErrorData {
15
21
  status?: number | undefined;
16
22
  stack?: string | undefined;
17
23
  type?: string | undefined;
24
+ versions?: VideomailErrorVersions | undefined;
18
25
  blockedURI?: string | undefined;
19
26
  effectiveDirective?: string | undefined;
20
27
  violatedDirective?: string | undefined;
21
28
  originalPolicy?: string | undefined;
22
29
  }
23
- interface VideomailErrorVersions {
24
- videomailNinjaFormPlugin?: string | undefined;
25
- videomailClient: string;
26
- videomailUI?: string | undefined;
27
- videomailServer?: string | undefined;
28
- }
29
30
  export interface FullVideomailErrorData extends VideomailErrorData {
30
31
  browser: IBrowser;
31
32
  cookie?: string[] | undefined;
@@ -36,7 +37,6 @@ export interface FullVideomailErrorData extends VideomailErrorData {
36
37
  orientation?: string | undefined;
37
38
  os?: IOS | undefined;
38
39
  screen: string;
39
- versions?: VideomailErrorVersions | undefined;
40
40
  clientIp?: string | null | undefined;
41
41
  userAgent?: string | null | undefined;
42
42
  isBot?: boolean | undefined;
@@ -44,4 +44,3 @@ export interface FullVideomailErrorData extends VideomailErrorData {
44
44
  enumerateDevices?: MediaDeviceInfo[] | undefined;
45
45
  usedConstraints?: MediaStreamConstraints | undefined;
46
46
  }
47
- export {};
@@ -1,4 +1,5 @@
1
1
  import { IBrowser, ICPU, IDevice, IEngine, IOS } from "ua-parser-js";
2
+ import { VideomailErrorVersions } from "../../types/error.js";
2
3
  import { VideomailClientOptions } from "../../types/options.js";
3
4
  import HTTPVideomailError from "./HTTPVideomailError.js";
4
5
  export interface ErrData extends ErrorOptions {
@@ -22,6 +23,7 @@ declare class VideomailError extends HTTPVideomailError {
22
23
  os?: IOS | undefined;
23
24
  screen: string;
24
25
  orientation?: string | undefined;
26
+ versions?: VideomailErrorVersions | undefined;
25
27
  private readonly classList?;
26
28
  static readonly PERMISSION_DENIED = "PERMISSION_DENIED";
27
29
  static readonly NOT_ALLOWED_ERROR = "NotAllowedError";
@@ -0,0 +1,2 @@
1
+ declare function isAutomatedUserAgent(userAgent?: string): boolean;
2
+ export default isAutomatedUserAgent;
package/dist/umd/index.js CHANGED
@@ -10938,7 +10938,7 @@
10938
10938
  var client = __webpack_require__(5734);
10939
10939
  var client_default = /*#__PURE__*/ __webpack_require__.n(client);
10940
10940
  var package_namespaceObject = {
10941
- rE: "15.7.3"
10941
+ rE: "15.7.5"
10942
10942
  };
10943
10943
  function isAudioEnabled(options) {
10944
10944
  return Boolean(options.audio.enabled);
@@ -10955,9 +10955,10 @@
10955
10955
  function inspect(element) {
10956
10956
  return util_default().inspect(element, {
10957
10957
  colors: false,
10958
- compact: true,
10958
+ compact: false,
10959
10959
  depth: 4,
10960
- breakLength: 1 / 0
10960
+ breakLength: 1 / 0,
10961
+ showHidden: true
10961
10962
  }).replace(/\s+/gu, " ").replace(/\r?\n/gu, "");
10962
10963
  }
10963
10964
  function pretty(anything) {
@@ -14344,6 +14345,7 @@
14344
14345
  os;
14345
14346
  screen;
14346
14347
  orientation;
14348
+ versions;
14347
14349
  classList;
14348
14350
  static PERMISSION_DENIED = "PERMISSION_DENIED";
14349
14351
  static NOT_ALLOWED_ERROR = "NotAllowedError";
@@ -14522,6 +14524,10 @@
14522
14524
  videomailError.constraint = err.constraint;
14523
14525
  videomailError.usedConstraints = err.usedConstraints;
14524
14526
  }
14527
+ videomailError.versions = {
14528
+ videomailClient: package_namespaceObject.rE,
14529
+ videomailNinjaFormPlugin: options.versions?.videomailNinjaFormPlugin
14530
+ };
14525
14531
  if (options.reportErrors) {
14526
14532
  const resource = new src_resource(options);
14527
14533
  resource.reportError(videomailError).catch((reason)=>{
@@ -15092,11 +15098,7 @@
15092
15098
  stack: err.stack,
15093
15099
  supportedConstraints,
15094
15100
  enumerateDevices,
15095
- usedConstraints: err.usedConstraints,
15096
- versions: {
15097
- videomailClient: package_namespaceObject.rE,
15098
- videomailNinjaFormPlugin: this.options.versions?.videomailNinjaFormPlugin
15099
- }
15101
+ usedConstraints: err.usedConstraints
15100
15102
  };
15101
15103
  await client_default()(FormMethod.POST, url).query(queryParams).set("Timezone-Id", this.timezoneId).withCredentials().send(fullVideomailErrorData).timeout(this.options.timeouts.connection);
15102
15104
  }
@@ -15297,7 +15299,7 @@
15297
15299
  }
15298
15300
  lifo(level, parameters) {
15299
15301
  const line = parameters.join();
15300
- if (this.stack.length > this.options.logStackSize) this.stack.pop();
15302
+ if (this.stack.length >= this.options.logStackSize) this.stack.shift();
15301
15303
  this.stack.push(`[${level}] ${line}`);
15302
15304
  return line;
15303
15305
  }
@@ -16714,6 +16716,10 @@
16714
16716
  return dimension;
16715
16717
  }
16716
16718
  const dimensions_calculateWidth = calculateWidth;
16719
+ function isAutomatedUserAgent(userAgent = navigator.userAgent) {
16720
+ return /bot|crawler|spider|headlesschrome|phantomjs|puppeteer|playwright/iu.test(userAgent);
16721
+ }
16722
+ const util_isAutomatedUserAgent = isAutomatedUserAgent;
16717
16723
  function _define_property(obj, key, value) {
16718
16724
  if (key in obj) Object.defineProperty(obj, key, {
16719
16725
  value: value,
@@ -17325,7 +17331,7 @@
17325
17331
  if (online) if ("timeout" === cause) explanation = `The server at ${url2Connect} did not respond within ${this.options.timeouts.connection}ms, even though your device is online. This usually points to a firewall or proxy silently dropping the connection. Please try a different network. If the problem persists, contact us.`;
17326
17332
  else {
17327
17333
  const closeSuffix = closeEvent ? ` (close code ${closeEvent.code})` : "";
17328
- explanation = `The connection to ${url2Connect} was refused or could not be reached${closeSuffix}. Please check your internet connection and try again. If the problem persists, contact us.\n\nDebug info: ${debugLine}`;
17334
+ explanation = `The connection to ${url2Connect} was refused or could not be reached${closeSuffix}. Please check your internet connection and try again. If the problem persists, contact us.`;
17329
17335
  }
17330
17336
  else explanation = "Your device appears to be offline. Please check your internet connection and try again.";
17331
17337
  if (this.stream) {
@@ -17411,6 +17417,11 @@
17411
17417
  }
17412
17418
  initSocket(cb) {
17413
17419
  if (!this.connected) {
17420
+ if (util_isAutomatedUserAgent()) {
17421
+ this.connecting = false;
17422
+ this.options.logger.debug("Recorder: skipping web socket connection for an automated crawler");
17423
+ return;
17424
+ }
17414
17425
  this.connecting = true;
17415
17426
  this.connectionFailed = false;
17416
17427
  this.connectingStartedAt = Date.now();
@@ -17488,10 +17499,12 @@
17488
17499
  const neverConnected = this.connecting && !this.connected;
17489
17500
  this.clearConnectionTimeout();
17490
17501
  this.connecting = this.connected = false;
17491
- if (neverConnected) this.failConnection({
17492
- url2Connect,
17493
- cause: "closed"
17494
- });
17502
+ if (neverConnected) window.setTimeout(()=>{
17503
+ this.failConnection({
17504
+ url2Connect,
17505
+ cause: "closed"
17506
+ });
17507
+ }, 0);
17495
17508
  else if (this.userMediaLoaded) this.initSocket();
17496
17509
  });
17497
17510
  this.stream.on("connect", ()=>{
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "videomail-client",
3
- "version": "15.7.3",
3
+ "version": "15.7.5",
4
4
  "description": "A wicked npm package to record videos directly in the browser, for Deaf and Sign Language!",
5
5
  "keywords": [
6
6
  "webcam",
@@ -113,7 +113,7 @@
113
113
  "prettier-plugin-jsdoc": "1.8.1",
114
114
  "prettier-plugin-packagejson": "3.0.2",
115
115
  "prettier-plugin-sh": "0.19.0",
116
- "release-it": "21.0.2",
116
+ "release-it": "21.0.3",
117
117
  "storybook": "10.6.0",
118
118
  "storybook-html-rsbuild": "3.4.2",
119
119
  "type-fest": "5.9.0",