videomail-client 10.2.50 → 10.3.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
CHANGED
|
@@ -13942,8 +13942,8 @@ 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
|
-
const cookie = __webpack_require__.g.document.cookie.split(";
|
|
13946
|
-
this.cookie = cookie.length > 0 ? cookie
|
|
13945
|
+
const cookie = __webpack_require__.g.document.cookie.split(";").map((c)=>c.trim());
|
|
13946
|
+
this.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.
|
|
14558
|
+
i8: "10.3.0"
|
|
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_VideomailError extends HTTPVideomailError {
|
|
3733
3733
|
title = "Error from videomail-client npm package";
|
|
3734
3734
|
location = window.location.href;
|
|
3735
3735
|
logLines;
|
|
@@ -3771,8 +3771,8 @@ class 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
|
-
const cookie = __webpack_require__.g.document.cookie.split(";
|
|
3775
|
-
this.cookie = cookie.length > 0 ? cookie
|
|
3774
|
+
const cookie = __webpack_require__.g.document.cookie.split(";").map((c)=>c.trim());
|
|
3775
|
+
this.cookie = cookie.length > 0 ? cookie : void 0;
|
|
3776
3776
|
this.screen = [
|
|
3777
3777
|
screen.width,
|
|
3778
3778
|
screen.height,
|
|
@@ -3782,25 +3782,25 @@ class VideomailError extends HTTPVideomailError {
|
|
|
3782
3782
|
this.err = errData?.err;
|
|
3783
3783
|
const stackTarget = errData?.cause ?? errData?.err;
|
|
3784
3784
|
if (stackTarget) {
|
|
3785
|
-
if ("captureStackTrace" in Error) Error.captureStackTrace(stackTarget,
|
|
3785
|
+
if ("captureStackTrace" in Error) Error.captureStackTrace(stackTarget, VideomailError_VideomailError);
|
|
3786
3786
|
}
|
|
3787
3787
|
}
|
|
3788
3788
|
hasClass(name) {
|
|
3789
3789
|
return this.classList?.includes(name);
|
|
3790
3790
|
}
|
|
3791
3791
|
isBrowserProblem() {
|
|
3792
|
-
return this.hasClass(
|
|
3792
|
+
return this.hasClass(VideomailError_VideomailError.BROWSER_PROBLEM);
|
|
3793
3793
|
}
|
|
3794
3794
|
getClassList() {
|
|
3795
3795
|
return this.classList;
|
|
3796
3796
|
}
|
|
3797
3797
|
}
|
|
3798
|
-
const
|
|
3798
|
+
const VideomailError = VideomailError_VideomailError;
|
|
3799
3799
|
function createError(errorParams) {
|
|
3800
3800
|
const { exc, options } = errorParams;
|
|
3801
3801
|
let err = errorParams.err;
|
|
3802
3802
|
if (!err && exc instanceof Error) err = exc;
|
|
3803
|
-
if (err instanceof
|
|
3803
|
+
if (err instanceof VideomailError) return err;
|
|
3804
3804
|
let message = errorParams.message;
|
|
3805
3805
|
let explanation = errorParams.explanation;
|
|
3806
3806
|
const classList = errorParams.classList ?? [];
|
|
@@ -3808,12 +3808,12 @@ function createError(errorParams) {
|
|
|
3808
3808
|
const browser = util_getBrowser(options);
|
|
3809
3809
|
const errName = err?.name ?? err?.constructor.name;
|
|
3810
3810
|
switch(errName){
|
|
3811
|
-
case
|
|
3811
|
+
case VideomailError.SECURITY_ERROR:
|
|
3812
3812
|
message = "The operation was insecure";
|
|
3813
3813
|
explanation = "Probably you have disallowed Cookies for this page?";
|
|
3814
|
-
classList.push(
|
|
3814
|
+
classList.push(VideomailError.BROWSER_PROBLEM);
|
|
3815
3815
|
break;
|
|
3816
|
-
case
|
|
3816
|
+
case VideomailError.OVERCONSTRAINED:
|
|
3817
3817
|
message = "Invalid webcam constraints";
|
|
3818
3818
|
if (err && "constraint" in err) {
|
|
3819
3819
|
const overconstrainedError = err;
|
|
@@ -3837,57 +3837,57 @@ function createError(errorParams) {
|
|
|
3837
3837
|
message = "No webcam found";
|
|
3838
3838
|
explanation = "Your browser cannot find a webcam attached to your machine.";
|
|
3839
3839
|
}
|
|
3840
|
-
classList.push(
|
|
3840
|
+
classList.push(VideomailError.WEBCAM_PROBLEM);
|
|
3841
3841
|
break;
|
|
3842
3842
|
case "PermissionDismissedError":
|
|
3843
3843
|
message = "Ooops, you didn't give me any permissions?";
|
|
3844
3844
|
explanation = "Looks like you skipped the webcam permission dialogue.<br/>Please grant access next time the dialogue appears.";
|
|
3845
|
-
classList.push(
|
|
3845
|
+
classList.push(VideomailError.WEBCAM_PROBLEM);
|
|
3846
3846
|
break;
|
|
3847
|
-
case
|
|
3848
|
-
case
|
|
3847
|
+
case VideomailError.NOT_ALLOWED_ERROR:
|
|
3848
|
+
case VideomailError.PERMISSION_DENIED:
|
|
3849
3849
|
case "PermissionDeniedError":
|
|
3850
3850
|
message = "Permission denied";
|
|
3851
3851
|
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(
|
|
3852
|
+
classList.push(VideomailError.WEBCAM_PROBLEM);
|
|
3853
3853
|
break;
|
|
3854
3854
|
case "HARDWARE_UNAVAILABLE":
|
|
3855
3855
|
message = "Webcam is unavailable";
|
|
3856
3856
|
explanation = "Maybe it is already busy in another window?";
|
|
3857
3857
|
if (browser.isChromeBased() || browser.isFirefox()) explanation += " Or you have to allow access above?";
|
|
3858
|
-
classList.push(
|
|
3858
|
+
classList.push(VideomailError.WEBCAM_PROBLEM);
|
|
3859
3859
|
break;
|
|
3860
3860
|
case "NO_VIDEO_FEED":
|
|
3861
3861
|
message = "No video feed found!";
|
|
3862
3862
|
explanation = "Your webcam is already used in another browser.";
|
|
3863
|
-
classList.push(
|
|
3863
|
+
classList.push(VideomailError.WEBCAM_PROBLEM);
|
|
3864
3864
|
break;
|
|
3865
|
-
case
|
|
3865
|
+
case VideomailError.STARTING_FAILED:
|
|
3866
3866
|
message = "Starting video failed";
|
|
3867
3867
|
explanation = "Most likely this happens when the webcam is already active in another browser";
|
|
3868
|
-
classList.push(
|
|
3868
|
+
classList.push(VideomailError.WEBCAM_PROBLEM);
|
|
3869
3869
|
break;
|
|
3870
3870
|
case "DevicesNotFoundError":
|
|
3871
3871
|
message = "No available webcam could be found";
|
|
3872
3872
|
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(
|
|
3873
|
+
classList.push(VideomailError.WEBCAM_PROBLEM);
|
|
3874
3874
|
break;
|
|
3875
|
-
case
|
|
3876
|
-
case
|
|
3875
|
+
case VideomailError.NOT_READABLE_ERROR:
|
|
3876
|
+
case VideomailError.TRACK_START_ERROR:
|
|
3877
3877
|
message = "No access to webcam";
|
|
3878
3878
|
explanation = "A hardware error occurred which prevented access to your webcam";
|
|
3879
|
-
classList.push(
|
|
3879
|
+
classList.push(VideomailError.WEBCAM_PROBLEM);
|
|
3880
3880
|
break;
|
|
3881
|
-
case
|
|
3881
|
+
case VideomailError.INVALID_STATE_ERROR:
|
|
3882
3882
|
message = "Invalid state";
|
|
3883
3883
|
explanation = "Video recording stream from your webcam already has finished";
|
|
3884
|
-
classList.push(
|
|
3884
|
+
classList.push(VideomailError.WEBCAM_PROBLEM);
|
|
3885
3885
|
break;
|
|
3886
|
-
case
|
|
3886
|
+
case VideomailError.DOM_EXCEPTION:
|
|
3887
3887
|
message = "DOM Exception";
|
|
3888
3888
|
explanation = util_pretty(err);
|
|
3889
3889
|
break;
|
|
3890
|
-
case
|
|
3890
|
+
case VideomailError.MEDIA_DEVICE_NOT_SUPPORTED:
|
|
3891
3891
|
message = "Media device not supported";
|
|
3892
3892
|
explanation = util_pretty(err);
|
|
3893
3893
|
break;
|
|
@@ -3918,7 +3918,7 @@ function createError(errorParams) {
|
|
|
3918
3918
|
logLines,
|
|
3919
3919
|
err
|
|
3920
3920
|
};
|
|
3921
|
-
const videomailError = new
|
|
3921
|
+
const videomailError = new VideomailError(message ?? "(undefined message)", options, classList, errData);
|
|
3922
3922
|
if (err) {
|
|
3923
3923
|
videomailError.status = err.status;
|
|
3924
3924
|
videomailError.code = err.code;
|
|
@@ -3948,7 +3948,7 @@ class Despot {
|
|
|
3948
3948
|
try {
|
|
3949
3949
|
Despot.EMITTER.emit(eventName, ...params);
|
|
3950
3950
|
} catch (exc) {
|
|
3951
|
-
if (exc instanceof
|
|
3951
|
+
if (exc instanceof VideomailError) Despot.EMITTER.emit("ERROR", {
|
|
3952
3952
|
err: exc
|
|
3953
3953
|
});
|
|
3954
3954
|
else Despot.EMITTER.emit("ERROR", {
|
|
@@ -4242,7 +4242,7 @@ class Form extends util_Despot {
|
|
|
4242
4242
|
}
|
|
4243
4243
|
const wrappers_form = Form;
|
|
4244
4244
|
var package_namespaceObject = {
|
|
4245
|
-
i8: "10.
|
|
4245
|
+
i8: "10.3.0"
|
|
4246
4246
|
};
|
|
4247
4247
|
function findOriginalExc(exc) {
|
|
4248
4248
|
if (exc instanceof Error && "response" in exc) {
|
|
@@ -6406,7 +6406,7 @@ class Recorder extends util_Despot {
|
|
|
6406
6406
|
this.options.logger.debug(`Recorder: userMediaErrorCallback(), name: ${err.name}, message: ${err.message} and Webcam characteristics: ${characteristics ? util_pretty(characteristics) : "none"}`);
|
|
6407
6407
|
const errorListeners = util_Despot.getListeners("ERROR");
|
|
6408
6408
|
if (errorListeners?.length) {
|
|
6409
|
-
if (err.name !==
|
|
6409
|
+
if (err.name !== VideomailError.MEDIA_DEVICE_NOT_SUPPORTED) {
|
|
6410
6410
|
const videomailError = error_createError({
|
|
6411
6411
|
err,
|
|
6412
6412
|
options: this.options
|
|
@@ -21,7 +21,7 @@ interface VideomailErrorVersions {
|
|
|
21
21
|
}
|
|
22
22
|
export interface FullVideomailErrorData extends VideomailErrorData {
|
|
23
23
|
browser: IBrowser;
|
|
24
|
-
cookie?: string | undefined;
|
|
24
|
+
cookie?: string[] | undefined;
|
|
25
25
|
cpu?: ICPU | undefined;
|
|
26
26
|
device?: IDevice | undefined;
|
|
27
27
|
engine: IEngine;
|
|
@@ -11,7 +11,7 @@ declare class VideomailError extends HTTPVideomailError {
|
|
|
11
11
|
readonly location: string;
|
|
12
12
|
logLines?: string[] | undefined;
|
|
13
13
|
siteName: string | undefined;
|
|
14
|
-
cookie: string | undefined;
|
|
14
|
+
cookie: string[] | undefined;
|
|
15
15
|
err?: Error | undefined;
|
|
16
16
|
promise?: Promise<any> | undefined;
|
|
17
17
|
reason?: any;
|
package/dist/umd/index.js
CHANGED
|
@@ -13936,8 +13936,8 @@
|
|
|
13936
13936
|
this.device = usefulClientData.device.type ? usefulClientData.device : void 0;
|
|
13937
13937
|
this.engine = usefulClientData.engine;
|
|
13938
13938
|
this.os = usefulClientData.os;
|
|
13939
|
-
const cookie = __webpack_require__.g.document.cookie.split(";
|
|
13940
|
-
this.cookie = cookie.length > 0 ? cookie
|
|
13939
|
+
const cookie = __webpack_require__.g.document.cookie.split(";").map((c)=>c.trim());
|
|
13940
|
+
this.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.
|
|
14525
|
+
i8: "10.3.0"
|
|
14526
14526
|
};
|
|
14527
14527
|
function findOriginalExc(exc) {
|
|
14528
14528
|
if (exc instanceof Error && "response" in exc) {
|