videomail-client 10.3.2 → 10.3.4
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 +7 -7
- package/dist/esm/index.js +32 -31
- package/dist/umd/index.js +7 -7
- package/package.json +20 -20
package/dist/cjs/index.cjs
CHANGED
|
@@ -6700,8 +6700,7 @@ var __webpack_modules__ = {
|
|
|
6700
6700
|
for (const def of this._defaults)request[def.fn](...def.args);
|
|
6701
6701
|
}
|
|
6702
6702
|
}
|
|
6703
|
-
for (const fn of defaults)Agent.prototype[fn] = function() {
|
|
6704
|
-
for(var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++)args[_key] = arguments[_key];
|
|
6703
|
+
for (const fn of defaults)Agent.prototype[fn] = function(...args) {
|
|
6705
6704
|
this._defaults.push({
|
|
6706
6705
|
fn,
|
|
6707
6706
|
args
|
|
@@ -10617,7 +10616,7 @@ var __webpack_exports__ = {};
|
|
|
10617
10616
|
return to;
|
|
10618
10617
|
};
|
|
10619
10618
|
function serializeError(value, options = {}) {
|
|
10620
|
-
const { maxDepth =
|
|
10619
|
+
const { maxDepth = 1 / 0, useToJSON = true } = options;
|
|
10621
10620
|
if ('object' == typeof value && null !== value) return destroyCircular({
|
|
10622
10621
|
from: value,
|
|
10623
10622
|
seen: [],
|
|
@@ -10631,7 +10630,7 @@ var __webpack_exports__ = {};
|
|
|
10631
10630
|
return value;
|
|
10632
10631
|
}
|
|
10633
10632
|
function deserializeError(value, options = {}) {
|
|
10634
|
-
const { maxDepth =
|
|
10633
|
+
const { maxDepth = 1 / 0 } = options;
|
|
10635
10634
|
if (value instanceof Error) return value;
|
|
10636
10635
|
if (isMinimumViableSerializedError(value)) return destroyCircular({
|
|
10637
10636
|
from: value,
|
|
@@ -13942,8 +13941,9 @@ var __webpack_exports__ = {};
|
|
|
13942
13941
|
this.device = usefulClientData.device.type ? usefulClientData.device : void 0;
|
|
13943
13942
|
this.engine = usefulClientData.engine;
|
|
13944
13943
|
this.os = usefulClientData.os;
|
|
13945
|
-
|
|
13946
|
-
|
|
13944
|
+
let cookie;
|
|
13945
|
+
if (__webpack_require__.g.document.cookie.length > 0) cookie = __webpack_require__.g.document.cookie.split(",").map((c)=>c.trim());
|
|
13946
|
+
this.cookie = cookie && cookie.length > 0 ? cookie : void 0;
|
|
13947
13947
|
this.screen = [
|
|
13948
13948
|
screen.width,
|
|
13949
13949
|
screen.height,
|
|
@@ -14555,7 +14555,7 @@ var __webpack_exports__ = {};
|
|
|
14555
14555
|
}
|
|
14556
14556
|
const wrappers_form = Form;
|
|
14557
14557
|
var package_namespaceObject = {
|
|
14558
|
-
i8: "10.3.
|
|
14558
|
+
i8: "10.3.4"
|
|
14559
14559
|
};
|
|
14560
14560
|
function resource_define_property(obj, key, value) {
|
|
14561
14561
|
if (key in obj) Object.defineProperty(obj, key, {
|
package/dist/esm/index.js
CHANGED
|
@@ -3729,7 +3729,7 @@ class HTTPVideomailError_HTTPVideomailError extends Error {
|
|
|
3729
3729
|
explanation;
|
|
3730
3730
|
}
|
|
3731
3731
|
const HTTPVideomailError = HTTPVideomailError_HTTPVideomailError;
|
|
3732
|
-
class
|
|
3732
|
+
class VideomailError extends HTTPVideomailError {
|
|
3733
3733
|
title = "Error from videomail-client npm package";
|
|
3734
3734
|
location = window.location.href;
|
|
3735
3735
|
logLines;
|
|
@@ -3771,8 +3771,9 @@ class VideomailError_VideomailError extends HTTPVideomailError {
|
|
|
3771
3771
|
this.device = usefulClientData.device.type ? usefulClientData.device : void 0;
|
|
3772
3772
|
this.engine = usefulClientData.engine;
|
|
3773
3773
|
this.os = usefulClientData.os;
|
|
3774
|
-
|
|
3775
|
-
|
|
3774
|
+
let cookie;
|
|
3775
|
+
if (__webpack_require__.g.document.cookie.length > 0) cookie = __webpack_require__.g.document.cookie.split(",").map((c)=>c.trim());
|
|
3776
|
+
this.cookie = cookie && cookie.length > 0 ? cookie : void 0;
|
|
3776
3777
|
this.screen = [
|
|
3777
3778
|
screen.width,
|
|
3778
3779
|
screen.height,
|
|
@@ -3782,25 +3783,25 @@ class VideomailError_VideomailError extends HTTPVideomailError {
|
|
|
3782
3783
|
this.err = errData?.err;
|
|
3783
3784
|
const stackTarget = errData?.cause ?? errData?.err;
|
|
3784
3785
|
if (stackTarget) {
|
|
3785
|
-
if ("captureStackTrace" in Error) Error.captureStackTrace(stackTarget,
|
|
3786
|
+
if ("captureStackTrace" in Error) Error.captureStackTrace(stackTarget, VideomailError);
|
|
3786
3787
|
}
|
|
3787
3788
|
}
|
|
3788
3789
|
hasClass(name) {
|
|
3789
3790
|
return this.classList?.includes(name);
|
|
3790
3791
|
}
|
|
3791
3792
|
isBrowserProblem() {
|
|
3792
|
-
return this.hasClass(
|
|
3793
|
+
return this.hasClass(VideomailError.BROWSER_PROBLEM);
|
|
3793
3794
|
}
|
|
3794
3795
|
getClassList() {
|
|
3795
3796
|
return this.classList;
|
|
3796
3797
|
}
|
|
3797
3798
|
}
|
|
3798
|
-
const
|
|
3799
|
+
const error_VideomailError = VideomailError;
|
|
3799
3800
|
function createError(errorParams) {
|
|
3800
3801
|
const { exc, options } = errorParams;
|
|
3801
3802
|
let err = errorParams.err;
|
|
3802
3803
|
if (!err && exc instanceof Error) err = exc;
|
|
3803
|
-
if (err instanceof
|
|
3804
|
+
if (err instanceof error_VideomailError) return err;
|
|
3804
3805
|
let message = errorParams.message;
|
|
3805
3806
|
let explanation = errorParams.explanation;
|
|
3806
3807
|
const classList = errorParams.classList ?? [];
|
|
@@ -3808,12 +3809,12 @@ function createError(errorParams) {
|
|
|
3808
3809
|
const browser = util_getBrowser(options);
|
|
3809
3810
|
const errName = err?.name ?? err?.constructor.name;
|
|
3810
3811
|
switch(errName){
|
|
3811
|
-
case
|
|
3812
|
+
case error_VideomailError.SECURITY_ERROR:
|
|
3812
3813
|
message = "The operation was insecure";
|
|
3813
3814
|
explanation = "Probably you have disallowed Cookies for this page?";
|
|
3814
|
-
classList.push(
|
|
3815
|
+
classList.push(error_VideomailError.BROWSER_PROBLEM);
|
|
3815
3816
|
break;
|
|
3816
|
-
case
|
|
3817
|
+
case error_VideomailError.OVERCONSTRAINED:
|
|
3817
3818
|
message = "Invalid webcam constraints";
|
|
3818
3819
|
if (err && "constraint" in err) {
|
|
3819
3820
|
const overconstrainedError = err;
|
|
@@ -3837,57 +3838,57 @@ function createError(errorParams) {
|
|
|
3837
3838
|
message = "No webcam found";
|
|
3838
3839
|
explanation = "Your browser cannot find a webcam attached to your machine.";
|
|
3839
3840
|
}
|
|
3840
|
-
classList.push(
|
|
3841
|
+
classList.push(error_VideomailError.WEBCAM_PROBLEM);
|
|
3841
3842
|
break;
|
|
3842
3843
|
case "PermissionDismissedError":
|
|
3843
3844
|
message = "Ooops, you didn't give me any permissions?";
|
|
3844
3845
|
explanation = "Looks like you skipped the webcam permission dialogue.<br/>Please grant access next time the dialogue appears.";
|
|
3845
|
-
classList.push(
|
|
3846
|
+
classList.push(error_VideomailError.WEBCAM_PROBLEM);
|
|
3846
3847
|
break;
|
|
3847
|
-
case
|
|
3848
|
-
case
|
|
3848
|
+
case error_VideomailError.NOT_ALLOWED_ERROR:
|
|
3849
|
+
case error_VideomailError.PERMISSION_DENIED:
|
|
3849
3850
|
case "PermissionDeniedError":
|
|
3850
3851
|
message = "Permission denied";
|
|
3851
3852
|
explanation = "Cannot access your webcam. This can have two reasons:<br/>a) you blocked access to webcam; or<br/>b) your webcam is already in use.";
|
|
3852
|
-
classList.push(
|
|
3853
|
+
classList.push(error_VideomailError.WEBCAM_PROBLEM);
|
|
3853
3854
|
break;
|
|
3854
3855
|
case "HARDWARE_UNAVAILABLE":
|
|
3855
3856
|
message = "Webcam is unavailable";
|
|
3856
3857
|
explanation = "Maybe it is already busy in another window?";
|
|
3857
3858
|
if (browser.isChromeBased() || browser.isFirefox()) explanation += " Or you have to allow access above?";
|
|
3858
|
-
classList.push(
|
|
3859
|
+
classList.push(error_VideomailError.WEBCAM_PROBLEM);
|
|
3859
3860
|
break;
|
|
3860
3861
|
case "NO_VIDEO_FEED":
|
|
3861
3862
|
message = "No video feed found!";
|
|
3862
3863
|
explanation = "Your webcam is already used in another browser.";
|
|
3863
|
-
classList.push(
|
|
3864
|
+
classList.push(error_VideomailError.WEBCAM_PROBLEM);
|
|
3864
3865
|
break;
|
|
3865
|
-
case
|
|
3866
|
+
case error_VideomailError.STARTING_FAILED:
|
|
3866
3867
|
message = "Starting video failed";
|
|
3867
3868
|
explanation = "Most likely this happens when the webcam is already active in another browser";
|
|
3868
|
-
classList.push(
|
|
3869
|
+
classList.push(error_VideomailError.WEBCAM_PROBLEM);
|
|
3869
3870
|
break;
|
|
3870
3871
|
case "DevicesNotFoundError":
|
|
3871
3872
|
message = "No available webcam could be found";
|
|
3872
3873
|
explanation = "Looks like you do not have any webcam attached to your machine; or the one you plugged in is already used.";
|
|
3873
|
-
classList.push(
|
|
3874
|
+
classList.push(error_VideomailError.WEBCAM_PROBLEM);
|
|
3874
3875
|
break;
|
|
3875
|
-
case
|
|
3876
|
-
case
|
|
3876
|
+
case error_VideomailError.NOT_READABLE_ERROR:
|
|
3877
|
+
case error_VideomailError.TRACK_START_ERROR:
|
|
3877
3878
|
message = "No access to webcam";
|
|
3878
3879
|
explanation = "A hardware error occurred which prevented access to your webcam";
|
|
3879
|
-
classList.push(
|
|
3880
|
+
classList.push(error_VideomailError.WEBCAM_PROBLEM);
|
|
3880
3881
|
break;
|
|
3881
|
-
case
|
|
3882
|
+
case error_VideomailError.INVALID_STATE_ERROR:
|
|
3882
3883
|
message = "Invalid state";
|
|
3883
3884
|
explanation = "Video recording stream from your webcam already has finished";
|
|
3884
|
-
classList.push(
|
|
3885
|
+
classList.push(error_VideomailError.WEBCAM_PROBLEM);
|
|
3885
3886
|
break;
|
|
3886
|
-
case
|
|
3887
|
+
case error_VideomailError.DOM_EXCEPTION:
|
|
3887
3888
|
message = "DOM Exception";
|
|
3888
3889
|
explanation = util_pretty(err);
|
|
3889
3890
|
break;
|
|
3890
|
-
case
|
|
3891
|
+
case error_VideomailError.MEDIA_DEVICE_NOT_SUPPORTED:
|
|
3891
3892
|
message = "Media device not supported";
|
|
3892
3893
|
explanation = util_pretty(err);
|
|
3893
3894
|
break;
|
|
@@ -3918,7 +3919,7 @@ function createError(errorParams) {
|
|
|
3918
3919
|
logLines,
|
|
3919
3920
|
err
|
|
3920
3921
|
};
|
|
3921
|
-
const videomailError = new
|
|
3922
|
+
const videomailError = new error_VideomailError(message ?? "(undefined message)", options, classList, errData);
|
|
3922
3923
|
if (err) {
|
|
3923
3924
|
videomailError.status = err.status;
|
|
3924
3925
|
videomailError.code = err.code;
|
|
@@ -3948,7 +3949,7 @@ class Despot {
|
|
|
3948
3949
|
try {
|
|
3949
3950
|
Despot.EMITTER.emit(eventName, ...params);
|
|
3950
3951
|
} catch (exc) {
|
|
3951
|
-
if (exc instanceof
|
|
3952
|
+
if (exc instanceof error_VideomailError) Despot.EMITTER.emit("ERROR", {
|
|
3952
3953
|
err: exc
|
|
3953
3954
|
});
|
|
3954
3955
|
else Despot.EMITTER.emit("ERROR", {
|
|
@@ -4242,7 +4243,7 @@ class Form extends util_Despot {
|
|
|
4242
4243
|
}
|
|
4243
4244
|
const wrappers_form = Form;
|
|
4244
4245
|
var package_namespaceObject = {
|
|
4245
|
-
i8: "10.3.
|
|
4246
|
+
i8: "10.3.4"
|
|
4246
4247
|
};
|
|
4247
4248
|
function findOriginalExc(exc) {
|
|
4248
4249
|
if (exc instanceof Error && "response" in exc) {
|
|
@@ -6406,7 +6407,7 @@ class Recorder extends util_Despot {
|
|
|
6406
6407
|
this.options.logger.debug(`Recorder: userMediaErrorCallback(), name: ${err.name}, message: ${err.message} and Webcam characteristics: ${characteristics ? util_pretty(characteristics) : "none"}`);
|
|
6407
6408
|
const errorListeners = util_Despot.getListeners("ERROR");
|
|
6408
6409
|
if (errorListeners?.length) {
|
|
6409
|
-
if (err.name !==
|
|
6410
|
+
if (err.name !== error_VideomailError.MEDIA_DEVICE_NOT_SUPPORTED) {
|
|
6410
6411
|
const videomailError = error_createError({
|
|
6411
6412
|
err,
|
|
6412
6413
|
options: this.options
|
package/dist/umd/index.js
CHANGED
|
@@ -6706,8 +6706,7 @@
|
|
|
6706
6706
|
for (const def of this._defaults)request[def.fn](...def.args);
|
|
6707
6707
|
}
|
|
6708
6708
|
}
|
|
6709
|
-
for (const fn of defaults)Agent.prototype[fn] = function() {
|
|
6710
|
-
for(var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++)args[_key] = arguments[_key];
|
|
6709
|
+
for (const fn of defaults)Agent.prototype[fn] = function(...args) {
|
|
6711
6710
|
this._defaults.push({
|
|
6712
6711
|
fn,
|
|
6713
6712
|
args
|
|
@@ -10623,7 +10622,7 @@
|
|
|
10623
10622
|
return to;
|
|
10624
10623
|
};
|
|
10625
10624
|
function serializeError(value, options = {}) {
|
|
10626
|
-
const { maxDepth =
|
|
10625
|
+
const { maxDepth = 1 / 0, useToJSON = true } = options;
|
|
10627
10626
|
if ('object' == typeof value && null !== value) return destroyCircular({
|
|
10628
10627
|
from: value,
|
|
10629
10628
|
seen: [],
|
|
@@ -10637,7 +10636,7 @@
|
|
|
10637
10636
|
return value;
|
|
10638
10637
|
}
|
|
10639
10638
|
function deserializeError(value, options = {}) {
|
|
10640
|
-
const { maxDepth =
|
|
10639
|
+
const { maxDepth = 1 / 0 } = options;
|
|
10641
10640
|
if (value instanceof Error) return value;
|
|
10642
10641
|
if (isMinimumViableSerializedError(value)) return destroyCircular({
|
|
10643
10642
|
from: value,
|
|
@@ -13936,8 +13935,9 @@
|
|
|
13936
13935
|
this.device = usefulClientData.device.type ? usefulClientData.device : void 0;
|
|
13937
13936
|
this.engine = usefulClientData.engine;
|
|
13938
13937
|
this.os = usefulClientData.os;
|
|
13939
|
-
|
|
13940
|
-
|
|
13938
|
+
let cookie;
|
|
13939
|
+
if (__webpack_require__.g.document.cookie.length > 0) cookie = __webpack_require__.g.document.cookie.split(",").map((c)=>c.trim());
|
|
13940
|
+
this.cookie = cookie && cookie.length > 0 ? cookie : void 0;
|
|
13941
13941
|
this.screen = [
|
|
13942
13942
|
screen.width,
|
|
13943
13943
|
screen.height,
|
|
@@ -14522,7 +14522,7 @@
|
|
|
14522
14522
|
}
|
|
14523
14523
|
const wrappers_form = Form;
|
|
14524
14524
|
var package_namespaceObject = {
|
|
14525
|
-
i8: "10.3.
|
|
14525
|
+
i8: "10.3.4"
|
|
14526
14526
|
};
|
|
14527
14527
|
function findOriginalExc(exc) {
|
|
14528
14528
|
if (exc instanceof Error && "response" in exc) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "videomail-client",
|
|
3
|
-
"version": "10.3.
|
|
3
|
+
"version": "10.3.4",
|
|
4
4
|
"description": "A wicked npm package to record videos directly in the browser, wohooo!",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"webcam",
|
|
@@ -69,22 +69,22 @@
|
|
|
69
69
|
"is-power-of-two": "1.0.0",
|
|
70
70
|
"nanoevents": "9.1.0",
|
|
71
71
|
"serialize-error": "12.0.0",
|
|
72
|
-
"superagent": "10.2.
|
|
72
|
+
"superagent": "10.2.2",
|
|
73
73
|
"ua-parser-js": "2.0.4",
|
|
74
74
|
"websocket-stream": "5.5.2"
|
|
75
75
|
},
|
|
76
76
|
"devDependencies": {
|
|
77
77
|
"@chromatic-com/storybook": "4.0.1",
|
|
78
78
|
"@eslint/config-inspector": "1.1.0",
|
|
79
|
-
"@eslint/js": "9.
|
|
80
|
-
"@rsbuild/plugin-node-polyfill": "1.3.
|
|
81
|
-
"@rsbuild/plugin-stylus": "1.1.
|
|
82
|
-
"@rsdoctor/rspack-plugin": "1.1.
|
|
83
|
-
"@rslib/core": "0.10.
|
|
84
|
-
"@storybook/addon-a11y": "9.0.
|
|
85
|
-
"@storybook/addon-docs": "9.0.
|
|
86
|
-
"@storybook/addon-links": "9.0.
|
|
87
|
-
"@storybook/html": "9.0.
|
|
79
|
+
"@eslint/js": "9.31.0",
|
|
80
|
+
"@rsbuild/plugin-node-polyfill": "1.3.1",
|
|
81
|
+
"@rsbuild/plugin-stylus": "1.1.2",
|
|
82
|
+
"@rsdoctor/rspack-plugin": "1.1.8",
|
|
83
|
+
"@rslib/core": "0.10.6",
|
|
84
|
+
"@storybook/addon-a11y": "9.0.17",
|
|
85
|
+
"@storybook/addon-docs": "9.0.17",
|
|
86
|
+
"@storybook/addon-links": "9.0.17",
|
|
87
|
+
"@storybook/html": "9.0.17",
|
|
88
88
|
"@tsconfig/node22": "22.0.2",
|
|
89
89
|
"@tsconfig/strictest": "2.0.5",
|
|
90
90
|
"@types/defined": "1.0.2",
|
|
@@ -93,32 +93,32 @@
|
|
|
93
93
|
"@types/ua-parser-js": "0.7.39",
|
|
94
94
|
"@vitest/eslint-plugin": "1.3.4",
|
|
95
95
|
"audit-ci": "7.1.0",
|
|
96
|
-
"chromatic": "13.1.
|
|
96
|
+
"chromatic": "13.1.2",
|
|
97
97
|
"cross-env": "7.0.3",
|
|
98
|
-
"eslint": "9.
|
|
98
|
+
"eslint": "9.31.0",
|
|
99
99
|
"eslint-import-resolver-typescript": "4.4.4",
|
|
100
100
|
"eslint-plugin-de-morgan": "1.3.0",
|
|
101
101
|
"eslint-plugin-depend": "1.2.0",
|
|
102
102
|
"eslint-plugin-import-x": "4.16.1",
|
|
103
|
-
"eslint-plugin-package-json": "0.
|
|
103
|
+
"eslint-plugin-package-json": "0.45.1",
|
|
104
104
|
"eslint-plugin-promise": "7.2.1",
|
|
105
105
|
"eslint-plugin-regexp": "2.9.0",
|
|
106
106
|
"eslint-plugin-security": "3.0.1",
|
|
107
|
-
"eslint-plugin-storybook": "9.0.
|
|
107
|
+
"eslint-plugin-storybook": "9.0.17",
|
|
108
108
|
"globals": "16.3.0",
|
|
109
109
|
"jsdom": "26.1.0",
|
|
110
|
-
"msw": "2.10.
|
|
110
|
+
"msw": "2.10.4",
|
|
111
111
|
"msw-storybook-addon": "2.0.5",
|
|
112
112
|
"prettier": "3.6.2",
|
|
113
113
|
"prettier-plugin-curly": "0.3.2",
|
|
114
|
-
"prettier-plugin-packagejson": "2.5.
|
|
114
|
+
"prettier-plugin-packagejson": "2.5.18",
|
|
115
115
|
"prettier-plugin-sh": "0.18.0",
|
|
116
|
-
"release-it": "19.0.
|
|
117
|
-
"storybook": "9.0.
|
|
116
|
+
"release-it": "19.0.4",
|
|
117
|
+
"storybook": "9.0.17",
|
|
118
118
|
"storybook-html-rsbuild": "2.0.2",
|
|
119
119
|
"type-fest": "4.41.0",
|
|
120
120
|
"typescript": "5.8.3",
|
|
121
|
-
"typescript-eslint": "8.
|
|
121
|
+
"typescript-eslint": "8.37.0",
|
|
122
122
|
"vitest": "3.2.4"
|
|
123
123
|
},
|
|
124
124
|
"engines": {
|