videomail-client 10.3.2 → 10.3.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 +4 -3
- package/dist/esm/index.js +32 -31
- package/dist/umd/index.js +4 -3
- package/package.json +1 -1
package/dist/cjs/index.cjs
CHANGED
|
@@ -13942,8 +13942,9 @@ var __webpack_exports__ = {};
|
|
|
13942
13942
|
this.device = usefulClientData.device.type ? usefulClientData.device : void 0;
|
|
13943
13943
|
this.engine = usefulClientData.engine;
|
|
13944
13944
|
this.os = usefulClientData.os;
|
|
13945
|
-
|
|
13946
|
-
|
|
13945
|
+
let cookie;
|
|
13946
|
+
if (__webpack_require__.g.document.cookie.length > 0) cookie = __webpack_require__.g.document.cookie.split(",").map((c)=>c.trim());
|
|
13947
|
+
this.cookie = cookie && cookie.length > 0 ? cookie : void 0;
|
|
13947
13948
|
this.screen = [
|
|
13948
13949
|
screen.width,
|
|
13949
13950
|
screen.height,
|
|
@@ -14555,7 +14556,7 @@ var __webpack_exports__ = {};
|
|
|
14555
14556
|
}
|
|
14556
14557
|
const wrappers_form = Form;
|
|
14557
14558
|
var package_namespaceObject = {
|
|
14558
|
-
i8: "10.3.
|
|
14559
|
+
i8: "10.3.3"
|
|
14559
14560
|
};
|
|
14560
14561
|
function resource_define_property(obj, key, value) {
|
|
14561
14562
|
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.3"
|
|
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
|
@@ -13936,8 +13936,9 @@
|
|
|
13936
13936
|
this.device = usefulClientData.device.type ? usefulClientData.device : void 0;
|
|
13937
13937
|
this.engine = usefulClientData.engine;
|
|
13938
13938
|
this.os = usefulClientData.os;
|
|
13939
|
-
|
|
13940
|
-
|
|
13939
|
+
let cookie;
|
|
13940
|
+
if (__webpack_require__.g.document.cookie.length > 0) cookie = __webpack_require__.g.document.cookie.split(",").map((c)=>c.trim());
|
|
13941
|
+
this.cookie = cookie && cookie.length > 0 ? cookie : void 0;
|
|
13941
13942
|
this.screen = [
|
|
13942
13943
|
screen.width,
|
|
13943
13944
|
screen.height,
|
|
@@ -14522,7 +14523,7 @@
|
|
|
14522
14523
|
}
|
|
14523
14524
|
const wrappers_form = Form;
|
|
14524
14525
|
var package_namespaceObject = {
|
|
14525
|
-
i8: "10.3.
|
|
14526
|
+
i8: "10.3.3"
|
|
14526
14527
|
};
|
|
14527
14528
|
function findOriginalExc(exc) {
|
|
14528
14529
|
if (exc instanceof Error && "response" in exc) {
|