videomail-client 9.2.20 → 9.2.22
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.
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
name: Test Runner for videomail-client
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- develop
|
|
7
|
+
|
|
8
|
+
pull_request:
|
|
9
|
+
branches:
|
|
10
|
+
- develop
|
|
11
|
+
|
|
12
|
+
jobs:
|
|
13
|
+
build-test-lint-check:
|
|
14
|
+
name: Build, Test, Prettier, Lint and Check
|
|
15
|
+
runs-on: ubuntu-latest
|
|
16
|
+
|
|
17
|
+
steps:
|
|
18
|
+
- name: Checkout code
|
|
19
|
+
uses: actions/checkout@v4
|
|
20
|
+
|
|
21
|
+
- name: Install Node.js via nvm
|
|
22
|
+
shell: bash --login {0}
|
|
23
|
+
run: |
|
|
24
|
+
nvm install --no-progress
|
|
25
|
+
echo "$(dirname $(nvm which node))" >> $GITHUB_PATH
|
|
26
|
+
|
|
27
|
+
- name: Install npm dependencies
|
|
28
|
+
run: npm ci
|
|
29
|
+
|
|
30
|
+
- name: Build assets
|
|
31
|
+
run: npm run build
|
|
32
|
+
|
|
33
|
+
# Electron issues, to fix later:
|
|
34
|
+
# https://github.com/marketplace/actions/run-with-xvfb
|
|
35
|
+
# - name: Run tests
|
|
36
|
+
# run: npm run test
|
|
37
|
+
|
|
38
|
+
- name: Run prettier
|
|
39
|
+
run: npm run prettier
|
|
40
|
+
|
|
41
|
+
- name: Run linter
|
|
42
|
+
run: npm run lint
|
package/.vscode/settings.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "videomail-client",
|
|
3
|
-
"version": "9.2.
|
|
3
|
+
"version": "9.2.22",
|
|
4
4
|
"description": "A wicked npm package to record videos directly in the browser, wohooo!",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"webcam",
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"defined": "1.0.1",
|
|
55
55
|
"despot": "2.0.0",
|
|
56
56
|
"document-visibility": "1.0.1",
|
|
57
|
-
"filesize": "10.1.
|
|
57
|
+
"filesize": "10.1.6",
|
|
58
58
|
"format-util": "1.0.5",
|
|
59
59
|
"get-form-data": "3.0.0",
|
|
60
60
|
"hidden": "1.1.1",
|
|
@@ -86,7 +86,7 @@
|
|
|
86
86
|
"del": "6.1.1",
|
|
87
87
|
"eslint": "8.57.0",
|
|
88
88
|
"eslint-config-prettier": "9.1.0",
|
|
89
|
-
"eslint-plugin-import": "2.
|
|
89
|
+
"eslint-plugin-import": "2.30.0",
|
|
90
90
|
"eslint-plugin-node": "11.1.0",
|
|
91
91
|
"eslint-plugin-promise": "6.2.0",
|
|
92
92
|
"fancy-log": "2.0.0",
|
|
@@ -108,7 +108,7 @@
|
|
|
108
108
|
"gulp-terser": "2.1.0",
|
|
109
109
|
"minimist": "1.2.8",
|
|
110
110
|
"nib": "1.2.0",
|
|
111
|
-
"postcss": "8.4.
|
|
111
|
+
"postcss": "8.4.45",
|
|
112
112
|
"prettier": "3.3.3",
|
|
113
113
|
"prettier-plugin-curly": "0.2.2",
|
|
114
114
|
"prettier-plugin-organize-imports": "4.0.0",
|
|
@@ -4732,7 +4732,7 @@ function replaceGetterValues (replacer) {
|
|
|
4732
4732
|
*
|
|
4733
4733
|
* @copyright 2024 Jason Mulligan <jason.mulligan@avoidwork.com>
|
|
4734
4734
|
* @license BSD-3-Clause
|
|
4735
|
-
* @version 10.1.
|
|
4735
|
+
* @version 10.1.6
|
|
4736
4736
|
*/
|
|
4737
4737
|
'use strict';
|
|
4738
4738
|
|
|
@@ -4900,9 +4900,10 @@ function filesize (arg, {
|
|
|
4900
4900
|
result[0] = result[0].toString().replace(PERIOD, separator);
|
|
4901
4901
|
}
|
|
4902
4902
|
|
|
4903
|
-
if (pad &&
|
|
4904
|
-
const
|
|
4905
|
-
|
|
4903
|
+
if (pad && round > 0) {
|
|
4904
|
+
const i = result[0].toString(),
|
|
4905
|
+
x = separator || ((i.match(/(\D)/g) || []).pop() || PERIOD),
|
|
4906
|
+
tmp = i.toString().split(x),
|
|
4906
4907
|
s = tmp[1] || EMPTY,
|
|
4907
4908
|
l = s.length,
|
|
4908
4909
|
n = round - l;
|
|
@@ -17267,7 +17268,7 @@ function wrappy (fn, cb) {
|
|
|
17267
17268
|
},{}],116:[function(_dereq_,module,exports){
|
|
17268
17269
|
module.exports={
|
|
17269
17270
|
"name": "videomail-client",
|
|
17270
|
-
"version": "9.2.
|
|
17271
|
+
"version": "9.2.22",
|
|
17271
17272
|
"description": "A wicked npm package to record videos directly in the browser, wohooo!",
|
|
17272
17273
|
"keywords": [
|
|
17273
17274
|
"webcam",
|
|
@@ -17321,7 +17322,7 @@ module.exports={
|
|
|
17321
17322
|
"defined": "1.0.1",
|
|
17322
17323
|
"despot": "2.0.0",
|
|
17323
17324
|
"document-visibility": "1.0.1",
|
|
17324
|
-
"filesize": "10.1.
|
|
17325
|
+
"filesize": "10.1.6",
|
|
17325
17326
|
"format-util": "1.0.5",
|
|
17326
17327
|
"get-form-data": "3.0.0",
|
|
17327
17328
|
"hidden": "1.1.1",
|
|
@@ -17353,7 +17354,7 @@ module.exports={
|
|
|
17353
17354
|
"del": "6.1.1",
|
|
17354
17355
|
"eslint": "8.57.0",
|
|
17355
17356
|
"eslint-config-prettier": "9.1.0",
|
|
17356
|
-
"eslint-plugin-import": "2.
|
|
17357
|
+
"eslint-plugin-import": "2.30.0",
|
|
17357
17358
|
"eslint-plugin-node": "11.1.0",
|
|
17358
17359
|
"eslint-plugin-promise": "6.2.0",
|
|
17359
17360
|
"fancy-log": "2.0.0",
|
|
@@ -17375,7 +17376,7 @@ module.exports={
|
|
|
17375
17376
|
"gulp-terser": "2.1.0",
|
|
17376
17377
|
"minimist": "1.2.8",
|
|
17377
17378
|
"nib": "1.2.0",
|
|
17378
|
-
"postcss": "8.4.
|
|
17379
|
+
"postcss": "8.4.45",
|
|
17379
17380
|
"prettier": "3.3.3",
|
|
17380
17381
|
"prettier-plugin-curly": "0.2.2",
|
|
17381
17382
|
"prettier-plugin-organize-imports": "4.0.0",
|
|
@@ -17836,7 +17837,7 @@ var options = {
|
|
|
17836
17837
|
// in milliseconds, increase if you want user give more time to enable webcam
|
|
17837
17838
|
connection: 1e4,
|
|
17838
17839
|
// in seconds, increase if api is slow
|
|
17839
|
-
pingInterval:
|
|
17840
|
+
pingInterval: 30e3 // in milliseconds, keeps web stream (connection) alive when pausing
|
|
17840
17841
|
},
|
|
17841
17842
|
loadUserMediaOnRecord: false,
|
|
17842
17843
|
// when true, user media is loaded only when record button is pressed
|
|
@@ -17922,6 +17923,7 @@ function _default(options) {
|
|
|
17922
17923
|
var originalError = res.body.error;
|
|
17923
17924
|
var packedError = new Error();
|
|
17924
17925
|
setProperty(packedError, "name", originalError.name);
|
|
17926
|
+
setProperty(packedError, "type", originalError.type);
|
|
17925
17927
|
setProperty(packedError, "message", originalError.message || res.statusText);
|
|
17926
17928
|
setProperty(packedError, "cause", originalError.cause);
|
|
17927
17929
|
setProperty(packedError, "status", originalError.status);
|
|
@@ -18937,6 +18939,7 @@ VideomailError.INVALID_STATE_ERROR = "InvalidStateError";
|
|
|
18937
18939
|
|
|
18938
18940
|
// static function to convert an error into a videomail error
|
|
18939
18941
|
VideomailError.create = function (err, explanation, options, parameters) {
|
|
18942
|
+
var _err$constructor;
|
|
18940
18943
|
if (err && err.name === VIDEOMAIL_ERR_NAME) {
|
|
18941
18944
|
return err;
|
|
18942
18945
|
}
|
|
@@ -19086,7 +19089,7 @@ VideomailError.create = function (err, explanation, options, parameters) {
|
|
|
19086
19089
|
switch (err.code) {
|
|
19087
19090
|
case 8:
|
|
19088
19091
|
message = "Requested webcam not found";
|
|
19089
|
-
explanation = "A webcam is needed but could not be found
|
|
19092
|
+
explanation = "A webcam is needed but could not be found";
|
|
19090
19093
|
classList.push(VideomailError.WEBCAM_PROBLEM);
|
|
19091
19094
|
break;
|
|
19092
19095
|
case 9:
|
|
@@ -19146,7 +19149,7 @@ VideomailError.create = function (err, explanation, options, parameters) {
|
|
|
19146
19149
|
message = err;
|
|
19147
19150
|
} else {
|
|
19148
19151
|
if (err.message) {
|
|
19149
|
-
message = pretty(err.message);
|
|
19152
|
+
message = pretty(err.message) + " (pretty)";
|
|
19150
19153
|
}
|
|
19151
19154
|
if (err.explanation) {
|
|
19152
19155
|
if (!explanation) {
|
|
@@ -19169,7 +19172,7 @@ VideomailError.create = function (err, explanation, options, parameters) {
|
|
|
19169
19172
|
// for weird, undefined cases
|
|
19170
19173
|
if (!message) {
|
|
19171
19174
|
if (errType) {
|
|
19172
|
-
message = errType;
|
|
19175
|
+
message = errType + " (weird)";
|
|
19173
19176
|
}
|
|
19174
19177
|
if (!explanation && err) {
|
|
19175
19178
|
explanation = pretty(err, {
|
|
@@ -19209,7 +19212,14 @@ VideomailError.create = function (err, explanation, options, parameters) {
|
|
|
19209
19212
|
location: window.location.href,
|
|
19210
19213
|
cookie: cookies.length > 0 ? cookies.join(",\n") : undefined,
|
|
19211
19214
|
screen: [screen.width, screen.height, screen.colorDepth].join("×"),
|
|
19212
|
-
orientation: typeof screen.orientation === "string" ? screen.orientation : screen.orientation.type.toString()
|
|
19215
|
+
orientation: typeof screen.orientation === "string" ? screen.orientation : screen.orientation.type.toString(),
|
|
19216
|
+
// Consider removing later once sorted
|
|
19217
|
+
errNo: err === null || err === void 0 ? void 0 : err.errno,
|
|
19218
|
+
errCode: err === null || err === void 0 ? void 0 : err.code,
|
|
19219
|
+
errName: err === null || err === void 0 ? void 0 : err.name,
|
|
19220
|
+
errType: err === null || err === void 0 ? void 0 : err.type,
|
|
19221
|
+
errConstraint: err === null || err === void 0 ? void 0 : err.constraint,
|
|
19222
|
+
errConstructorName: err === null || err === void 0 || (_err$constructor = err.constructor) === null || _err$constructor === void 0 ? void 0 : _err$constructor.name
|
|
19213
19223
|
};
|
|
19214
19224
|
var videomailError = new VideomailError(err instanceof Error ? err : message, errData);
|
|
19215
19225
|
var resource;
|
|
@@ -22218,7 +22228,7 @@ var Recorder = function Recorder(visuals, replay) {
|
|
|
22218
22228
|
function initSocket(cb) {
|
|
22219
22229
|
if (!connected) {
|
|
22220
22230
|
connecting = true;
|
|
22221
|
-
debug("Recorder:
|
|
22231
|
+
debug("Recorder: initializing web socket to %s", options.socketUrl);
|
|
22222
22232
|
self.emit(_events.default.CONNECTING);
|
|
22223
22233
|
|
|
22224
22234
|
// https://github.com/maxogden/websocket-stream#binary-sockets
|
|
@@ -22307,29 +22317,44 @@ var Recorder = function Recorder(visuals, replay) {
|
|
|
22307
22317
|
});
|
|
22308
22318
|
stream.on("error", function (err) {
|
|
22309
22319
|
debug("".concat(PIPE_SYMBOL, "Stream *error* event emitted: ").concat(err.message));
|
|
22310
|
-
connecting = connected = false;
|
|
22311
|
-
var videomailError;
|
|
22312
|
-
if (browser.isIOS()) {
|
|
22313
|
-
/*
|
|
22314
|
-
* setting custom text since that err object isn't really an error
|
|
22315
|
-
* on iPhones when locked, and unlocked, this err is actually
|
|
22316
|
-
* an event object with stuff we can't use at all (an external bug)
|
|
22317
|
-
*/
|
|
22318
|
-
videomailError = _videomailError.default.create(err, "iPhones cannot maintain a live connection for too long. Original error message is: ".concat(err.toString()), options);
|
|
22319
22320
|
|
|
22320
|
-
|
|
22321
|
-
|
|
22322
|
-
|
|
22323
|
-
|
|
22324
|
-
|
|
22325
|
-
|
|
22326
|
-
|
|
22327
|
-
|
|
22328
|
-
|
|
22329
|
-
|
|
22330
|
-
|
|
22331
|
-
|
|
22332
|
-
|
|
22321
|
+
// OLD CODE, COMMENTED OUT TEMPORARILY FOR INVESTIGATIONS
|
|
22322
|
+
// IT SHOULD RECONNECT INSTEAD OF CLOSING THE CONNECTION
|
|
22323
|
+
|
|
22324
|
+
// connecting = connected = false;
|
|
22325
|
+
|
|
22326
|
+
// let videomailError;
|
|
22327
|
+
|
|
22328
|
+
// if (browser.isIOS()) {
|
|
22329
|
+
// /*
|
|
22330
|
+
// * setting custom text since that err object isn't really an error
|
|
22331
|
+
// * on iPhones when locked, and unlocked, this err is actually
|
|
22332
|
+
// * an event object with stuff we can't use at all (an external bug)
|
|
22333
|
+
// */
|
|
22334
|
+
// videomailError = VideomailError.create(
|
|
22335
|
+
// err,
|
|
22336
|
+
// `iPhones cannot maintain a live connection for too long. Original error message is: ${err.toString()}`,
|
|
22337
|
+
// options,
|
|
22338
|
+
// );
|
|
22339
|
+
|
|
22340
|
+
// /*
|
|
22341
|
+
// * Changed to the above temporarily for better investigations
|
|
22342
|
+
// * videomailError = VideomailError.create(
|
|
22343
|
+
// * 'Sorry, connection has timed out',
|
|
22344
|
+
// * 'iPhones cannot maintain a live connection for too long,
|
|
22345
|
+
// * options
|
|
22346
|
+
// * )
|
|
22347
|
+
// */
|
|
22348
|
+
// } else {
|
|
22349
|
+
// // or else it could be a poor wifi connection...
|
|
22350
|
+
// videomailError = VideomailError.create(
|
|
22351
|
+
// "Data exchange interrupted",
|
|
22352
|
+
// "Please check your network connection and reload",
|
|
22353
|
+
// options,
|
|
22354
|
+
// );
|
|
22355
|
+
// }
|
|
22356
|
+
|
|
22357
|
+
// self.emit(Events.ERROR, videomailError);
|
|
22333
22358
|
});
|
|
22334
22359
|
|
|
22335
22360
|
// just experimental
|
|
@@ -22377,12 +22402,10 @@ var Recorder = function Recorder(visuals, replay) {
|
|
|
22377
22402
|
*/
|
|
22378
22403
|
return connected && (isNotifying() || !isHidden() || blocking);
|
|
22379
22404
|
}
|
|
22380
|
-
function userMediaErrorCallback(err
|
|
22405
|
+
function userMediaErrorCallback(err) {
|
|
22381
22406
|
userMediaLoading = false;
|
|
22382
22407
|
clearUserMediaTimeout();
|
|
22383
|
-
debug("Recorder: userMediaErrorCallback()
|
|
22384
|
-
// added recently in the hope to investigate weird webcam issues
|
|
22385
|
-
", extraA arguments:", extraA ? extraA.toString() : undefined, ", extraB arguments:", extraB ? extraB.toString() : undefined);
|
|
22408
|
+
debug("Recorder: userMediaErrorCallback(), name: ".concat(err.name, ", message: ").concat(err.message, " and Webcam characteristics: ").concat((0, _safeJsonStringify.default)(userMedia.getCharacteristics())));
|
|
22386
22409
|
var errorListeners = self.listeners(_events.default.ERROR);
|
|
22387
22410
|
if (errorListeners && errorListeners.length) {
|
|
22388
22411
|
if (err.name !== _videomailError.default.MEDIA_DEVICE_NOT_SUPPORTED) {
|
|
@@ -22690,8 +22713,8 @@ var Recorder = function Recorder(visuals, replay) {
|
|
|
22690
22713
|
this.reset();
|
|
22691
22714
|
writeCommand("back", cb);
|
|
22692
22715
|
};
|
|
22693
|
-
function
|
|
22694
|
-
debug("Recorder:
|
|
22716
|
+
function reInitializeAudio() {
|
|
22717
|
+
debug("Recorder: reInitializeAudio()");
|
|
22695
22718
|
clearUserMediaTimeout();
|
|
22696
22719
|
|
|
22697
22720
|
// important to free memory
|
|
@@ -22973,9 +22996,9 @@ var Recorder = function Recorder(visuals, replay) {
|
|
|
22973
22996
|
}).on(_events.default.LOADED_META_DATA, function () {
|
|
22974
22997
|
correctDimensions();
|
|
22975
22998
|
}).on(_events.default.DISABLING_AUDIO, function () {
|
|
22976
|
-
|
|
22999
|
+
reInitializeAudio();
|
|
22977
23000
|
}).on(_events.default.ENABLING_AUDIO, function () {
|
|
22978
|
-
|
|
23001
|
+
reInitializeAudio();
|
|
22979
23002
|
}).on(_events.default.INVISIBLE, function () {
|
|
22980
23003
|
loopWithTimeouts();
|
|
22981
23004
|
}).on(_events.default.VISIBLE, function () {
|