videomail-client 14.0.0 → 14.1.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/cjs/index.cjs +29 -14
- package/dist/esm/index.js +1 -1
- package/dist/esm/util/error/getWebSocketDiagnostic.d.ts +2 -3
- package/dist/umd/index.js +29 -14
- package/package.json +10 -10
package/dist/cjs/index.cjs
CHANGED
|
@@ -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.
|
|
10879
|
+
rE: "14.1.0"
|
|
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
|
|
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 ==
|
|
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
|
-
|
|
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
|
-
|
|
16894
|
-
|
|
16895
|
-
|
|
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
|
|
16899
|
-
|
|
16900
|
-
|
|
16901
|
-
|
|
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
|
|
16949
|
+
cb(new esm(float32Array));
|
|
16935
16950
|
}
|
|
16936
16951
|
init(localMediaStream) {
|
|
16937
16952
|
this.options.logger.debug("AudioRecorder: init()");
|
|
@@ -18116,7 +18131,7 @@ var __webpack_exports__ = {};
|
|
|
18116
18131
|
});
|
|
18117
18132
|
return;
|
|
18118
18133
|
}
|
|
18119
|
-
this.frame = new
|
|
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
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
|
|
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.
|
|
10885
|
+
rE: "14.1.0"
|
|
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
|
|
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 ==
|
|
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
|
-
|
|
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
|
-
|
|
16657
|
-
|
|
16658
|
-
|
|
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
|
|
16662
|
-
|
|
16663
|
-
|
|
16664
|
-
|
|
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
|
|
16711
|
+
cb(new esm(float32Array));
|
|
16697
16712
|
}
|
|
16698
16713
|
init(localMediaStream) {
|
|
16699
16714
|
this.options.logger.debug("AudioRecorder: init()");
|
|
@@ -17869,7 +17884,7 @@
|
|
|
17869
17884
|
});
|
|
17870
17885
|
return;
|
|
17871
17886
|
}
|
|
17872
|
-
this.frame = new
|
|
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.
|
|
3
|
+
"version": "14.1.0",
|
|
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": "
|
|
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",
|
|
@@ -80,7 +80,7 @@
|
|
|
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.
|
|
83
|
+
"@rsdoctor/rspack-plugin": "1.5.18",
|
|
84
84
|
"@rslib/core": "0.23.2",
|
|
85
85
|
"@storybook/addon-a11y": "10.4.6",
|
|
86
86
|
"@storybook/addon-docs": "10.4.6",
|
|
@@ -89,10 +89,10 @@
|
|
|
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.
|
|
92
|
+
"@types/node": "24.13.3",
|
|
93
93
|
"@types/superagent": "8.1.10",
|
|
94
94
|
"@types/ua-parser-js": "0.7.39",
|
|
95
|
-
"@vitest/eslint-plugin": "1.6.
|
|
95
|
+
"@vitest/eslint-plugin": "1.6.22",
|
|
96
96
|
"audit-ci": "7.1.0",
|
|
97
97
|
"chromatic": "18.0.1",
|
|
98
98
|
"cross-env": "10.1.0",
|
|
@@ -106,9 +106,9 @@
|
|
|
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.
|
|
109
|
+
"msw": "2.15.0",
|
|
110
110
|
"msw-storybook-addon": "2.0.7",
|
|
111
|
-
"prettier": "3.9.
|
|
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",
|
|
@@ -118,12 +118,12 @@
|
|
|
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.
|
|
121
|
+
"typescript-eslint": "8.63.0",
|
|
122
122
|
"vitest": "4.1.10"
|
|
123
123
|
},
|
|
124
124
|
"engines": {
|
|
125
|
-
"node": "^24.
|
|
126
|
-
"npm": "
|
|
125
|
+
"node": "^24.18.0",
|
|
126
|
+
"npm": ">=11.16.0"
|
|
127
127
|
},
|
|
128
128
|
"msw": {
|
|
129
129
|
"workerDirectory": [
|