videomail-client 13.13.1 → 13.13.3
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 +31 -5
- package/dist/esm/index.js +31 -5
- package/dist/esm/util/error/getWebSocketDiagnostic.d.ts +2 -0
- package/dist/umd/index.js +31 -5
- package/package.json +14 -14
package/dist/cjs/index.cjs
CHANGED
|
@@ -10876,7 +10876,7 @@ var __webpack_exports__ = {};
|
|
|
10876
10876
|
var client = __webpack_require__("./node_modules/superagent/lib/client.js");
|
|
10877
10877
|
var client_default = /*#__PURE__*/ __webpack_require__.n(client);
|
|
10878
10878
|
var package_namespaceObject = {
|
|
10879
|
-
rE: "13.13.
|
|
10879
|
+
rE: "13.13.3"
|
|
10880
10880
|
};
|
|
10881
10881
|
function isAudioEnabled(options) {
|
|
10882
10882
|
return Boolean(options.audio.enabled);
|
|
@@ -16745,6 +16745,32 @@ var __webpack_exports__ = {};
|
|
|
16745
16745
|
canvas_to_buffer_modern_r.atob = void 0;
|
|
16746
16746
|
var websocket_stream_stream = __webpack_require__("./node_modules/websocket-stream/stream.js");
|
|
16747
16747
|
var stream_default = /*#__PURE__*/ __webpack_require__.n(websocket_stream_stream);
|
|
16748
|
+
function getEdgeCodes(value, amount, fromEnd) {
|
|
16749
|
+
const chars = fromEnd ? value.slice(-amount) : value.slice(0, amount);
|
|
16750
|
+
const codes = Array.from(chars, (char)=>String(char.codePointAt(0))).join(".");
|
|
16751
|
+
return codes || "none";
|
|
16752
|
+
}
|
|
16753
|
+
function hasControlCharacters(value) {
|
|
16754
|
+
return Array.from(value).some((char)=>{
|
|
16755
|
+
const code = char.codePointAt(0);
|
|
16756
|
+
if (void 0 === code) return false;
|
|
16757
|
+
return code <= 31 || 127 === code;
|
|
16758
|
+
});
|
|
16759
|
+
}
|
|
16760
|
+
function getWebSocketDiagnostic(url2Connect) {
|
|
16761
|
+
const wsCtorFingerprint = String(globalThis.WebSocket).slice(0, 80).replace(/\s+/gu, " ");
|
|
16762
|
+
const wsCtorNative = wsCtorFingerprint.includes("[native code]");
|
|
16763
|
+
let urlParsedProtocol = "invalid";
|
|
16764
|
+
try {
|
|
16765
|
+
urlParsedProtocol = new URL(url2Connect).protocol;
|
|
16766
|
+
} catch (_exc) {}
|
|
16767
|
+
const urlHasWhitespace = /\s/u.test(url2Connect);
|
|
16768
|
+
const urlHasControlChars = hasControlCharacters(url2Connect);
|
|
16769
|
+
const urlHasReplacementChar = url2Connect.includes("\uFFFD");
|
|
16770
|
+
const diagnostic = ` websocketDiagnostics{webdriver=${String(navigator.webdriver)}, wsCtorNative=${String(wsCtorNative)}, urlLen=${url2Connect.length}, urlParsedProtocol=${urlParsedProtocol}, locationProtocol=${location.protocol}, secureContext=${String(globalThis.isSecureContext)}, online=${String(navigator.onLine)}, urlHasWhitespace=${String(urlHasWhitespace)}, urlHasControlChars=${String(urlHasControlChars)}, urlHasReplacementChar=${String(urlHasReplacementChar)}, urlFirstCodes=${getEdgeCodes(url2Connect, 4)}, urlLastCodes=${getEdgeCodes(url2Connect, 4, true)}}`;
|
|
16771
|
+
return diagnostic;
|
|
16772
|
+
}
|
|
16773
|
+
const error_getWebSocketDiagnostic = getWebSocketDiagnostic;
|
|
16748
16774
|
function figureMinHeight(height, options) {
|
|
16749
16775
|
let minHeight;
|
|
16750
16776
|
if (options.video.height) {
|
|
@@ -17446,14 +17472,14 @@ var __webpack_exports__ = {};
|
|
|
17446
17472
|
}
|
|
17447
17473
|
this.options.logger.debug(`Recorder: initializing web socket to ${url2Connect}`);
|
|
17448
17474
|
try {
|
|
17449
|
-
|
|
17450
|
-
|
|
17451
|
-
});
|
|
17475
|
+
const nativeSocket = new WebSocket(url2Connect);
|
|
17476
|
+
this.stream = stream_default()(nativeSocket);
|
|
17452
17477
|
} catch (exc) {
|
|
17453
17478
|
this.connecting = this.connected = false;
|
|
17479
|
+
const diagnostic = error_getWebSocketDiagnostic(url2Connect);
|
|
17454
17480
|
const err = error_createError({
|
|
17455
17481
|
message: "Failed to connect to server",
|
|
17456
|
-
explanation: `Unable to build websocket to ${url2Connect}. Please check your connection and try again. If the problem persists, contact us
|
|
17482
|
+
explanation: `Unable to build websocket to ${url2Connect}. Please check your connection and try again. If the problem persists, contact us.${diagnostic}`,
|
|
17457
17483
|
options: this.options,
|
|
17458
17484
|
exc
|
|
17459
17485
|
});
|
package/dist/esm/index.js
CHANGED
|
@@ -3617,7 +3617,7 @@ const constants = {
|
|
|
3617
3617
|
}
|
|
3618
3618
|
};
|
|
3619
3619
|
var package_namespaceObject = {
|
|
3620
|
-
rE: "13.13.
|
|
3620
|
+
rE: "13.13.3"
|
|
3621
3621
|
};
|
|
3622
3622
|
function isAudioEnabled(options) {
|
|
3623
3623
|
return Boolean(options.audio.enabled);
|
|
@@ -5905,6 +5905,32 @@ class Notifier extends util_Despot {
|
|
|
5905
5905
|
}
|
|
5906
5906
|
}
|
|
5907
5907
|
const notifier = Notifier;
|
|
5908
|
+
function getEdgeCodes(value, amount, fromEnd) {
|
|
5909
|
+
const chars = fromEnd ? value.slice(-amount) : value.slice(0, amount);
|
|
5910
|
+
const codes = Array.from(chars, (char)=>String(char.codePointAt(0))).join(".");
|
|
5911
|
+
return codes || "none";
|
|
5912
|
+
}
|
|
5913
|
+
function hasControlCharacters(value) {
|
|
5914
|
+
return Array.from(value).some((char)=>{
|
|
5915
|
+
const code = char.codePointAt(0);
|
|
5916
|
+
if (void 0 === code) return false;
|
|
5917
|
+
return code <= 31 || 127 === code;
|
|
5918
|
+
});
|
|
5919
|
+
}
|
|
5920
|
+
function getWebSocketDiagnostic(url2Connect) {
|
|
5921
|
+
const wsCtorFingerprint = String(globalThis.WebSocket).slice(0, 80).replace(/\s+/gu, " ");
|
|
5922
|
+
const wsCtorNative = wsCtorFingerprint.includes("[native code]");
|
|
5923
|
+
let urlParsedProtocol = "invalid";
|
|
5924
|
+
try {
|
|
5925
|
+
urlParsedProtocol = new URL(url2Connect).protocol;
|
|
5926
|
+
} catch (_exc) {}
|
|
5927
|
+
const urlHasWhitespace = /\s/u.test(url2Connect);
|
|
5928
|
+
const urlHasControlChars = hasControlCharacters(url2Connect);
|
|
5929
|
+
const urlHasReplacementChar = url2Connect.includes("\uFFFD");
|
|
5930
|
+
const diagnostic = ` websocketDiagnostics{webdriver=${String(navigator.webdriver)}, wsCtorNative=${String(wsCtorNative)}, urlLen=${url2Connect.length}, urlParsedProtocol=${urlParsedProtocol}, locationProtocol=${location.protocol}, secureContext=${String(globalThis.isSecureContext)}, online=${String(navigator.onLine)}, urlHasWhitespace=${String(urlHasWhitespace)}, urlHasControlChars=${String(urlHasControlChars)}, urlHasReplacementChar=${String(urlHasReplacementChar)}, urlFirstCodes=${getEdgeCodes(url2Connect, 4)}, urlLastCodes=${getEdgeCodes(url2Connect, 4, true)}}`;
|
|
5931
|
+
return diagnostic;
|
|
5932
|
+
}
|
|
5933
|
+
const error_getWebSocketDiagnostic = getWebSocketDiagnostic;
|
|
5908
5934
|
function figureMinHeight(height, options) {
|
|
5909
5935
|
let minHeight;
|
|
5910
5936
|
if (options.video.height) {
|
|
@@ -6576,14 +6602,14 @@ class Recorder extends util_Despot {
|
|
|
6576
6602
|
}
|
|
6577
6603
|
this.options.logger.debug(`Recorder: initializing web socket to ${url2Connect}`);
|
|
6578
6604
|
try {
|
|
6579
|
-
|
|
6580
|
-
|
|
6581
|
-
});
|
|
6605
|
+
const nativeSocket = new WebSocket(url2Connect);
|
|
6606
|
+
this.stream = websocket_stream(nativeSocket);
|
|
6582
6607
|
} catch (exc) {
|
|
6583
6608
|
this.connecting = this.connected = false;
|
|
6609
|
+
const diagnostic = error_getWebSocketDiagnostic(url2Connect);
|
|
6584
6610
|
const err = error_createError({
|
|
6585
6611
|
message: "Failed to connect to server",
|
|
6586
|
-
explanation: `Unable to build websocket to ${url2Connect}. Please check your connection and try again. If the problem persists, contact us
|
|
6612
|
+
explanation: `Unable to build websocket to ${url2Connect}. Please check your connection and try again. If the problem persists, contact us.${diagnostic}`,
|
|
6587
6613
|
options: this.options,
|
|
6588
6614
|
exc
|
|
6589
6615
|
});
|
package/dist/umd/index.js
CHANGED
|
@@ -10882,7 +10882,7 @@
|
|
|
10882
10882
|
var client = __webpack_require__("./node_modules/superagent/lib/client.js");
|
|
10883
10883
|
var client_default = /*#__PURE__*/ __webpack_require__.n(client);
|
|
10884
10884
|
var package_namespaceObject = {
|
|
10885
|
-
rE: "13.13.
|
|
10885
|
+
rE: "13.13.3"
|
|
10886
10886
|
};
|
|
10887
10887
|
function isAudioEnabled(options) {
|
|
10888
10888
|
return Boolean(options.audio.enabled);
|
|
@@ -16508,6 +16508,32 @@
|
|
|
16508
16508
|
canvas_to_buffer_modern_r.atob = void 0;
|
|
16509
16509
|
var websocket_stream_stream = __webpack_require__("./node_modules/websocket-stream/stream.js");
|
|
16510
16510
|
var stream_default = /*#__PURE__*/ __webpack_require__.n(websocket_stream_stream);
|
|
16511
|
+
function getEdgeCodes(value, amount, fromEnd) {
|
|
16512
|
+
const chars = fromEnd ? value.slice(-amount) : value.slice(0, amount);
|
|
16513
|
+
const codes = Array.from(chars, (char)=>String(char.codePointAt(0))).join(".");
|
|
16514
|
+
return codes || "none";
|
|
16515
|
+
}
|
|
16516
|
+
function hasControlCharacters(value) {
|
|
16517
|
+
return Array.from(value).some((char)=>{
|
|
16518
|
+
const code = char.codePointAt(0);
|
|
16519
|
+
if (void 0 === code) return false;
|
|
16520
|
+
return code <= 31 || 127 === code;
|
|
16521
|
+
});
|
|
16522
|
+
}
|
|
16523
|
+
function getWebSocketDiagnostic(url2Connect) {
|
|
16524
|
+
const wsCtorFingerprint = String(globalThis.WebSocket).slice(0, 80).replace(/\s+/gu, " ");
|
|
16525
|
+
const wsCtorNative = wsCtorFingerprint.includes("[native code]");
|
|
16526
|
+
let urlParsedProtocol = "invalid";
|
|
16527
|
+
try {
|
|
16528
|
+
urlParsedProtocol = new URL(url2Connect).protocol;
|
|
16529
|
+
} catch (_exc) {}
|
|
16530
|
+
const urlHasWhitespace = /\s/u.test(url2Connect);
|
|
16531
|
+
const urlHasControlChars = hasControlCharacters(url2Connect);
|
|
16532
|
+
const urlHasReplacementChar = url2Connect.includes("\uFFFD");
|
|
16533
|
+
const diagnostic = ` websocketDiagnostics{webdriver=${String(navigator.webdriver)}, wsCtorNative=${String(wsCtorNative)}, urlLen=${url2Connect.length}, urlParsedProtocol=${urlParsedProtocol}, locationProtocol=${location.protocol}, secureContext=${String(globalThis.isSecureContext)}, online=${String(navigator.onLine)}, urlHasWhitespace=${String(urlHasWhitespace)}, urlHasControlChars=${String(urlHasControlChars)}, urlHasReplacementChar=${String(urlHasReplacementChar)}, urlFirstCodes=${getEdgeCodes(url2Connect, 4)}, urlLastCodes=${getEdgeCodes(url2Connect, 4, true)}}`;
|
|
16534
|
+
return diagnostic;
|
|
16535
|
+
}
|
|
16536
|
+
const error_getWebSocketDiagnostic = getWebSocketDiagnostic;
|
|
16511
16537
|
function figureMinHeight(height, options) {
|
|
16512
16538
|
let minHeight;
|
|
16513
16539
|
if (options.video.height) {
|
|
@@ -17210,14 +17236,14 @@
|
|
|
17210
17236
|
}
|
|
17211
17237
|
this.options.logger.debug(`Recorder: initializing web socket to ${url2Connect}`);
|
|
17212
17238
|
try {
|
|
17213
|
-
|
|
17214
|
-
|
|
17215
|
-
});
|
|
17239
|
+
const nativeSocket = new WebSocket(url2Connect);
|
|
17240
|
+
this.stream = stream_default()(nativeSocket);
|
|
17216
17241
|
} catch (exc) {
|
|
17217
17242
|
this.connecting = this.connected = false;
|
|
17243
|
+
const diagnostic = error_getWebSocketDiagnostic(url2Connect);
|
|
17218
17244
|
const err = error_createError({
|
|
17219
17245
|
message: "Failed to connect to server",
|
|
17220
|
-
explanation: `Unable to build websocket to ${url2Connect}. Please check your connection and try again. If the problem persists, contact us
|
|
17246
|
+
explanation: `Unable to build websocket to ${url2Connect}. Please check your connection and try again. If the problem persists, contact us.${diagnostic}`,
|
|
17221
17247
|
options: this.options,
|
|
17222
17248
|
exc
|
|
17223
17249
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "videomail-client",
|
|
3
|
-
"version": "13.13.
|
|
3
|
+
"version": "13.13.3",
|
|
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",
|
|
@@ -78,30 +78,30 @@
|
|
|
78
78
|
"@chromatic-com/storybook": "5.2.1",
|
|
79
79
|
"@eslint/config-inspector": "3.0.4",
|
|
80
80
|
"@eslint/js": "10.0.1",
|
|
81
|
-
"@rsbuild/plugin-node-polyfill": "1.4.
|
|
81
|
+
"@rsbuild/plugin-node-polyfill": "1.4.6",
|
|
82
82
|
"@rsbuild/plugin-stylus": "2.0.1",
|
|
83
83
|
"@rsdoctor/rspack-plugin": "1.5.12",
|
|
84
84
|
"@rslib/core": "0.22.0",
|
|
85
|
-
"@storybook/addon-a11y": "10.4.
|
|
86
|
-
"@storybook/addon-docs": "10.4.
|
|
87
|
-
"@storybook/addon-links": "10.4.
|
|
88
|
-
"@storybook/html": "10.4.
|
|
85
|
+
"@storybook/addon-a11y": "10.4.2",
|
|
86
|
+
"@storybook/addon-docs": "10.4.2",
|
|
87
|
+
"@storybook/addon-links": "10.4.2",
|
|
88
|
+
"@storybook/html": "10.4.2",
|
|
89
89
|
"@tsconfig/node24": "24.0.4",
|
|
90
90
|
"@tsconfig/strictest": "2.0.8",
|
|
91
91
|
"@types/defined": "1.0.2",
|
|
92
92
|
"@types/node": "24.12.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.19",
|
|
96
96
|
"audit-ci": "7.1.0",
|
|
97
|
-
"chromatic": "17.
|
|
97
|
+
"chromatic": "17.2.0",
|
|
98
98
|
"cross-env": "10.1.0",
|
|
99
99
|
"eslint": "10.4.1",
|
|
100
|
-
"eslint-import-resolver-typescript": "4.4.
|
|
100
|
+
"eslint-import-resolver-typescript": "4.4.5",
|
|
101
101
|
"eslint-plugin-de-morgan": "2.1.2",
|
|
102
102
|
"eslint-plugin-depend": "1.5.0",
|
|
103
103
|
"eslint-plugin-import-x": "4.16.2",
|
|
104
|
-
"eslint-plugin-package-json": "1.
|
|
104
|
+
"eslint-plugin-package-json": "1.3.0",
|
|
105
105
|
"eslint-plugin-regexp": "3.1.0",
|
|
106
106
|
"eslint-plugin-simple-import-sort": "13.0.0",
|
|
107
107
|
"globals": "17.6.0",
|
|
@@ -114,12 +114,12 @@
|
|
|
114
114
|
"prettier-plugin-packagejson": "3.0.2",
|
|
115
115
|
"prettier-plugin-sh": "0.18.1",
|
|
116
116
|
"release-it": "20.2.0",
|
|
117
|
-
"storybook": "10.4.
|
|
117
|
+
"storybook": "10.4.2",
|
|
118
118
|
"storybook-html-rsbuild": "3.3.4",
|
|
119
|
-
"type-fest": "5.
|
|
119
|
+
"type-fest": "5.7.0",
|
|
120
120
|
"typescript": "6.0.3",
|
|
121
|
-
"typescript-eslint": "8.60.
|
|
122
|
-
"vitest": "4.1.
|
|
121
|
+
"typescript-eslint": "8.60.1",
|
|
122
|
+
"vitest": "4.1.8"
|
|
123
123
|
},
|
|
124
124
|
"engines": {
|
|
125
125
|
"node": "^24.15.0",
|