videomail-client 13.14.0 → 13.15.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 +25 -4
- package/dist/esm/index.js +25 -4
- package/dist/esm/types/Videomail.d.ts +1 -0
- package/dist/esm/util/isVirtualCamera.d.ts +2 -0
- package/dist/esm/wrappers/form.d.ts +2 -0
- package/dist/umd/index.js +25 -4
- package/package.json +11 -11
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: "13.
|
|
10879
|
+
rE: "13.15.0"
|
|
10880
10880
|
};
|
|
10881
10881
|
function isAudioEnabled(options) {
|
|
10882
10882
|
return Boolean(options.audio.enabled);
|
|
@@ -17026,6 +17026,20 @@ var __webpack_exports__ = {};
|
|
|
17026
17026
|
"volumechange"
|
|
17027
17027
|
];
|
|
17028
17028
|
const mediaEvents = MEDIA_EVENTS;
|
|
17029
|
+
const VIRTUAL_KEYWORDS = [
|
|
17030
|
+
"obs",
|
|
17031
|
+
"virtual",
|
|
17032
|
+
"manycam",
|
|
17033
|
+
"vcam",
|
|
17034
|
+
"splitcam",
|
|
17035
|
+
"droidcam"
|
|
17036
|
+
];
|
|
17037
|
+
function isVirtualCamera(videoTrack) {
|
|
17038
|
+
const capabilities = videoTrack.getCapabilities();
|
|
17039
|
+
if (!capabilities.frameRate) return true;
|
|
17040
|
+
return VIRTUAL_KEYWORDS.some((keyword)=>videoTrack.label.toLowerCase().includes(keyword));
|
|
17041
|
+
}
|
|
17042
|
+
const util_isVirtualCamera = isVirtualCamera;
|
|
17029
17043
|
function userMedia_define_property(obj, key, value) {
|
|
17030
17044
|
if (key in obj) Object.defineProperty(obj, key, {
|
|
17031
17045
|
value: value,
|
|
@@ -17193,12 +17207,18 @@ var __webpack_exports__ = {};
|
|
|
17193
17207
|
try {
|
|
17194
17208
|
var _this_rawVisualUserMedia, _this_rawVisualUserMedia1, _this_rawVisualUserMedia2;
|
|
17195
17209
|
const videoTrack = media_getFirstVideoTrack(localMediaStream);
|
|
17196
|
-
if (videoTrack) if (videoTrack.enabled) {
|
|
17210
|
+
if (videoTrack) if (videoTrack.enabled) if (util_isVirtualCamera(videoTrack)) throw error_createError({
|
|
17211
|
+
message: "Virtual cameras are not allowed.",
|
|
17212
|
+
explanation: `Please use a real camera, not "${videoTrack.label}".`,
|
|
17213
|
+
options: this.options
|
|
17214
|
+
});
|
|
17215
|
+
else {
|
|
17197
17216
|
let description = "";
|
|
17198
|
-
if (videoTrack.label
|
|
17217
|
+
if (videoTrack.label.length > 0) description = description.concat(videoTrack.label);
|
|
17199
17218
|
description = description.concat(` with enabled=${videoTrack.enabled}, muted=${videoTrack.muted}, readyState=${videoTrack.readyState}`);
|
|
17200
17219
|
this.options.logger.debug(`UserMedia: ${videoTrack.kind} detected. ${description}`);
|
|
17201
|
-
}
|
|
17220
|
+
}
|
|
17221
|
+
else throw error_createError({
|
|
17202
17222
|
message: "Webcam is disabled",
|
|
17203
17223
|
explanation: "The video track seems to be disabled. Enable it in your system.",
|
|
17204
17224
|
options: this.options
|
|
@@ -19031,6 +19051,7 @@ var __webpack_exports__ = {};
|
|
|
19031
19051
|
else if (params.exc.message) this.options.logger.error(params.exc.message);
|
|
19032
19052
|
} else this.options.logger.error(params.exc);
|
|
19033
19053
|
if (this.options.displayErrors && params.err) this.visuals.error(params.err);
|
|
19054
|
+
else if (this.options.displayErrors && params.exc && params.exc instanceof error_VideomailError) this.visuals.error(params.exc);
|
|
19034
19055
|
else this.visuals.reset();
|
|
19035
19056
|
}
|
|
19036
19057
|
initEvents(playerOnly = false) {
|
package/dist/esm/index.js
CHANGED
|
@@ -3617,7 +3617,7 @@ const constants = {
|
|
|
3617
3617
|
}
|
|
3618
3618
|
};
|
|
3619
3619
|
var package_namespaceObject = {
|
|
3620
|
-
rE: "13.
|
|
3620
|
+
rE: "13.15.0"
|
|
3621
3621
|
};
|
|
3622
3622
|
function isAudioEnabled(options) {
|
|
3623
3623
|
return Boolean(options.audio.enabled);
|
|
@@ -6173,6 +6173,20 @@ const MEDIA_EVENTS = [
|
|
|
6173
6173
|
"volumechange"
|
|
6174
6174
|
];
|
|
6175
6175
|
const mediaEvents = MEDIA_EVENTS;
|
|
6176
|
+
const VIRTUAL_KEYWORDS = [
|
|
6177
|
+
"obs",
|
|
6178
|
+
"virtual",
|
|
6179
|
+
"manycam",
|
|
6180
|
+
"vcam",
|
|
6181
|
+
"splitcam",
|
|
6182
|
+
"droidcam"
|
|
6183
|
+
];
|
|
6184
|
+
function isVirtualCamera(videoTrack) {
|
|
6185
|
+
const capabilities = videoTrack.getCapabilities();
|
|
6186
|
+
if (!capabilities.frameRate) return true;
|
|
6187
|
+
return VIRTUAL_KEYWORDS.some((keyword)=>videoTrack.label.toLowerCase().includes(keyword));
|
|
6188
|
+
}
|
|
6189
|
+
const util_isVirtualCamera = isVirtualCamera;
|
|
6176
6190
|
function userMedia_define_property(obj, key, value) {
|
|
6177
6191
|
if (key in obj) Object.defineProperty(obj, key, {
|
|
6178
6192
|
value: value,
|
|
@@ -6328,12 +6342,18 @@ class UserMedia extends util_Despot {
|
|
|
6328
6342
|
};
|
|
6329
6343
|
try {
|
|
6330
6344
|
const videoTrack = media_getFirstVideoTrack(localMediaStream);
|
|
6331
|
-
if (videoTrack) if (videoTrack.enabled) {
|
|
6345
|
+
if (videoTrack) if (videoTrack.enabled) if (util_isVirtualCamera(videoTrack)) throw error_createError({
|
|
6346
|
+
message: "Virtual cameras are not allowed.",
|
|
6347
|
+
explanation: `Please use a real camera, not "${videoTrack.label}".`,
|
|
6348
|
+
options: this.options
|
|
6349
|
+
});
|
|
6350
|
+
else {
|
|
6332
6351
|
let description = "";
|
|
6333
|
-
if (videoTrack.label
|
|
6352
|
+
if (videoTrack.label.length > 0) description = description.concat(videoTrack.label);
|
|
6334
6353
|
description = description.concat(` with enabled=${videoTrack.enabled}, muted=${videoTrack.muted}, readyState=${videoTrack.readyState}`);
|
|
6335
6354
|
this.options.logger.debug(`UserMedia: ${videoTrack.kind} detected. ${description}`);
|
|
6336
|
-
}
|
|
6355
|
+
}
|
|
6356
|
+
else throw error_createError({
|
|
6337
6357
|
message: "Webcam is disabled",
|
|
6338
6358
|
explanation: "The video track seems to be disabled. Enable it in your system.",
|
|
6339
6359
|
options: this.options
|
|
@@ -8093,6 +8113,7 @@ class Container extends util_Despot {
|
|
|
8093
8113
|
else if (params.exc.message) this.options.logger.error(params.exc.message);
|
|
8094
8114
|
} else this.options.logger.error(params.exc);
|
|
8095
8115
|
if (this.options.displayErrors && params.err) this.visuals.error(params.err);
|
|
8116
|
+
else if (this.options.displayErrors && params.exc && params.exc instanceof error_VideomailError) this.visuals.error(params.exc);
|
|
8096
8117
|
else this.visuals.reset();
|
|
8097
8118
|
}
|
|
8098
8119
|
initEvents(playerOnly = false) {
|
|
@@ -67,6 +67,7 @@ declare class Form extends Despot {
|
|
|
67
67
|
dateCreatedServerPretty?: string;
|
|
68
68
|
dateUpdated?: number;
|
|
69
69
|
dateUpdatedServerPretty?: string;
|
|
70
|
+
expired?: boolean;
|
|
70
71
|
expiresAfter?: number;
|
|
71
72
|
expiresAfterIso?: string;
|
|
72
73
|
expiresAfterServerPretty?: string;
|
|
@@ -251,6 +252,7 @@ declare class Form extends Despot {
|
|
|
251
252
|
dateCreatedServerPretty?: string;
|
|
252
253
|
dateUpdated?: number;
|
|
253
254
|
dateUpdatedServerPretty?: string;
|
|
255
|
+
expired?: boolean;
|
|
254
256
|
expiresAfter?: number;
|
|
255
257
|
expiresAfterIso?: string;
|
|
256
258
|
expiresAfterServerPretty?: string;
|
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: "13.
|
|
10885
|
+
rE: "13.15.0"
|
|
10886
10886
|
};
|
|
10887
10887
|
function isAudioEnabled(options) {
|
|
10888
10888
|
return Boolean(options.audio.enabled);
|
|
@@ -16779,6 +16779,20 @@
|
|
|
16779
16779
|
"volumechange"
|
|
16780
16780
|
];
|
|
16781
16781
|
const mediaEvents = MEDIA_EVENTS;
|
|
16782
|
+
const VIRTUAL_KEYWORDS = [
|
|
16783
|
+
"obs",
|
|
16784
|
+
"virtual",
|
|
16785
|
+
"manycam",
|
|
16786
|
+
"vcam",
|
|
16787
|
+
"splitcam",
|
|
16788
|
+
"droidcam"
|
|
16789
|
+
];
|
|
16790
|
+
function isVirtualCamera(videoTrack) {
|
|
16791
|
+
const capabilities = videoTrack.getCapabilities();
|
|
16792
|
+
if (!capabilities.frameRate) return true;
|
|
16793
|
+
return VIRTUAL_KEYWORDS.some((keyword)=>videoTrack.label.toLowerCase().includes(keyword));
|
|
16794
|
+
}
|
|
16795
|
+
const util_isVirtualCamera = isVirtualCamera;
|
|
16782
16796
|
const EVENT_ASCII = "|—O—|";
|
|
16783
16797
|
class UserMedia extends util_Despot {
|
|
16784
16798
|
recorder;
|
|
@@ -16941,12 +16955,18 @@
|
|
|
16941
16955
|
};
|
|
16942
16956
|
try {
|
|
16943
16957
|
const videoTrack = media_getFirstVideoTrack(localMediaStream);
|
|
16944
|
-
if (videoTrack) if (videoTrack.enabled) {
|
|
16958
|
+
if (videoTrack) if (videoTrack.enabled) if (util_isVirtualCamera(videoTrack)) throw error_createError({
|
|
16959
|
+
message: "Virtual cameras are not allowed.",
|
|
16960
|
+
explanation: `Please use a real camera, not "${videoTrack.label}".`,
|
|
16961
|
+
options: this.options
|
|
16962
|
+
});
|
|
16963
|
+
else {
|
|
16945
16964
|
let description = "";
|
|
16946
|
-
if (videoTrack.label
|
|
16965
|
+
if (videoTrack.label.length > 0) description = description.concat(videoTrack.label);
|
|
16947
16966
|
description = description.concat(` with enabled=${videoTrack.enabled}, muted=${videoTrack.muted}, readyState=${videoTrack.readyState}`);
|
|
16948
16967
|
this.options.logger.debug(`UserMedia: ${videoTrack.kind} detected. ${description}`);
|
|
16949
|
-
}
|
|
16968
|
+
}
|
|
16969
|
+
else throw error_createError({
|
|
16950
16970
|
message: "Webcam is disabled",
|
|
16951
16971
|
explanation: "The video track seems to be disabled. Enable it in your system.",
|
|
16952
16972
|
options: this.options
|
|
@@ -18719,6 +18739,7 @@
|
|
|
18719
18739
|
else if (params.exc.message) this.options.logger.error(params.exc.message);
|
|
18720
18740
|
} else this.options.logger.error(params.exc);
|
|
18721
18741
|
if (this.options.displayErrors && params.err) this.visuals.error(params.err);
|
|
18742
|
+
else if (this.options.displayErrors && params.exc && params.exc instanceof error_VideomailError) this.visuals.error(params.exc);
|
|
18722
18743
|
else this.visuals.reset();
|
|
18723
18744
|
}
|
|
18724
18745
|
initEvents(playerOnly = false) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "videomail-client",
|
|
3
|
-
"version": "13.
|
|
3
|
+
"version": "13.15.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",
|
|
@@ -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.16",
|
|
84
84
|
"@rslib/core": "0.23.0",
|
|
85
85
|
"@storybook/addon-a11y": "10.4.6",
|
|
86
86
|
"@storybook/addon-docs": "10.4.6",
|
|
@@ -94,31 +94,31 @@
|
|
|
94
94
|
"@types/ua-parser-js": "0.7.39",
|
|
95
95
|
"@vitest/eslint-plugin": "1.6.20",
|
|
96
96
|
"audit-ci": "7.1.0",
|
|
97
|
-
"chromatic": "17.
|
|
97
|
+
"chromatic": "17.7.2",
|
|
98
98
|
"cross-env": "10.1.0",
|
|
99
|
-
"eslint": "10.
|
|
99
|
+
"eslint": "10.6.0",
|
|
100
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
|
-
"eslint-plugin-import-x": "4.
|
|
104
|
-
"eslint-plugin-package-json": "1.
|
|
105
|
-
"eslint-plugin-regexp": "3.1.
|
|
103
|
+
"eslint-plugin-import-x": "4.17.0",
|
|
104
|
+
"eslint-plugin-package-json": "1.5.0",
|
|
105
|
+
"eslint-plugin-regexp": "3.1.1",
|
|
106
106
|
"eslint-plugin-simple-import-sort": "13.0.0",
|
|
107
|
-
"globals": "17.
|
|
107
|
+
"globals": "17.7.0",
|
|
108
108
|
"jsdom": "29.1.1",
|
|
109
109
|
"msw": "2.14.6",
|
|
110
110
|
"msw-storybook-addon": "2.0.7",
|
|
111
|
-
"prettier": "3.8.
|
|
111
|
+
"prettier": "3.8.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",
|
|
115
115
|
"prettier-plugin-sh": "0.18.1",
|
|
116
|
-
"release-it": "20.2.
|
|
116
|
+
"release-it": "20.2.1",
|
|
117
117
|
"storybook": "10.4.6",
|
|
118
118
|
"storybook-html-rsbuild": "3.3.4",
|
|
119
119
|
"type-fest": "5.7.0",
|
|
120
120
|
"typescript": "6.0.3",
|
|
121
|
-
"typescript-eslint": "8.
|
|
121
|
+
"typescript-eslint": "8.62.0",
|
|
122
122
|
"vitest": "4.1.9"
|
|
123
123
|
},
|
|
124
124
|
"engines": {
|