videomail-client 8.3.3 → 8.3.5
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "videomail-client",
|
|
3
|
-
"version": "8.3.
|
|
3
|
+
"version": "8.3.5",
|
|
4
4
|
"description": "A wicked npm package to record videos directly in the browser, wohooo!",
|
|
5
5
|
"author": "Michael Heuberger <michael.heuberger@binarykitchen.com>",
|
|
6
6
|
"contributors": [
|
|
@@ -32,8 +32,8 @@
|
|
|
32
32
|
"prettier:fix": "prettier --write ./src ./test ./prototype/*.html gulpfile.js"
|
|
33
33
|
},
|
|
34
34
|
"engines": {
|
|
35
|
-
"node": "^20.
|
|
36
|
-
"npm": "^10.
|
|
35
|
+
"node": "^20.16.0",
|
|
36
|
+
"npm": "^10.8.1"
|
|
37
37
|
},
|
|
38
38
|
"keywords": [
|
|
39
39
|
"webcam",
|
|
@@ -115,7 +115,7 @@
|
|
|
115
115
|
"gulp-terser": "2.1.0",
|
|
116
116
|
"minimist": "1.2.8",
|
|
117
117
|
"nib": "1.2.0",
|
|
118
|
-
"postcss": "8.4.
|
|
118
|
+
"postcss": "8.4.41",
|
|
119
119
|
"prettier": "3.3.3",
|
|
120
120
|
"router": "1.3.8",
|
|
121
121
|
"tape": "5.8.1",
|
|
@@ -17502,7 +17502,7 @@ function wrappy (fn, cb) {
|
|
|
17502
17502
|
},{}],116:[function(_dereq_,module,exports){
|
|
17503
17503
|
module.exports={
|
|
17504
17504
|
"name": "videomail-client",
|
|
17505
|
-
"version": "8.3.
|
|
17505
|
+
"version": "8.3.5",
|
|
17506
17506
|
"description": "A wicked npm package to record videos directly in the browser, wohooo!",
|
|
17507
17507
|
"author": "Michael Heuberger <michael.heuberger@binarykitchen.com>",
|
|
17508
17508
|
"contributors": [
|
|
@@ -17534,8 +17534,8 @@ module.exports={
|
|
|
17534
17534
|
"prettier:fix": "prettier --write ./src ./test ./prototype/*.html gulpfile.js"
|
|
17535
17535
|
},
|
|
17536
17536
|
"engines": {
|
|
17537
|
-
"node": "^20.
|
|
17538
|
-
"npm": "^10.
|
|
17537
|
+
"node": "^20.16.0",
|
|
17538
|
+
"npm": "^10.8.1"
|
|
17539
17539
|
},
|
|
17540
17540
|
"keywords": [
|
|
17541
17541
|
"webcam",
|
|
@@ -17617,7 +17617,7 @@ module.exports={
|
|
|
17617
17617
|
"gulp-terser": "2.1.0",
|
|
17618
17618
|
"minimist": "1.2.8",
|
|
17619
17619
|
"nib": "1.2.0",
|
|
17620
|
-
"postcss": "8.4.
|
|
17620
|
+
"postcss": "8.4.41",
|
|
17621
17621
|
"prettier": "3.3.3",
|
|
17622
17622
|
"router": "1.3.8",
|
|
17623
17623
|
"tape": "5.8.1",
|
|
@@ -18523,9 +18523,7 @@ var Browser = function Browser(options) {
|
|
|
18523
18523
|
this.checkRecordingCapabilities = function () {
|
|
18524
18524
|
var err;
|
|
18525
18525
|
if (!isHTTPS) {
|
|
18526
|
-
err = _videomailError.default.create({
|
|
18527
|
-
message: "Sorry, your page is insecure"
|
|
18528
|
-
}, "Please switch to HTTPS to ensure all is encrypted.", options, {
|
|
18526
|
+
err = _videomailError.default.create("Sorry, your page is insecure", "Please switch to HTTPS to ensure all is encrypted.", options, {
|
|
18529
18527
|
classList: [_videomailError.default.BROWSER_PROBLEM]
|
|
18530
18528
|
});
|
|
18531
18529
|
} else if (!okBrowser || !this.canRecord()) {
|
|
@@ -18540,18 +18538,18 @@ var Browser = function Browser(options) {
|
|
|
18540
18538
|
// good to be able to distinguish between two reasons why and what sort of camera it is
|
|
18541
18539
|
if (!okBrowser) {
|
|
18542
18540
|
if (isMobile) {
|
|
18543
|
-
message = "Sorry, your browser is unable to use your mobile camera";
|
|
18541
|
+
message = "Sorry, your browser is unable to use your mobile camera.";
|
|
18544
18542
|
} else {
|
|
18545
|
-
message = "Sorry, your browser is unable to use webcams";
|
|
18543
|
+
message = "Sorry, your browser is unable to use webcams.";
|
|
18546
18544
|
}
|
|
18547
18545
|
} else if (isMobile) {
|
|
18548
18546
|
if (isFacebook) {
|
|
18549
|
-
message = "Sorry, the Facebook app cannot record from your mobile camera";
|
|
18547
|
+
message = "Sorry, the Facebook app cannot record from your mobile camera.";
|
|
18550
18548
|
} else {
|
|
18551
|
-
message = "Sorry, your browser cannot record from your mobile camera";
|
|
18549
|
+
message = "Sorry, your browser cannot record from your mobile camera.";
|
|
18552
18550
|
}
|
|
18553
18551
|
} else {
|
|
18554
|
-
message = "Sorry, your browser cannot record from webcams";
|
|
18552
|
+
message = "Sorry, your browser cannot record from webcams.";
|
|
18555
18553
|
}
|
|
18556
18554
|
if (isBadIOS) {
|
|
18557
18555
|
/*
|
|
@@ -18560,9 +18558,7 @@ var Browser = function Browser(options) {
|
|
|
18560
18558
|
*/
|
|
18561
18559
|
options.reportErrors = false;
|
|
18562
18560
|
}
|
|
18563
|
-
err = _videomailError.default.create({
|
|
18564
|
-
message: message
|
|
18565
|
-
}, getUserMediaWarning(), options, {
|
|
18561
|
+
err = _videomailError.default.create(message, getUserMediaWarning(), options, {
|
|
18566
18562
|
classList: classList
|
|
18567
18563
|
});
|
|
18568
18564
|
}
|
|
@@ -18645,10 +18641,10 @@ var Browser = function Browser(options) {
|
|
|
18645
18641
|
this.getUsefulData = function () {
|
|
18646
18642
|
return {
|
|
18647
18643
|
browser: uaParser.browser,
|
|
18648
|
-
device: uaParser.device,
|
|
18644
|
+
device: uaParser.device.type ? uaParser.device : undefined,
|
|
18649
18645
|
os: uaParser.os,
|
|
18650
18646
|
engine: uaParser.engine,
|
|
18651
|
-
|
|
18647
|
+
cpu: uaParser.cpu
|
|
18652
18648
|
};
|
|
18653
18649
|
};
|
|
18654
18650
|
};
|
|
@@ -19073,6 +19069,7 @@ function _default() {
|
|
|
19073
19069
|
}
|
|
19074
19070
|
|
|
19075
19071
|
},{"@babel/runtime/helpers/interopRequireDefault":3,"classlist.js":20,"request-frame":97}],130:[function(_dereq_,module,exports){
|
|
19072
|
+
(function (global){(function (){
|
|
19076
19073
|
"use strict";
|
|
19077
19074
|
|
|
19078
19075
|
var _interopRequireDefault = _dereq_("@babel/runtime/helpers/interopRequireDefault");
|
|
@@ -19089,11 +19086,19 @@ var _safeJsonStringify = _interopRequireDefault(_dereq_("safe-json-stringify"));
|
|
|
19089
19086
|
|
|
19090
19087
|
var VIDEOMAIL_ERR_NAME = "Videomail Error";
|
|
19091
19088
|
var VideomailError = (0, _createError.default)(Error, VIDEOMAIL_ERR_NAME, {
|
|
19089
|
+
title: undefined,
|
|
19092
19090
|
explanation: undefined,
|
|
19093
19091
|
logLines: undefined,
|
|
19094
|
-
|
|
19095
|
-
|
|
19096
|
-
|
|
19092
|
+
cookie: undefined,
|
|
19093
|
+
location: undefined,
|
|
19094
|
+
err: undefined,
|
|
19095
|
+
browser: undefined,
|
|
19096
|
+
cpu: undefined,
|
|
19097
|
+
device: undefined,
|
|
19098
|
+
engine: undefined,
|
|
19099
|
+
os: undefined,
|
|
19100
|
+
screen: undefined,
|
|
19101
|
+
orientation: undefined
|
|
19097
19102
|
});
|
|
19098
19103
|
|
|
19099
19104
|
// shim pretty to exclude stack always
|
|
@@ -19131,11 +19136,7 @@ VideomailError.create = function (err, explanation, options, parameters) {
|
|
|
19131
19136
|
}
|
|
19132
19137
|
options || (options = {});
|
|
19133
19138
|
parameters || (parameters = {});
|
|
19134
|
-
|
|
19135
|
-
// be super robust
|
|
19136
|
-
var debug = options && options.debug || console.log;
|
|
19137
19139
|
var audioEnabled = options && options.isAudioEnabled && options.isAudioEnabled();
|
|
19138
|
-
debug("VideomailError: create()", err, explanation || "(no explanation set)");
|
|
19139
19140
|
var classList = parameters.classList || [];
|
|
19140
19141
|
|
|
19141
19142
|
/*
|
|
@@ -19146,7 +19147,6 @@ VideomailError.create = function (err, explanation, options, parameters) {
|
|
|
19146
19147
|
var browser = new Browser(options);
|
|
19147
19148
|
var errType;
|
|
19148
19149
|
var message;
|
|
19149
|
-
var stack;
|
|
19150
19150
|
|
|
19151
19151
|
// whole code is ugly because all browsers behave so differently :(
|
|
19152
19152
|
|
|
@@ -19170,8 +19170,8 @@ VideomailError.create = function (err, explanation, options, parameters) {
|
|
|
19170
19170
|
}
|
|
19171
19171
|
} else if (err.constructor && err.constructor.name === VideomailError.OVERCONSTRAINED) {
|
|
19172
19172
|
errType = VideomailError.OVERCONSTRAINED;
|
|
19173
|
-
} else if (err.
|
|
19174
|
-
errType = err.
|
|
19173
|
+
} else if (err.explanation === VideomailError.STARTING_FAILED) {
|
|
19174
|
+
errType = err.explanation;
|
|
19175
19175
|
} else if (err.name) {
|
|
19176
19176
|
errType = err.name;
|
|
19177
19177
|
} else if (err.type === "error" && err.target.bufferedAmount === 0) {
|
|
@@ -19182,11 +19182,6 @@ VideomailError.create = function (err, explanation, options, parameters) {
|
|
|
19182
19182
|
} else {
|
|
19183
19183
|
errType = err;
|
|
19184
19184
|
}
|
|
19185
|
-
if (err && err.stack) {
|
|
19186
|
-
stack = err.stack;
|
|
19187
|
-
} else {
|
|
19188
|
-
stack = new Error().stack;
|
|
19189
|
-
}
|
|
19190
19185
|
switch (errType) {
|
|
19191
19186
|
case VideomailError.SECURITY_ERROR:
|
|
19192
19187
|
message = "The operation was insecure";
|
|
@@ -19212,8 +19207,8 @@ VideomailError.create = function (err, explanation, options, parameters) {
|
|
|
19212
19207
|
case "SourceUnavailableError":
|
|
19213
19208
|
message = "Source of your webcam cannot be accessed";
|
|
19214
19209
|
explanation = "Probably it is locked from another process or has a hardware error.";
|
|
19215
|
-
if (err.
|
|
19216
|
-
err.
|
|
19210
|
+
if (err.explanation) {
|
|
19211
|
+
err.explanation += " Details: ".concat(err.explanation);
|
|
19217
19212
|
}
|
|
19218
19213
|
break;
|
|
19219
19214
|
case VideomailError.NOT_FOUND_ERROR:
|
|
@@ -19258,7 +19253,7 @@ VideomailError.create = function (err, explanation, options, parameters) {
|
|
|
19258
19253
|
break;
|
|
19259
19254
|
case VideomailError.STARTING_FAILED:
|
|
19260
19255
|
message = "Starting video failed";
|
|
19261
|
-
explanation = "Most likely this happens when the
|
|
19256
|
+
explanation = "Most likely this happens when the webcam is already active in another browser.";
|
|
19262
19257
|
classList.push(VideomailError.WEBCAM_PROBLEM);
|
|
19263
19258
|
break;
|
|
19264
19259
|
case "DevicesNotFoundError":
|
|
@@ -19329,8 +19324,8 @@ VideomailError.create = function (err, explanation, options, parameters) {
|
|
|
19329
19324
|
* error objects can be prettified to undefined sometimes
|
|
19330
19325
|
*/
|
|
19331
19326
|
if (!explanation && originalExplanation) {
|
|
19332
|
-
if (originalExplanation.
|
|
19333
|
-
explanation = originalExplanation.
|
|
19327
|
+
if (originalExplanation.explanation) {
|
|
19328
|
+
explanation = originalExplanation.explanation;
|
|
19334
19329
|
} else {
|
|
19335
19330
|
// tried toString before but nah
|
|
19336
19331
|
explanation = "Inspected: ".concat((0, _safeJsonStringify.default)(originalExplanation));
|
|
@@ -19354,7 +19349,7 @@ VideomailError.create = function (err, explanation, options, parameters) {
|
|
|
19354
19349
|
var details = pretty(err.details);
|
|
19355
19350
|
if (!explanation) {
|
|
19356
19351
|
explanation = details;
|
|
19357
|
-
} else {
|
|
19352
|
+
} else if (details) {
|
|
19358
19353
|
explanation += ";<br/>".concat(details);
|
|
19359
19354
|
}
|
|
19360
19355
|
}
|
|
@@ -19384,25 +19379,26 @@ VideomailError.create = function (err, explanation, options, parameters) {
|
|
|
19384
19379
|
if (options.logger && options.logger.getLines) {
|
|
19385
19380
|
logLines = options.logger.getLines();
|
|
19386
19381
|
}
|
|
19387
|
-
|
|
19388
|
-
|
|
19389
|
-
|
|
19390
|
-
|
|
19391
|
-
var
|
|
19392
|
-
if (err) {
|
|
19393
|
-
errCode = "code=".concat(err.code ? err.code : "undefined");
|
|
19394
|
-
errCode += ", type=".concat(err.type ? err.type : "undefined");
|
|
19395
|
-
errCode += ", name=".concat(err.name ? err.name : "undefined");
|
|
19396
|
-
errCode += ", message=".concat(err.message ? err.message : "undefined");
|
|
19397
|
-
}
|
|
19382
|
+
|
|
19383
|
+
// be super robust
|
|
19384
|
+
var debug = options && options.debug || console.log;
|
|
19385
|
+
debug("VideomailError: create()", message, explanation || "(no explanation set)");
|
|
19386
|
+
var usefulClientData = browser.getUsefulData();
|
|
19398
19387
|
var videomailError = new VideomailError(message, {
|
|
19388
|
+
title: "videomail-client error",
|
|
19399
19389
|
explanation: explanation,
|
|
19400
19390
|
logLines: logLines,
|
|
19401
|
-
|
|
19402
|
-
|
|
19391
|
+
location: window.location.href,
|
|
19392
|
+
cookie: global.document.cookie.split("; ").join(",\n"),
|
|
19403
19393
|
siteName: options.siteName,
|
|
19404
|
-
|
|
19405
|
-
|
|
19394
|
+
err: err instanceof Error ? err : undefined,
|
|
19395
|
+
browser: usefulClientData.browser,
|
|
19396
|
+
cpu: usefulClientData.cpu,
|
|
19397
|
+
device: usefulClientData.device,
|
|
19398
|
+
engine: usefulClientData.engine,
|
|
19399
|
+
os: usefulClientData.os,
|
|
19400
|
+
screen: [screen.width, screen.height, screen.colorDepth].join("×"),
|
|
19401
|
+
orientation: typeof screen.orientation === "string" ? screen.orientation : screen.orientation.type.toString()
|
|
19406
19402
|
});
|
|
19407
19403
|
var resource;
|
|
19408
19404
|
var reportErrors = false;
|
|
@@ -19449,6 +19445,7 @@ VideomailError.create = function (err, explanation, options, parameters) {
|
|
|
19449
19445
|
};
|
|
19450
19446
|
var _default = exports.default = VideomailError;
|
|
19451
19447
|
|
|
19448
|
+
}).call(this)}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
|
|
19452
19449
|
},{"./../resource":121,"./browser":123,"./pretty":128,"@babel/runtime/helpers/interopRequireDefault":3,"@babel/runtime/helpers/typeof":7,"create-error":24,"safe-json-stringify":99}],131:[function(_dereq_,module,exports){
|
|
19453
19450
|
"use strict";
|
|
19454
19451
|
|
|
@@ -19811,11 +19808,13 @@ var Buttons = function Buttons(container, options) {
|
|
|
19811
19808
|
hide(resumeButton);
|
|
19812
19809
|
}
|
|
19813
19810
|
function onEnablingAudio() {
|
|
19811
|
+
debug("Buttons: onEnablingAudio()");
|
|
19814
19812
|
disable(recordButton);
|
|
19815
19813
|
disable(audioOnRadioPair);
|
|
19816
19814
|
disable(audioOffRadioPair);
|
|
19817
19815
|
}
|
|
19818
19816
|
function onDisablingAudio() {
|
|
19817
|
+
debug("Buttons: onDisablingAudio()");
|
|
19819
19818
|
disable(recordButton);
|
|
19820
19819
|
disable(audioOnRadioPair);
|
|
19821
19820
|
disable(audioOffRadioPair);
|
|
@@ -20342,7 +20341,9 @@ var Container = function Container(options) {
|
|
|
20342
20341
|
if (self.isReplayShown()) {
|
|
20343
20342
|
self.emit(_events.default.PREVIEW);
|
|
20344
20343
|
} else {
|
|
20345
|
-
self.emit(_events.default.FORM_READY,
|
|
20344
|
+
self.emit(_events.default.FORM_READY, {
|
|
20345
|
+
paused: paused
|
|
20346
|
+
});
|
|
20346
20347
|
}
|
|
20347
20348
|
}
|
|
20348
20349
|
}
|
|
@@ -21104,7 +21105,7 @@ var Visuals = function Visuals(container, options) {
|
|
|
21104
21105
|
if (!blockingOptions.hideForm && !options.adjustFormOnBrowserError) {
|
|
21105
21106
|
/*
|
|
21106
21107
|
* do nothing, user still can enter form inputs
|
|
21107
|
-
* can be useful when you are on i.E.
|
|
21108
|
+
* can be useful when you are on i.E. Seeflow's contact page and
|
|
21108
21109
|
* still want to tick off the webcam option
|
|
21109
21110
|
*/
|
|
21110
21111
|
} else {
|
|
@@ -21960,7 +21961,7 @@ var Notifier = function Notifier(visuals, options) {
|
|
|
21960
21961
|
var message = err.message ? err.message.toString() : err.toString();
|
|
21961
21962
|
var explanation = err.explanation ? err.explanation.toString() : null;
|
|
21962
21963
|
if (!message) {
|
|
21963
|
-
options.debug("Weird empty message generated for error", err);
|
|
21964
|
+
options.debug("Weird empty error message generated for error", err);
|
|
21964
21965
|
}
|
|
21965
21966
|
self.notify(message, explanation, {
|
|
21966
21967
|
blocking: true,
|
|
@@ -22631,7 +22632,7 @@ var Recorder = function Recorder(visuals, replay) {
|
|
|
22631
22632
|
preview(command.args);
|
|
22632
22633
|
break;
|
|
22633
22634
|
case "error":
|
|
22634
|
-
this.emit(_events.default.ERROR, _videomailError.default.create("Oh no, server error!", command.args.err.toString() || "(No
|
|
22635
|
+
this.emit(_events.default.ERROR, _videomailError.default.create("Oh no, server error!", command.args.err.toString() || "(No message given)", options));
|
|
22635
22636
|
break;
|
|
22636
22637
|
case "confirmFrame":
|
|
22637
22638
|
updateFrameProgress(command.args);
|
|
@@ -23455,7 +23456,9 @@ var Replay = function Replay(parentElement, options) {
|
|
|
23455
23456
|
*/
|
|
23456
23457
|
setTimeout(function () {
|
|
23457
23458
|
try {
|
|
23458
|
-
|
|
23459
|
+
if (replayElement) {
|
|
23460
|
+
replayElement.pause();
|
|
23461
|
+
}
|
|
23459
23462
|
} catch (exc) {
|
|
23460
23463
|
// just ignore, see https://github.com/binarykitchen/videomail.io/issues/386
|
|
23461
23464
|
options.logger.warn(exc);
|