videomail-client 14.0.0 → 14.1.1

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.
@@ -10876,7 +10876,7 @@ var __webpack_exports__ = {};
10876
10876
  var client = __webpack_require__(5734);
10877
10877
  var client_default = /*#__PURE__*/ __webpack_require__.n(client);
10878
10878
  var package_namespaceObject = {
10879
- rE: "14.0.0"
10879
+ rE: "14.1.1"
10880
10880
  };
10881
10881
  function isAudioEnabled(options) {
10882
10882
  return Boolean(options.audio.enabled);
@@ -16692,7 +16692,7 @@ var __webpack_exports__ = {};
16692
16692
  "png"
16693
16693
  ];
16694
16694
  let canvas_to_buffer_modern_s;
16695
- class canvas_to_buffer_modern_r {
16695
+ class r {
16696
16696
  constructor(t, e = canvas_to_buffer_modern_i, s = .5){
16697
16697
  if (this.quality = void 0, this.types = void 0, this.canvas = void 0, e.length > 2) throw new Error("Too many image types are specified!");
16698
16698
  this.canvas = t, this.quality = s, this.types = e;
@@ -16724,7 +16724,7 @@ var __webpack_exports__ = {};
16724
16724
  const s = i.split(",")[1];
16725
16725
  let o;
16726
16726
  if (!s) throw new Error("Empty uri string given!");
16727
- if (o = canvas_to_buffer_modern_e ? window.atob(s) : null == canvas_to_buffer_modern_r.atob ? void 0 : canvas_to_buffer_modern_r.atob(s), !o) throw new Error("Byte are empty, something within atob went wrong.");
16727
+ if (o = canvas_to_buffer_modern_e ? window.atob(s) : null == r.atob ? void 0 : r.atob(s), !o) throw new Error("Byte are empty, something within atob went wrong.");
16728
16728
  const n = new Uint8Array(o.length);
16729
16729
  for(let t = 0, e = o.length; t < e; t++)n[t] = o.charCodeAt(t);
16730
16730
  return typedarray_to_buffer(n);
@@ -16742,7 +16742,7 @@ var __webpack_exports__ = {};
16742
16742
  return canvas_to_buffer_modern_s && canvas_to_buffer_modern_e || (canvas_to_buffer_modern_s = this.figureMimeType()), canvas_to_buffer_modern_s;
16743
16743
  }
16744
16744
  }
16745
- canvas_to_buffer_modern_r.atob = void 0;
16745
+ r.atob = void 0;
16746
16746
  var websocket_stream_stream = __webpack_require__(9967);
16747
16747
  var stream_default = /*#__PURE__*/ __webpack_require__.n(websocket_stream_stream);
16748
16748
  function getEdgeCodes(value, amount, fromEnd) {
@@ -16890,17 +16890,32 @@ var __webpack_exports__ = {};
16890
16890
  return dimension;
16891
16891
  }
16892
16892
  const dimensions_calculateWidth = calculateWidth;
16893
- class audio_sample_modern_t {
16894
- constructor(r){
16895
- this.float32Array = void 0, this.float32Array = r;
16896
- }
16893
+ function esm_define_property(obj, key, value) {
16894
+ if (key in obj) Object.defineProperty(obj, key, {
16895
+ value: value,
16896
+ enumerable: true,
16897
+ configurable: true,
16898
+ writable: true
16899
+ });
16900
+ else obj[key] = value;
16901
+ return obj;
16902
+ }
16903
+ class AudioSample {
16897
16904
  toBuffer() {
16898
- const t = new Int16Array(this.float32Array.length);
16899
- return this.float32Array.forEach((r, a)=>{
16900
- t[a] = 32767 * Math.min(1, r);
16901
- }), typedarray_to_buffer(t);
16905
+ const l = this.float32Array.length;
16906
+ const arr = new Int16Array(l);
16907
+ this.float32Array.forEach((sample, i)=>{
16908
+ arr[i] = 0x7fff * Math.min(1, sample);
16909
+ });
16910
+ return typedarray_to_buffer(arr);
16911
+ }
16912
+ constructor(float32Array){
16913
+ esm_define_property(this, "float32Array", void 0);
16914
+ this.float32Array = float32Array;
16902
16915
  }
16903
16916
  }
16917
+ const esm_src = AudioSample;
16918
+ const esm = esm_src;
16904
16919
  var is_power_of_two = __webpack_require__(8646);
16905
16920
  var is_power_of_two_default = /*#__PURE__*/ __webpack_require__.n(is_power_of_two);
16906
16921
  function AudioRecorder_define_property(obj, key, value) {
@@ -16931,7 +16946,7 @@ var __webpack_exports__ = {};
16931
16946
  onAudioProcess(e, cb) {
16932
16947
  if (!this.userMedia.isRecording() || this.userMedia.isPaused()) return;
16933
16948
  const float32Array = e.inputBuffer.getChannelData(0);
16934
- cb(new audio_sample_modern_t(float32Array));
16949
+ cb(new esm(float32Array));
16935
16950
  }
16936
16951
  init(localMediaStream) {
16937
16952
  this.options.logger.debug("AudioRecorder: init()");
@@ -17608,10 +17623,10 @@ var __webpack_exports__ = {};
17608
17623
  const command = JSON.parse(data.toString());
17609
17624
  this.executeCommand(command);
17610
17625
  } catch (exc) {
17611
- this.options.logger.debug(`Failed to parse command: ${exc}`);
17626
+ this.options.logger.error(`Failed to parse command: ${exc}`);
17612
17627
  const err = error_createError({
17613
17628
  message: "Invalid server command",
17614
- explanation: `Contact us asap. Bad command was ${data.toString()}. `,
17629
+ explanation: `Contact us. The invalid command was: ${data.toString()}.`,
17615
17630
  options: this.options,
17616
17631
  exc
17617
17632
  });
@@ -18116,7 +18131,7 @@ var __webpack_exports__ = {};
18116
18131
  });
18117
18132
  return;
18118
18133
  }
18119
- this.frame = new canvas_to_buffer_modern_r(this.canvas, this.options.image.types, this.options.image.quality);
18134
+ this.frame = new r(this.canvas, this.options.image.types, this.options.image.quality);
18120
18135
  this.options.logger.debug("Recorder: record()");
18121
18136
  this.userMedia.record();
18122
18137
  this.emit("RECORDING", {
package/dist/esm/index.js CHANGED
@@ -3617,7 +3617,7 @@ const constants = {
3617
3617
  }
3618
3618
  };
3619
3619
  var package_namespaceObject = {
3620
- rE: "14.0.0"
3620
+ rE: "14.1.1"
3621
3621
  };
3622
3622
  function isAudioEnabled(options) {
3623
3623
  return Boolean(options.audio.enabled);
@@ -6737,10 +6737,10 @@ class Recorder extends util_Despot {
6737
6737
  const command = JSON.parse(data.toString());
6738
6738
  this.executeCommand(command);
6739
6739
  } catch (exc) {
6740
- this.options.logger.debug(`Failed to parse command: ${exc}`);
6740
+ this.options.logger.error(`Failed to parse command: ${exc}`);
6741
6741
  const err = error_createError({
6742
6742
  message: "Invalid server command",
6743
- explanation: `Contact us asap. Bad command was ${data.toString()}. `,
6743
+ explanation: `Contact us. The invalid command was: ${data.toString()}.`,
6744
6744
  options: this.options,
6745
6745
  exc
6746
6746
  });
@@ -1,6 +1,5 @@
1
- export interface WebSocketDiagnosticResult {
1
+ declare function getWebSocketDiagnostic(url2Connect: string): {
2
2
  text: string;
3
3
  looksAutomated: boolean;
4
- }
5
- declare function getWebSocketDiagnostic(url2Connect: string): WebSocketDiagnosticResult;
4
+ };
6
5
  export default getWebSocketDiagnostic;
package/dist/umd/index.js CHANGED
@@ -10882,7 +10882,7 @@
10882
10882
  var client = __webpack_require__(5734);
10883
10883
  var client_default = /*#__PURE__*/ __webpack_require__.n(client);
10884
10884
  var package_namespaceObject = {
10885
- rE: "14.0.0"
10885
+ rE: "14.1.1"
10886
10886
  };
10887
10887
  function isAudioEnabled(options) {
10888
10888
  return Boolean(options.audio.enabled);
@@ -16455,7 +16455,7 @@
16455
16455
  "png"
16456
16456
  ];
16457
16457
  let canvas_to_buffer_modern_s;
16458
- class canvas_to_buffer_modern_r {
16458
+ class r {
16459
16459
  constructor(t, e = canvas_to_buffer_modern_i, s = .5){
16460
16460
  if (this.quality = void 0, this.types = void 0, this.canvas = void 0, e.length > 2) throw new Error("Too many image types are specified!");
16461
16461
  this.canvas = t, this.quality = s, this.types = e;
@@ -16487,7 +16487,7 @@
16487
16487
  const s = i.split(",")[1];
16488
16488
  let o;
16489
16489
  if (!s) throw new Error("Empty uri string given!");
16490
- if (o = canvas_to_buffer_modern_e ? window.atob(s) : null == canvas_to_buffer_modern_r.atob ? void 0 : canvas_to_buffer_modern_r.atob(s), !o) throw new Error("Byte are empty, something within atob went wrong.");
16490
+ if (o = canvas_to_buffer_modern_e ? window.atob(s) : null == r.atob ? void 0 : r.atob(s), !o) throw new Error("Byte are empty, something within atob went wrong.");
16491
16491
  const n = new Uint8Array(o.length);
16492
16492
  for(let t = 0, e = o.length; t < e; t++)n[t] = o.charCodeAt(t);
16493
16493
  return typedarray_to_buffer(n);
@@ -16505,7 +16505,7 @@
16505
16505
  return canvas_to_buffer_modern_s && canvas_to_buffer_modern_e || (canvas_to_buffer_modern_s = this.figureMimeType()), canvas_to_buffer_modern_s;
16506
16506
  }
16507
16507
  }
16508
- canvas_to_buffer_modern_r.atob = void 0;
16508
+ r.atob = void 0;
16509
16509
  var websocket_stream_stream = __webpack_require__(9967);
16510
16510
  var stream_default = /*#__PURE__*/ __webpack_require__.n(websocket_stream_stream);
16511
16511
  function getEdgeCodes(value, amount, fromEnd) {
@@ -16653,17 +16653,32 @@
16653
16653
  return dimension;
16654
16654
  }
16655
16655
  const dimensions_calculateWidth = calculateWidth;
16656
- class audio_sample_modern_t {
16657
- constructor(r){
16658
- this.float32Array = void 0, this.float32Array = r;
16659
- }
16656
+ function _define_property(obj, key, value) {
16657
+ if (key in obj) Object.defineProperty(obj, key, {
16658
+ value: value,
16659
+ enumerable: true,
16660
+ configurable: true,
16661
+ writable: true
16662
+ });
16663
+ else obj[key] = value;
16664
+ return obj;
16665
+ }
16666
+ class AudioSample {
16660
16667
  toBuffer() {
16661
- const t = new Int16Array(this.float32Array.length);
16662
- return this.float32Array.forEach((r, a)=>{
16663
- t[a] = 32767 * Math.min(1, r);
16664
- }), typedarray_to_buffer(t);
16668
+ const l = this.float32Array.length;
16669
+ const arr = new Int16Array(l);
16670
+ this.float32Array.forEach((sample, i)=>{
16671
+ arr[i] = 0x7fff * Math.min(1, sample);
16672
+ });
16673
+ return typedarray_to_buffer(arr);
16674
+ }
16675
+ constructor(float32Array){
16676
+ _define_property(this, "float32Array", void 0);
16677
+ this.float32Array = float32Array;
16665
16678
  }
16666
16679
  }
16680
+ const esm_src = AudioSample;
16681
+ const esm = esm_src;
16667
16682
  var is_power_of_two = __webpack_require__(8646);
16668
16683
  var is_power_of_two_default = /*#__PURE__*/ __webpack_require__.n(is_power_of_two);
16669
16684
  const CHANNELS = 1;
@@ -16693,7 +16708,7 @@
16693
16708
  onAudioProcess(e, cb) {
16694
16709
  if (!this.userMedia.isRecording() || this.userMedia.isPaused()) return;
16695
16710
  const float32Array = e.inputBuffer.getChannelData(0);
16696
- cb(new audio_sample_modern_t(float32Array));
16711
+ cb(new esm(float32Array));
16697
16712
  }
16698
16713
  init(localMediaStream) {
16699
16714
  this.options.logger.debug("AudioRecorder: init()");
@@ -17372,10 +17387,10 @@
17372
17387
  const command = JSON.parse(data.toString());
17373
17388
  this.executeCommand(command);
17374
17389
  } catch (exc) {
17375
- this.options.logger.debug(`Failed to parse command: ${exc}`);
17390
+ this.options.logger.error(`Failed to parse command: ${exc}`);
17376
17391
  const err = error_createError({
17377
17392
  message: "Invalid server command",
17378
- explanation: `Contact us asap. Bad command was ${data.toString()}. `,
17393
+ explanation: `Contact us. The invalid command was: ${data.toString()}.`,
17379
17394
  options: this.options,
17380
17395
  exc
17381
17396
  });
@@ -17869,7 +17884,7 @@
17869
17884
  });
17870
17885
  return;
17871
17886
  }
17872
- this.frame = new canvas_to_buffer_modern_r(this.canvas, this.options.image.types, this.options.image.quality);
17887
+ this.frame = new r(this.canvas, this.options.image.types, this.options.image.quality);
17873
17888
  this.options.logger.debug("Recorder: record()");
17874
17889
  this.userMedia.record();
17875
17890
  this.emit("RECORDING", {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "videomail-client",
3
- "version": "14.0.0",
3
+ "version": "14.1.1",
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",
@@ -60,7 +60,7 @@
60
60
  "prettier": "./prettier.config.js",
61
61
  "dependencies": {
62
62
  "animitter": "3.0.0",
63
- "audio-sample": "6.0.0",
63
+ "audio-sample": "7.0.0",
64
64
  "canvas-to-buffer": "4.1.2",
65
65
  "contains": "0.1.1",
66
66
  "deepmerge": "4.3.1",
@@ -76,54 +76,54 @@
76
76
  },
77
77
  "devDependencies": {
78
78
  "@chromatic-com/storybook": "5.2.1",
79
- "@eslint/config-inspector": "3.0.4",
79
+ "@eslint/config-inspector": "3.1.0",
80
80
  "@eslint/js": "10.0.1",
81
81
  "@rsbuild/plugin-node-polyfill": "1.4.6",
82
82
  "@rsbuild/plugin-stylus": "2.0.1",
83
- "@rsdoctor/rspack-plugin": "1.5.17",
83
+ "@rsdoctor/rspack-plugin": "1.6.0",
84
84
  "@rslib/core": "0.23.2",
85
- "@storybook/addon-a11y": "10.4.6",
86
- "@storybook/addon-docs": "10.4.6",
87
- "@storybook/addon-links": "10.4.6",
88
- "@storybook/html": "10.4.6",
85
+ "@storybook/addon-a11y": "10.5.0",
86
+ "@storybook/addon-docs": "10.5.0",
87
+ "@storybook/addon-links": "10.5.0",
88
+ "@storybook/html": "10.5.0",
89
89
  "@tsconfig/node24": "24.0.4",
90
90
  "@tsconfig/strictest": "2.0.8",
91
91
  "@types/defined": "1.0.2",
92
- "@types/node": "24.12.3",
93
- "@types/superagent": "8.1.10",
92
+ "@types/node": "24.13.3",
93
+ "@types/superagent": "8.1.11",
94
94
  "@types/ua-parser-js": "0.7.39",
95
- "@vitest/eslint-plugin": "1.6.21",
95
+ "@vitest/eslint-plugin": "1.6.23",
96
96
  "audit-ci": "7.1.0",
97
97
  "chromatic": "18.0.1",
98
98
  "cross-env": "10.1.0",
99
- "eslint": "10.6.0",
99
+ "eslint": "10.7.0",
100
100
  "eslint-import-resolver-typescript": "4.4.5",
101
- "eslint-plugin-de-morgan": "2.1.2",
101
+ "eslint-plugin-de-morgan": "2.1.3",
102
102
  "eslint-plugin-depend": "1.5.0",
103
103
  "eslint-plugin-import-x": "4.17.1",
104
- "eslint-plugin-package-json": "1.5.0",
104
+ "eslint-plugin-package-json": "1.6.0",
105
105
  "eslint-plugin-regexp": "3.1.1",
106
106
  "eslint-plugin-simple-import-sort": "13.0.0",
107
107
  "globals": "17.7.0",
108
108
  "jsdom": "29.1.1",
109
- "msw": "2.14.6",
109
+ "msw": "2.15.0",
110
110
  "msw-storybook-addon": "2.0.7",
111
- "prettier": "3.9.4",
111
+ "prettier": "3.9.5",
112
112
  "prettier-plugin-curly": "0.4.1",
113
113
  "prettier-plugin-jsdoc": "1.8.1",
114
114
  "prettier-plugin-packagejson": "3.0.2",
115
- "prettier-plugin-sh": "0.18.1",
115
+ "prettier-plugin-sh": "0.19.0",
116
116
  "release-it": "20.2.1",
117
- "storybook": "10.4.6",
117
+ "storybook": "10.5.0",
118
118
  "storybook-html-rsbuild": "3.3.4",
119
119
  "type-fest": "5.8.0",
120
120
  "typescript": "6.0.3",
121
- "typescript-eslint": "8.62.1",
121
+ "typescript-eslint": "8.64.0",
122
122
  "vitest": "4.1.10"
123
123
  },
124
124
  "engines": {
125
- "node": "^24.15.0",
126
- "npm": "^11.12.1"
125
+ "node": "^24.18.0",
126
+ "npm": ">=11.16.0"
127
127
  },
128
128
  "msw": {
129
129
  "workerDirectory": [