videomail-client 9.2.20 → 9.2.21
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/.vscode/settings.json
CHANGED
package/package.json
CHANGED
|
@@ -17267,7 +17267,7 @@ function wrappy (fn, cb) {
|
|
|
17267
17267
|
},{}],116:[function(_dereq_,module,exports){
|
|
17268
17268
|
module.exports={
|
|
17269
17269
|
"name": "videomail-client",
|
|
17270
|
-
"version": "9.2.
|
|
17270
|
+
"version": "9.2.21",
|
|
17271
17271
|
"description": "A wicked npm package to record videos directly in the browser, wohooo!",
|
|
17272
17272
|
"keywords": [
|
|
17273
17273
|
"webcam",
|
|
@@ -17836,7 +17836,7 @@ var options = {
|
|
|
17836
17836
|
// in milliseconds, increase if you want user give more time to enable webcam
|
|
17837
17837
|
connection: 1e4,
|
|
17838
17838
|
// in seconds, increase if api is slow
|
|
17839
|
-
pingInterval:
|
|
17839
|
+
pingInterval: 30e3 // in milliseconds, keeps web stream (connection) alive when pausing
|
|
17840
17840
|
},
|
|
17841
17841
|
loadUserMediaOnRecord: false,
|
|
17842
17842
|
// when true, user media is loaded only when record button is pressed
|
|
@@ -17922,6 +17922,7 @@ function _default(options) {
|
|
|
17922
17922
|
var originalError = res.body.error;
|
|
17923
17923
|
var packedError = new Error();
|
|
17924
17924
|
setProperty(packedError, "name", originalError.name);
|
|
17925
|
+
setProperty(packedError, "type", originalError.type);
|
|
17925
17926
|
setProperty(packedError, "message", originalError.message || res.statusText);
|
|
17926
17927
|
setProperty(packedError, "cause", originalError.cause);
|
|
17927
17928
|
setProperty(packedError, "status", originalError.status);
|
|
@@ -18937,6 +18938,7 @@ VideomailError.INVALID_STATE_ERROR = "InvalidStateError";
|
|
|
18937
18938
|
|
|
18938
18939
|
// static function to convert an error into a videomail error
|
|
18939
18940
|
VideomailError.create = function (err, explanation, options, parameters) {
|
|
18941
|
+
var _err$constructor;
|
|
18940
18942
|
if (err && err.name === VIDEOMAIL_ERR_NAME) {
|
|
18941
18943
|
return err;
|
|
18942
18944
|
}
|
|
@@ -19086,7 +19088,7 @@ VideomailError.create = function (err, explanation, options, parameters) {
|
|
|
19086
19088
|
switch (err.code) {
|
|
19087
19089
|
case 8:
|
|
19088
19090
|
message = "Requested webcam not found";
|
|
19089
|
-
explanation = "A webcam is needed but could not be found
|
|
19091
|
+
explanation = "A webcam is needed but could not be found";
|
|
19090
19092
|
classList.push(VideomailError.WEBCAM_PROBLEM);
|
|
19091
19093
|
break;
|
|
19092
19094
|
case 9:
|
|
@@ -19143,10 +19145,10 @@ VideomailError.create = function (err, explanation, options, parameters) {
|
|
|
19143
19145
|
}
|
|
19144
19146
|
if (err) {
|
|
19145
19147
|
if (typeof err === "string") {
|
|
19146
|
-
message = err;
|
|
19148
|
+
message = "".concat(err, " (default)");
|
|
19147
19149
|
} else {
|
|
19148
19150
|
if (err.message) {
|
|
19149
|
-
message = pretty(err.message);
|
|
19151
|
+
message = pretty(err.message) + " (pretty)";
|
|
19150
19152
|
}
|
|
19151
19153
|
if (err.explanation) {
|
|
19152
19154
|
if (!explanation) {
|
|
@@ -19169,7 +19171,7 @@ VideomailError.create = function (err, explanation, options, parameters) {
|
|
|
19169
19171
|
// for weird, undefined cases
|
|
19170
19172
|
if (!message) {
|
|
19171
19173
|
if (errType) {
|
|
19172
|
-
message = errType;
|
|
19174
|
+
message = errType + " (weird)";
|
|
19173
19175
|
}
|
|
19174
19176
|
if (!explanation && err) {
|
|
19175
19177
|
explanation = pretty(err, {
|
|
@@ -19209,7 +19211,14 @@ VideomailError.create = function (err, explanation, options, parameters) {
|
|
|
19209
19211
|
location: window.location.href,
|
|
19210
19212
|
cookie: cookies.length > 0 ? cookies.join(",\n") : undefined,
|
|
19211
19213
|
screen: [screen.width, screen.height, screen.colorDepth].join("×"),
|
|
19212
|
-
orientation: typeof screen.orientation === "string" ? screen.orientation : screen.orientation.type.toString()
|
|
19214
|
+
orientation: typeof screen.orientation === "string" ? screen.orientation : screen.orientation.type.toString(),
|
|
19215
|
+
// Consider removing later once sorted
|
|
19216
|
+
errNo: err === null || err === void 0 ? void 0 : err.errno,
|
|
19217
|
+
errCode: err === null || err === void 0 ? void 0 : err.code,
|
|
19218
|
+
errName: err === null || err === void 0 ? void 0 : err.name,
|
|
19219
|
+
errType: err === null || err === void 0 ? void 0 : err.type,
|
|
19220
|
+
errConstraint: err === null || err === void 0 ? void 0 : err.constraint,
|
|
19221
|
+
errConstructorName: err === null || err === void 0 || (_err$constructor = err.constructor) === null || _err$constructor === void 0 ? void 0 : _err$constructor.name
|
|
19213
19222
|
};
|
|
19214
19223
|
var videomailError = new VideomailError(err instanceof Error ? err : message, errData);
|
|
19215
19224
|
var resource;
|
|
@@ -22218,7 +22227,7 @@ var Recorder = function Recorder(visuals, replay) {
|
|
|
22218
22227
|
function initSocket(cb) {
|
|
22219
22228
|
if (!connected) {
|
|
22220
22229
|
connecting = true;
|
|
22221
|
-
debug("Recorder:
|
|
22230
|
+
debug("Recorder: initializing web socket to %s", options.socketUrl);
|
|
22222
22231
|
self.emit(_events.default.CONNECTING);
|
|
22223
22232
|
|
|
22224
22233
|
// https://github.com/maxogden/websocket-stream#binary-sockets
|
|
@@ -22377,12 +22386,10 @@ var Recorder = function Recorder(visuals, replay) {
|
|
|
22377
22386
|
*/
|
|
22378
22387
|
return connected && (isNotifying() || !isHidden() || blocking);
|
|
22379
22388
|
}
|
|
22380
|
-
function userMediaErrorCallback(err
|
|
22389
|
+
function userMediaErrorCallback(err) {
|
|
22381
22390
|
userMediaLoading = false;
|
|
22382
22391
|
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);
|
|
22392
|
+
debug("Recorder: userMediaErrorCallback(), name: ".concat(err.name, ", message: ").concat(err.message, " and Webcam characteristics: ").concat((0, _safeJsonStringify.default)(userMedia.getCharacteristics())));
|
|
22386
22393
|
var errorListeners = self.listeners(_events.default.ERROR);
|
|
22387
22394
|
if (errorListeners && errorListeners.length) {
|
|
22388
22395
|
if (err.name !== _videomailError.default.MEDIA_DEVICE_NOT_SUPPORTED) {
|
|
@@ -22690,8 +22697,8 @@ var Recorder = function Recorder(visuals, replay) {
|
|
|
22690
22697
|
this.reset();
|
|
22691
22698
|
writeCommand("back", cb);
|
|
22692
22699
|
};
|
|
22693
|
-
function
|
|
22694
|
-
debug("Recorder:
|
|
22700
|
+
function reInitializeAudio() {
|
|
22701
|
+
debug("Recorder: reInitializeAudio()");
|
|
22695
22702
|
clearUserMediaTimeout();
|
|
22696
22703
|
|
|
22697
22704
|
// important to free memory
|
|
@@ -22973,9 +22980,9 @@ var Recorder = function Recorder(visuals, replay) {
|
|
|
22973
22980
|
}).on(_events.default.LOADED_META_DATA, function () {
|
|
22974
22981
|
correctDimensions();
|
|
22975
22982
|
}).on(_events.default.DISABLING_AUDIO, function () {
|
|
22976
|
-
|
|
22983
|
+
reInitializeAudio();
|
|
22977
22984
|
}).on(_events.default.ENABLING_AUDIO, function () {
|
|
22978
|
-
|
|
22985
|
+
reInitializeAudio();
|
|
22979
22986
|
}).on(_events.default.INVISIBLE, function () {
|
|
22980
22987
|
loopWithTimeouts();
|
|
22981
22988
|
}).on(_events.default.VISIBLE, function () {
|