videomail-client 13.15.4 → 14.0.0

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/esm/index.js CHANGED
@@ -215,7 +215,10 @@ __webpack_require__.add({
215
215
  `,
216
216
  ""
217
217
  ]);
218
- __webpack_exports__.A = ___CSS_LOADER_EXPORT___;
218
+ const __rspack_default_export = ___CSS_LOADER_EXPORT___;
219
+ __webpack_require__.d(__webpack_exports__, {}, {
220
+ A: __rspack_default_export
221
+ });
219
222
  },
220
223
  7526 (__unused_rspack_module, exports) {
221
224
  exports.byteLength = byteLength;
@@ -3605,7 +3608,7 @@ const VideoType = {
3605
3608
  WebM: "webm",
3606
3609
  MP4: "mp4"
3607
3610
  };
3608
- var constants = {
3611
+ const constants = {
3609
3612
  WHITELIST_KEY_LABEL: "x-videomail-whitelist-key",
3610
3613
  VERSION_LABEL: "videomailClientVersion",
3611
3614
  public: {
@@ -3614,7 +3617,7 @@ var constants = {
3614
3617
  }
3615
3618
  };
3616
3619
  var package_namespaceObject = {
3617
- rE: "13.15.4"
3620
+ rE: "14.0.0"
3618
3621
  };
3619
3622
  function isAudioEnabled(options) {
3620
3623
  return Boolean(options.audio.enabled);
@@ -3644,13 +3647,13 @@ function pretty(anything) {
3644
3647
  }
3645
3648
  return inspect(anything);
3646
3649
  }
3647
- var util_pretty = pretty;
3650
+ const util_pretty = pretty;
3648
3651
  function canPlayType_canPlayType(video, type) {
3649
3652
  const canPlayType = video.canPlayType(`video/${type}`);
3650
3653
  if ("" === canPlayType) return false;
3651
3654
  return canPlayType;
3652
3655
  }
3653
- var media_canPlayType = canPlayType_canPlayType;
3656
+ const media_canPlayType = canPlayType_canPlayType;
3654
3657
  function _define_property(obj, key, value) {
3655
3658
  if (key in obj) Object.defineProperty(obj, key, {
3656
3659
  value: value,
@@ -3737,13 +3740,13 @@ class Browser {
3737
3740
  this.result = userAgentParser.getResult();
3738
3741
  }
3739
3742
  }
3740
- var util_Browser = Browser;
3743
+ const util_Browser = Browser;
3741
3744
  let getBrowser_browser;
3742
3745
  function getBrowser(localOptions) {
3743
3746
  if (!getBrowser_browser) getBrowser_browser = new util_Browser(localOptions);
3744
3747
  return getBrowser_browser;
3745
3748
  }
3746
- var util_getBrowser = getBrowser;
3749
+ const util_getBrowser = getBrowser;
3747
3750
  function HTTPVideomailError_define_property(obj, key, value) {
3748
3751
  if (key in obj) Object.defineProperty(obj, key, {
3749
3752
  value: value,
@@ -3759,7 +3762,7 @@ class HTTPVideomailError extends Error {
3759
3762
  super(...args), HTTPVideomailError_define_property(this, "name", "VideomailError"), HTTPVideomailError_define_property(this, "code", void 0), HTTPVideomailError_define_property(this, "status", void 0), HTTPVideomailError_define_property(this, "explanation", void 0);
3760
3763
  }
3761
3764
  }
3762
- var error_HTTPVideomailError = HTTPVideomailError;
3765
+ const error_HTTPVideomailError = HTTPVideomailError;
3763
3766
  function VideomailError_define_property(obj, key, value) {
3764
3767
  if (key in obj) Object.defineProperty(obj, key, {
3765
3768
  value: value,
@@ -3821,7 +3824,7 @@ VideomailError_define_property(VideomailError, "NOT_READABLE_ERROR", "NotReadabl
3821
3824
  VideomailError_define_property(VideomailError, "SECURITY_ERROR", "SecurityError");
3822
3825
  VideomailError_define_property(VideomailError, "TRACK_START_ERROR", "TrackStartError");
3823
3826
  VideomailError_define_property(VideomailError, "INVALID_STATE_ERROR", "InvalidStateError");
3824
- var error_VideomailError = VideomailError;
3827
+ const error_VideomailError = VideomailError;
3825
3828
  function createError(errorParams) {
3826
3829
  const { exc, options } = errorParams;
3827
3830
  let err = errorParams.err;
@@ -3954,7 +3957,7 @@ function createError(errorParams) {
3954
3957
  }
3955
3958
  return videomailError;
3956
3959
  }
3957
- var error_createError = createError;
3960
+ const error_createError = createError;
3958
3961
  function findOriginalExc(exc) {
3959
3962
  if (exc instanceof Error && "response" in exc) {
3960
3963
  const response = exc.response;
@@ -3975,7 +3978,7 @@ function findOriginalExc(exc) {
3975
3978
  }
3976
3979
  return exc;
3977
3980
  }
3978
- var error_findOriginalExc = findOriginalExc;
3981
+ const error_findOriginalExc = findOriginalExc;
3979
3982
  function Despot_define_property(obj, key, value) {
3980
3983
  if (key in obj) Object.defineProperty(obj, key, {
3981
3984
  value: value,
@@ -4031,26 +4034,26 @@ class Despot {
4031
4034
  }
4032
4035
  }
4033
4036
  Despot_define_property(Despot, "EMITTER", createNanoEvents());
4034
- var util_Despot = Despot;
4037
+ const util_Despot = Despot;
4035
4038
  function getValidity(element) {
4036
4039
  const validity = "validity" in element ? element.validity : void 0;
4037
4040
  return validity;
4038
4041
  }
4039
- var util_getValidity = getValidity;
4042
+ const util_getValidity = getValidity;
4040
4043
  function hideElement(element) {
4041
4044
  if (!element) return;
4042
4045
  element.style.setProperty("display", "none", "important");
4043
4046
  }
4044
- var html_hideElement = hideElement;
4047
+ const html_hideElement = hideElement;
4045
4048
  function isNotButton(element) {
4046
4049
  return "BUTTON" !== element.tagName && "submit" !== element.getAttribute("type");
4047
4050
  }
4048
- var html_isNotButton = isNotButton;
4051
+ const html_isNotButton = isNotButton;
4049
4052
  function showElement(element) {
4050
4053
  if (!element) return;
4051
4054
  element.style.removeProperty("display");
4052
4055
  }
4053
- var html_showElement = showElement;
4056
+ const html_showElement = showElement;
4054
4057
  const REGEX = /[ ,]+/u;
4055
4058
  function trimEmail(email) {
4056
4059
  return email.replace(REGEX, "");
@@ -4315,7 +4318,7 @@ class Form extends util_Despot {
4315
4318
  };
4316
4319
  }
4317
4320
  }
4318
- var wrappers_form = Form;
4321
+ const wrappers_form = Form;
4319
4322
  function resource_define_property(obj, key, value) {
4320
4323
  if (key in obj) Object.defineProperty(obj, key, {
4321
4324
  value: value,
@@ -4486,7 +4489,7 @@ class Resource {
4486
4489
  this.timezoneId = window.Intl.DateTimeFormat().resolvedOptions().timeZone;
4487
4490
  }
4488
4491
  }
4489
- var src_resource = Resource;
4492
+ const src_resource = Resource;
4490
4493
  const NodeEnvType = {
4491
4494
  DEVELOPMENT: "development",
4492
4495
  PRODUCTION: "production"
@@ -4496,18 +4499,18 @@ function getNodeEnv() {
4496
4499
  if (!process.env.NODE_ENV) return NodeEnvType.DEVELOPMENT;
4497
4500
  return process.env.NODE_ENV;
4498
4501
  }
4499
- var util_getNodeEnv = getNodeEnv;
4502
+ const util_getNodeEnv = getNodeEnv;
4500
4503
  function isProductionMode() {
4501
4504
  return util_getNodeEnv() === NodeEnvType.PRODUCTION;
4502
4505
  }
4503
- var util_isProductionMode = isProductionMode;
4506
+ const util_isProductionMode = isProductionMode;
4504
4507
  const PRODUCTION = util_isProductionMode();
4505
4508
  const options_options = {
4506
4509
  logger: console,
4507
4510
  logStackSize: 30,
4508
4511
  verbose: !PRODUCTION,
4509
4512
  apiUrl: "https://videomail.io/api",
4510
- socketUrl: "wss://videomail.io",
4513
+ socketUrl: "wss://videomail.io/ws",
4511
4514
  whitelistKey: "videomail-client-demo",
4512
4515
  enablePause: true,
4513
4516
  enableAutoPause: true,
@@ -4620,7 +4623,7 @@ const options_options = {
4620
4623
  videomailNinjaFormPlugin: void 0
4621
4624
  }
4622
4625
  };
4623
- var src_options = options_options;
4626
+ const src_options = options_options;
4624
4627
  function CollectLogger_define_property(obj, key, value) {
4625
4628
  if (key in obj) Object.defineProperty(obj, key, {
4626
4629
  value: value,
@@ -4670,12 +4673,12 @@ class CollectLogger {
4670
4673
  this.logger = options.logger;
4671
4674
  }
4672
4675
  }
4673
- var util_CollectLogger = CollectLogger;
4676
+ const util_CollectLogger = CollectLogger;
4674
4677
  var isTest_process = __webpack_require__(5606);
4675
4678
  function isTest() {
4676
4679
  return "test" === isTest_process.env.ENVIRON;
4677
4680
  }
4678
- var util_isTest = isTest;
4681
+ const util_isTest = isTest;
4679
4682
  function mergeWithDefaultOptions(options = {}) {
4680
4683
  const newOptions = deepmerge(src_options, options, {
4681
4684
  arrayMerge (_destination, source) {
@@ -4687,7 +4690,7 @@ function mergeWithDefaultOptions(options = {}) {
4687
4690
  if (util_isTest()) newOptions.verbose = false;
4688
4691
  return newOptions;
4689
4692
  }
4690
- var options_mergeWithDefaultOptions = mergeWithDefaultOptions;
4693
+ const options_mergeWithDefaultOptions = mergeWithDefaultOptions;
4691
4694
  const injectStylesIntoStyleTag = __webpack_require__("4860");
4692
4695
  var injectStylesIntoStyleTag_default = /*#__PURE__*/ __webpack_require__.n(injectStylesIntoStyleTag);
4693
4696
  const styleDomAPI = __webpack_require__("7045");
@@ -4722,7 +4725,7 @@ function limitHeight(height, options, calledFrom) {
4722
4725
  dimension.value = limitedHeight;
4723
4726
  return dimension;
4724
4727
  }
4725
- var dimensions_limitHeight = limitHeight;
4728
+ const dimensions_limitHeight = limitHeight;
4726
4729
  function getOuterWidth(element) {
4727
4730
  let rect = element.getBoundingClientRect();
4728
4731
  let outerWidth = rect.right - rect.left;
@@ -4732,7 +4735,7 @@ function getOuterWidth(element) {
4732
4735
  }
4733
4736
  return outerWidth;
4734
4737
  }
4735
- var dimensions_getOuterWidth = getOuterWidth;
4738
+ const dimensions_getOuterWidth = getOuterWidth;
4736
4739
  function limitWidth(element, options, width) {
4737
4740
  const limitedDimension = {
4738
4741
  unit: "px"
@@ -4747,7 +4750,7 @@ function limitWidth(element, options, width) {
4747
4750
  limitedDimension.value = limitedWidth;
4748
4751
  return limitedDimension;
4749
4752
  }
4750
- var dimensions_limitWidth = limitWidth;
4753
+ const dimensions_limitWidth = limitWidth;
4751
4754
  function useFullWidth(mobileBreakPoint) {
4752
4755
  if (void 0 === mobileBreakPoint) return;
4753
4756
  const viewportWidth = window.innerWidth;
@@ -4759,32 +4762,32 @@ function useFullWidth(mobileBreakPoint) {
4759
4762
  return dimension;
4760
4763
  }
4761
4764
  }
4762
- var dimensions_useFullWidth = useFullWidth;
4765
+ const dimensions_useFullWidth = useFullWidth;
4763
4766
  function disableElement(element) {
4764
4767
  if (!element) return;
4765
4768
  if ("INPUT" === element.tagName || "BUTTON" === element.tagName) element.setAttribute("disabled", "true");
4766
4769
  else element.classList.add("disabled");
4767
4770
  }
4768
- var html_disableElement = disableElement;
4771
+ const html_disableElement = disableElement;
4769
4772
  function adjustButton(buttonElement, show, type, disabled) {
4770
4773
  if (disabled) html_disableElement(buttonElement);
4771
4774
  if (type) buttonElement.type = type;
4772
4775
  if (!show) html_hideElement(buttonElement);
4773
4776
  return buttonElement;
4774
4777
  }
4775
- var html_adjustButton = adjustButton;
4778
+ const html_adjustButton = adjustButton;
4776
4779
  function enableElement(element) {
4777
4780
  if (!element) return;
4778
4781
  if ("INPUT" === element.tagName || "BUTTON" === element.tagName) element.removeAttribute("disabled");
4779
4782
  else element.classList.remove("disabled");
4780
4783
  }
4781
- var html_enableElement = enableElement;
4784
+ const html_enableElement = enableElement;
4782
4785
  function isShown(element) {
4783
4786
  if (!element) return false;
4784
4787
  const display = element.style.getPropertyValue("display");
4785
4788
  return !display.includes("none");
4786
4789
  }
4787
- var html_isShown = isShown;
4790
+ const html_isShown = isShown;
4788
4791
  function buttons_define_property(obj, key, value) {
4789
4792
  if (key in obj) Object.defineProperty(obj, key, {
4790
4793
  value: value,
@@ -5180,13 +5183,13 @@ class Buttons extends util_Despot {
5180
5183
  this.container = container;
5181
5184
  }
5182
5185
  }
5183
- var buttons = Buttons;
5186
+ const buttons = Buttons;
5184
5187
  function isHidden(element) {
5185
5188
  if (!element) return true;
5186
5189
  const display = element.style.getPropertyValue("display");
5187
5190
  return display.includes("none");
5188
5191
  }
5189
- var html_isHidden = isHidden;
5192
+ const html_isHidden = isHidden;
5190
5193
  function countdown_define_property(obj, key, value) {
5191
5194
  if (key in obj) Object.defineProperty(obj, key, {
5192
5195
  value: value,
@@ -5265,7 +5268,7 @@ class Countdown {
5265
5268
  this.options = options;
5266
5269
  }
5267
5270
  }
5268
- var countdown = Countdown;
5271
+ const countdown = Countdown;
5269
5272
  function facingMode_define_property(obj, key, value) {
5270
5273
  if (key in obj) Object.defineProperty(obj, key, {
5271
5274
  value: value,
@@ -5315,7 +5318,7 @@ class FacingMode extends util_Despot {
5315
5318
  this.visuals = visuals;
5316
5319
  }
5317
5320
  }
5318
- var facingMode = FacingMode;
5321
+ const facingMode = FacingMode;
5319
5322
  function pausedNote_define_property(obj, key, value) {
5320
5323
  if (key in obj) Object.defineProperty(obj, key, {
5321
5324
  value: value,
@@ -5373,7 +5376,7 @@ class PausedNote {
5373
5376
  this.options = options;
5374
5377
  }
5375
5378
  }
5376
- var pausedNote = PausedNote;
5379
+ const pausedNote = PausedNote;
5377
5380
  function recordNote_define_property(obj, key, value) {
5378
5381
  if (key in obj) Object.defineProperty(obj, key, {
5379
5382
  value: value,
@@ -5418,13 +5421,13 @@ class RecordNote {
5418
5421
  this.visuals = visuals;
5419
5422
  }
5420
5423
  }
5421
- var recorder_recordNote = RecordNote;
5424
+ const recorder_recordNote = RecordNote;
5422
5425
  function pad(n) {
5423
5426
  const absNum = Math.abs(n);
5424
5427
  if (absNum < 10) return n < 0 ? `-0${absNum}` : `0${absNum}`;
5425
5428
  return String(n);
5426
5429
  }
5427
- var util_pad = pad;
5430
+ const util_pad = pad;
5428
5431
  function recordTimer_define_property(obj, key, value) {
5429
5432
  if (key in obj) Object.defineProperty(obj, key, {
5430
5433
  value: value,
@@ -5552,7 +5555,7 @@ class RecordTimer {
5552
5555
  this.options = options;
5553
5556
  }
5554
5557
  }
5555
- var recordTimer = RecordTimer;
5558
+ const recordTimer = RecordTimer;
5556
5559
  function recorderInsides_define_property(obj, key, value) {
5557
5560
  if (key in obj) Object.defineProperty(obj, key, {
5558
5561
  value: value,
@@ -5659,7 +5662,7 @@ class RecorderInsides extends util_Despot {
5659
5662
  if (options.enablePause) this.pausedNote = new pausedNote(visuals, options);
5660
5663
  }
5661
5664
  }
5662
- var recorderInsides = RecorderInsides;
5665
+ const recorderInsides = RecorderInsides;
5663
5666
  function notifier_define_property(obj, key, value) {
5664
5667
  if (key in obj) Object.defineProperty(obj, key, {
5665
5668
  value: value,
@@ -5901,7 +5904,7 @@ class Notifier extends util_Despot {
5901
5904
  this.visuals = visuals;
5902
5905
  }
5903
5906
  }
5904
- var notifier = Notifier;
5907
+ const notifier = Notifier;
5905
5908
  function getEdgeCodes(value, amount, fromEnd) {
5906
5909
  const chars = fromEnd ? value.slice(-amount) : value.slice(0, amount);
5907
5910
  const codes = Array.from(chars, (char)=>String(char.codePointAt(0))).join(".");
@@ -5980,7 +5983,7 @@ function getWebSocketDiagnostic(url2Connect) {
5980
5983
  looksAutomated: automationSignals.looksAutomated
5981
5984
  };
5982
5985
  }
5983
- var error_getWebSocketDiagnostic = getWebSocketDiagnostic;
5986
+ const error_getWebSocketDiagnostic = getWebSocketDiagnostic;
5984
5987
  function figureMinHeight(height, options) {
5985
5988
  let minHeight;
5986
5989
  if (options.video.height) {
@@ -5992,7 +5995,7 @@ function figureMinHeight(height, options) {
5992
5995
  } else minHeight = height;
5993
5996
  return minHeight;
5994
5997
  }
5995
- var dimensions_figureMinHeight = figureMinHeight;
5998
+ const dimensions_figureMinHeight = figureMinHeight;
5996
5999
  function getRatio(options, videoHeight, videoWidth) {
5997
6000
  let ratio = 1;
5998
6001
  const hasVideoDimensions = videoHeight && videoWidth;
@@ -6003,7 +6006,7 @@ function getRatio(options, videoHeight, videoWidth) {
6003
6006
  else if (hasVideoDimensions) ratio = videoHeight / videoWidth;
6004
6007
  return ratio;
6005
6008
  }
6006
- var dimensions_getRatio = getRatio;
6009
+ const dimensions_getRatio = getRatio;
6007
6010
  function calculateHeight(responsive, videoWidth, options, ratio, element) {
6008
6011
  const dimension = {
6009
6012
  unit: "px"
@@ -6023,7 +6026,7 @@ function calculateHeight(responsive, videoWidth, options, ratio, element) {
6023
6026
  dimension.value = minHeight;
6024
6027
  return dimension;
6025
6028
  }
6026
- var dimensions_calculateHeight = calculateHeight;
6029
+ const dimensions_calculateHeight = calculateHeight;
6027
6030
  function calculateWidth(responsive, options, videoHeight, ratio) {
6028
6031
  const dimension = {
6029
6032
  unit: "px"
@@ -6046,7 +6049,7 @@ function calculateWidth(responsive, options, videoHeight, ratio) {
6046
6049
  dimension.value = calculatedWidth;
6047
6050
  return dimension;
6048
6051
  }
6049
- var dimensions_calculateWidth = calculateWidth;
6052
+ const dimensions_calculateWidth = calculateWidth;
6050
6053
  function AudioRecorder_define_property(obj, key, value) {
6051
6054
  if (key in obj) Object.defineProperty(obj, key, {
6052
6055
  value: value,
@@ -6141,14 +6144,14 @@ class AudioRecorder {
6141
6144
  this.userMedia = userMedia;
6142
6145
  }
6143
6146
  }
6144
- var media_AudioRecorder = AudioRecorder;
6147
+ const media_AudioRecorder = AudioRecorder;
6145
6148
  function getFirstVideoTrack(localMediaStream) {
6146
6149
  const videoTracks = localMediaStream.getVideoTracks();
6147
6150
  let videoTrack;
6148
6151
  if (videoTracks[0]) videoTrack = videoTracks[0];
6149
6152
  return videoTrack;
6150
6153
  }
6151
- var media_getFirstVideoTrack = getFirstVideoTrack;
6154
+ const media_getFirstVideoTrack = getFirstVideoTrack;
6152
6155
  const MEDIA_EVENTS = [
6153
6156
  "loadstart",
6154
6157
  "suspend",
@@ -6169,7 +6172,7 @@ const MEDIA_EVENTS = [
6169
6172
  "durationchange",
6170
6173
  "volumechange"
6171
6174
  ];
6172
- var mediaEvents = MEDIA_EVENTS;
6175
+ const mediaEvents = MEDIA_EVENTS;
6173
6176
  const VIRTUAL_KEYWORDS = [
6174
6177
  "obs",
6175
6178
  "virtual",
@@ -6183,7 +6186,7 @@ function isVirtualCamera(videoTrack) {
6183
6186
  if (!capabilities.frameRate) return true;
6184
6187
  return VIRTUAL_KEYWORDS.some((keyword)=>videoTrack.label.toLowerCase().includes(keyword));
6185
6188
  }
6186
- var util_isVirtualCamera = isVirtualCamera;
6189
+ const util_isVirtualCamera = isVirtualCamera;
6187
6190
  function userMedia_define_property(obj, key, value) {
6188
6191
  if (key in obj) Object.defineProperty(obj, key, {
6189
6192
  value: value,
@@ -6485,7 +6488,7 @@ class UserMedia extends util_Despot {
6485
6488
  });
6486
6489
  }
6487
6490
  }
6488
- var visuals_userMedia = UserMedia;
6491
+ const visuals_userMedia = UserMedia;
6489
6492
  var Buffer = __webpack_require__(8287).hp;
6490
6493
  function recorder_define_property(obj, key, value) {
6491
6494
  if (key in obj) Object.defineProperty(obj, key, {
@@ -7485,7 +7488,7 @@ class Recorder extends util_Despot {
7485
7488
  this.facingMode = options.video.facingMode;
7486
7489
  }
7487
7490
  }
7488
- var visuals_recorder = Recorder;
7491
+ const visuals_recorder = Recorder;
7489
7492
  function replay_define_property(obj, key, value) {
7490
7493
  if (key in obj) Object.defineProperty(obj, key, {
7491
7494
  value: value,
@@ -7735,7 +7738,7 @@ class Replay extends util_Despot {
7735
7738
  this.visuals = visuals;
7736
7739
  }
7737
7740
  }
7738
- var visuals_replay = Replay;
7741
+ const visuals_replay = Replay;
7739
7742
  function visuals_define_property(obj, key, value) {
7740
7743
  if (key in obj) Object.defineProperty(obj, key, {
7741
7744
  value: value,
@@ -8033,7 +8036,7 @@ class Visuals extends util_Despot {
8033
8036
  this.notifier = new notifier(this, options);
8034
8037
  }
8035
8038
  }
8036
- var wrappers_visuals = Visuals;
8039
+ const wrappers_visuals = Visuals;
8037
8040
  function container_define_property(obj, key, value) {
8038
8041
  if (key in obj) Object.defineProperty(obj, key, {
8039
8042
  value: value,
@@ -8533,7 +8536,7 @@ class Container extends util_Despot {
8533
8536
  this.resource = new src_resource(options);
8534
8537
  }
8535
8538
  }
8536
- var wrappers_container = Container;
8539
+ const wrappers_container = Container;
8537
8540
  function client_define_property(obj, key, value) {
8538
8541
  if (key in obj) Object.defineProperty(obj, key, {
8539
8542
  value: value,
@@ -38,5 +38,7 @@ export interface FullVideomailErrorData extends VideomailErrorData {
38
38
  screen: string;
39
39
  versions?: VideomailErrorVersions | undefined;
40
40
  clientIp?: string | null | undefined;
41
+ userAgent?: string | null | undefined;
42
+ isBot?: boolean | undefined;
41
43
  }
42
44
  export {};