videomail-client 15.3.1 → 15.3.2

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.
@@ -11071,7 +11071,7 @@ var __webpack_modules__ = {
11071
11071
  var client = __webpack_require__(5734);
11072
11072
  var client_default = /*#__PURE__*/ __webpack_require__.n(client);
11073
11073
  var package_namespaceObject = {
11074
- rE: "15.3.1"
11074
+ rE: "15.3.2"
11075
11075
  };
11076
11076
  function isAudioEnabled(options) {
11077
11077
  return Boolean(options.audio.enabled);
@@ -14474,7 +14474,7 @@ var __webpack_modules__ = {
14474
14474
  }
14475
14475
  class HTTPVideomailError extends Error {
14476
14476
  constructor(...args){
14477
- super(...args), HTTPVideomailError_define_property(this, "name", "VideomailError"), HTTPVideomailError_define_property(this, "code", void 0), HTTPVideomailError_define_property(this, "status", void 0), HTTPVideomailError_define_property(this, "explanation", void 0);
14477
+ super(...args), HTTPVideomailError_define_property(this, "name", "VideomailError"), HTTPVideomailError_define_property(this, "code", void 0), HTTPVideomailError_define_property(this, "status", void 0), HTTPVideomailError_define_property(this, "explanation", void 0), HTTPVideomailError_define_property(this, "constraint", void 0), HTTPVideomailError_define_property(this, "usedConstraints", void 0);
14478
14478
  }
14479
14479
  }
14480
14480
  const error_HTTPVideomailError = HTTPVideomailError;
@@ -14666,6 +14666,8 @@ var __webpack_modules__ = {
14666
14666
  if (err) {
14667
14667
  videomailError.status = err.status;
14668
14668
  videomailError.code = err.code;
14669
+ videomailError.constraint = err.constraint;
14670
+ videomailError.usedConstraints = err.usedConstraints;
14669
14671
  }
14670
14672
  if (options.reportErrors) {
14671
14673
  const resource = new src_resource(options);
@@ -14737,7 +14739,11 @@ var __webpack_modules__ = {
14737
14739
  try {
14738
14740
  info = yield Device.getInfo();
14739
14741
  } catch (exc) {
14740
- errors.push(serializeError(exc));
14742
+ var _err_message;
14743
+ const err = serializeError(exc);
14744
+ let ignore = false;
14745
+ if (null == (_err_message = err.message) ? void 0 : _err_message.includes("Device API not available in this browser")) ignore = true;
14746
+ if (!ignore) errors.push(err);
14741
14747
  }
14742
14748
  try {
14743
14749
  battery = yield Device.getBatteryInfo();
@@ -15384,6 +15390,8 @@ var __webpack_modules__ = {
15384
15390
  };
15385
15391
  const url = `${this.options.apiUrl}/client-error/`;
15386
15392
  const capacitorDevice = yield util_getCapacitorDeviceMetadata();
15393
+ const supportedConstraints = navigator.mediaDevices.getSupportedConstraints();
15394
+ const enumerateDevices = yield navigator.mediaDevices.enumerateDevices();
15387
15395
  const fullVideomailErrorData = {
15388
15396
  capacitorDevice,
15389
15397
  browser: err.browser,
@@ -15404,6 +15412,9 @@ var __webpack_modules__ = {
15404
15412
  title: err.title,
15405
15413
  message: err.message,
15406
15414
  stack: err.stack,
15415
+ supportedConstraints,
15416
+ enumerateDevices,
15417
+ usedConstraints: err.usedConstraints,
15407
15418
  versions: {
15408
15419
  videomailClient: package_namespaceObject.rE,
15409
15420
  videomailNinjaFormPlugin: null == (_this_options_versions = this.options.versions) ? void 0 : _this_options_versions.videomailNinjaFormPlugin
@@ -17943,7 +17954,7 @@ var __webpack_modules__ = {
17943
17954
  if (notifying) return true;
17944
17955
  return this.blocking;
17945
17956
  }
17946
- userMediaErrorCallback(err) {
17957
+ userMediaErrorCallback(err, usedConstraints) {
17947
17958
  var _this_userMedia;
17948
17959
  this.userMediaLoading = false;
17949
17960
  this.clearUserMediaTimeout();
@@ -17954,7 +17965,8 @@ var __webpack_modules__ = {
17954
17965
  if (err.name !== error_VideomailError.MEDIA_DEVICE_NOT_SUPPORTED) {
17955
17966
  const videomailError = error_createError({
17956
17967
  err,
17957
- options: this.options
17968
+ options: this.options,
17969
+ usedConstraints
17958
17970
  });
17959
17971
  this.emit("ERROR", {
17960
17972
  err: videomailError
@@ -18020,11 +18032,11 @@ var __webpack_modules__ = {
18020
18032
  }
18021
18033
  this.options.logger.debug(`Recorder: our webcam constraints are: ${util_pretty(constraints)}`);
18022
18034
  this.options.logger.debug(`Recorder: available webcam constraints are: ${util_pretty(navigator.mediaDevices.getSupportedConstraints())}`);
18023
- const genuineUserMediaRequest = navigator.mediaDevices.getUserMedia(constraints);
18024
- genuineUserMediaRequest.then((localStream)=>{
18035
+ const streamPromise = navigator.mediaDevices.getUserMedia(constraints);
18036
+ streamPromise.then((localStream)=>{
18025
18037
  this.getUserMediaCallback(localStream, params);
18026
18038
  }).catch((reason)=>{
18027
- this.userMediaErrorCallback(reason);
18039
+ this.userMediaErrorCallback(reason, constraints);
18028
18040
  });
18029
18041
  }
18030
18042
  loadUserMedia(params) {
package/dist/esm/index.js CHANGED
@@ -3621,7 +3621,7 @@ const constants = {
3621
3621
  }
3622
3622
  };
3623
3623
  var package_namespaceObject = {
3624
- rE: "15.3.1"
3624
+ rE: "15.3.2"
3625
3625
  };
3626
3626
  function isAudioEnabled(options) {
3627
3627
  return Boolean(options.audio.enabled);
@@ -3763,7 +3763,7 @@ function HTTPVideomailError_define_property(obj, key, value) {
3763
3763
  }
3764
3764
  class HTTPVideomailError extends Error {
3765
3765
  constructor(...args){
3766
- super(...args), HTTPVideomailError_define_property(this, "name", "VideomailError"), HTTPVideomailError_define_property(this, "code", void 0), HTTPVideomailError_define_property(this, "status", void 0), HTTPVideomailError_define_property(this, "explanation", void 0);
3766
+ super(...args), HTTPVideomailError_define_property(this, "name", "VideomailError"), HTTPVideomailError_define_property(this, "code", void 0), HTTPVideomailError_define_property(this, "status", void 0), HTTPVideomailError_define_property(this, "explanation", void 0), HTTPVideomailError_define_property(this, "constraint", void 0), HTTPVideomailError_define_property(this, "usedConstraints", void 0);
3767
3767
  }
3768
3768
  }
3769
3769
  const error_HTTPVideomailError = HTTPVideomailError;
@@ -3952,6 +3952,8 @@ function createError(errorParams) {
3952
3952
  if (err) {
3953
3953
  videomailError.status = err.status;
3954
3954
  videomailError.code = err.code;
3955
+ videomailError.constraint = err.constraint;
3956
+ videomailError.usedConstraints = err.usedConstraints;
3955
3957
  }
3956
3958
  if (options.reportErrors) {
3957
3959
  const resource = new src_resource(options);
@@ -3992,7 +3994,10 @@ async function getCapacitorDeviceMetadata() {
3992
3994
  try {
3993
3995
  info = await Device.getInfo();
3994
3996
  } catch (exc) {
3995
- errors.push(serializeError(exc));
3997
+ const err = serializeError(exc);
3998
+ let ignore = false;
3999
+ if (err.message?.includes("Device API not available in this browser")) ignore = true;
4000
+ if (!ignore) errors.push(err);
3996
4001
  }
3997
4002
  try {
3998
4003
  battery = await Device.getBatteryInfo();
@@ -4443,6 +4448,8 @@ class Resource {
4443
4448
  };
4444
4449
  const url = `${this.options.apiUrl}/client-error/`;
4445
4450
  const capacitorDevice = await util_getCapacitorDeviceMetadata();
4451
+ const supportedConstraints = navigator.mediaDevices.getSupportedConstraints();
4452
+ const enumerateDevices = await navigator.mediaDevices.enumerateDevices();
4446
4453
  const fullVideomailErrorData = {
4447
4454
  capacitorDevice,
4448
4455
  browser: err.browser,
@@ -4463,6 +4470,9 @@ class Resource {
4463
4470
  title: err.title,
4464
4471
  message: err.message,
4465
4472
  stack: err.stack,
4473
+ supportedConstraints,
4474
+ enumerateDevices,
4475
+ usedConstraints: err.usedConstraints,
4466
4476
  versions: {
4467
4477
  videomailClient: package_namespaceObject.rE,
4468
4478
  videomailNinjaFormPlugin: this.options.versions?.videomailNinjaFormPlugin
@@ -6834,7 +6844,7 @@ class Recorder extends util_Despot {
6834
6844
  if (notifying) return true;
6835
6845
  return this.blocking;
6836
6846
  }
6837
- userMediaErrorCallback(err) {
6847
+ userMediaErrorCallback(err, usedConstraints) {
6838
6848
  this.userMediaLoading = false;
6839
6849
  this.clearUserMediaTimeout();
6840
6850
  const characteristics = this.userMedia?.getCharacteristics();
@@ -6844,7 +6854,8 @@ class Recorder extends util_Despot {
6844
6854
  if (err.name !== error_VideomailError.MEDIA_DEVICE_NOT_SUPPORTED) {
6845
6855
  const videomailError = error_createError({
6846
6856
  err,
6847
- options: this.options
6857
+ options: this.options,
6858
+ usedConstraints
6848
6859
  });
6849
6860
  this.emit("ERROR", {
6850
6861
  err: videomailError
@@ -6910,11 +6921,11 @@ class Recorder extends util_Despot {
6910
6921
  }
6911
6922
  this.options.logger.debug(`Recorder: our webcam constraints are: ${util_pretty(constraints)}`);
6912
6923
  this.options.logger.debug(`Recorder: available webcam constraints are: ${util_pretty(navigator.mediaDevices.getSupportedConstraints())}`);
6913
- const genuineUserMediaRequest = navigator.mediaDevices.getUserMedia(constraints);
6914
- genuineUserMediaRequest.then((localStream)=>{
6924
+ const streamPromise = navigator.mediaDevices.getUserMedia(constraints);
6925
+ streamPromise.then((localStream)=>{
6915
6926
  this.getUserMediaCallback(localStream, params);
6916
6927
  }).catch((reason)=>{
6917
- this.userMediaErrorCallback(reason);
6928
+ this.userMediaErrorCallback(reason, constraints);
6918
6929
  });
6919
6930
  }
6920
6931
  loadUserMedia(params) {
@@ -42,5 +42,8 @@ export interface FullVideomailErrorData extends VideomailErrorData {
42
42
  userAgent?: string | null | undefined;
43
43
  isBot?: boolean | undefined;
44
44
  capacitorDevice: CapacitorDeviceMetadata;
45
+ supportedConstraints: MediaTrackSupportedConstraints;
46
+ enumerateDevices: MediaDeviceInfo[];
47
+ usedConstraints?: MediaStreamConstraints | undefined;
45
48
  }
46
49
  export {};
@@ -3,5 +3,7 @@ declare class HTTPVideomailError extends Error {
3
3
  code?: string | undefined;
4
4
  status?: number | undefined;
5
5
  explanation?: string | undefined;
6
+ constraint?: string | undefined;
7
+ usedConstraints?: MediaStreamConstraints | undefined;
6
8
  }
7
9
  export default HTTPVideomailError;
@@ -8,6 +8,7 @@ interface ErrorParams {
8
8
  explanation?: string;
9
9
  options: VideomailClientOptions;
10
10
  classList?: string[];
11
+ usedConstraints?: MediaStreamConstraints;
11
12
  }
12
13
  declare function createError(errorParams: ErrorParams): VideomailError;
13
14
  export default createError;
package/dist/umd/index.js CHANGED
@@ -11495,7 +11495,7 @@
11495
11495
  var client = __webpack_require__(5734);
11496
11496
  var client_default = /*#__PURE__*/ __webpack_require__.n(client);
11497
11497
  var package_namespaceObject = {
11498
- rE: "15.3.1"
11498
+ rE: "15.3.2"
11499
11499
  };
11500
11500
  function isAudioEnabled(options) {
11501
11501
  return Boolean(options.audio.enabled);
@@ -14881,6 +14881,8 @@
14881
14881
  code;
14882
14882
  status;
14883
14883
  explanation;
14884
+ constraint;
14885
+ usedConstraints;
14884
14886
  }
14885
14887
  const error_HTTPVideomailError = HTTPVideomailError;
14886
14888
  class VideomailError extends error_HTTPVideomailError {
@@ -15074,6 +15076,8 @@
15074
15076
  if (err) {
15075
15077
  videomailError.status = err.status;
15076
15078
  videomailError.code = err.code;
15079
+ videomailError.constraint = err.constraint;
15080
+ videomailError.usedConstraints = err.usedConstraints;
15077
15081
  }
15078
15082
  if (options.reportErrors) {
15079
15083
  const resource = new src_resource(options);
@@ -15118,7 +15122,10 @@
15118
15122
  try {
15119
15123
  info = await Device.getInfo();
15120
15124
  } catch (exc) {
15121
- errors.push(serializeError(exc));
15125
+ const err = serializeError(exc);
15126
+ let ignore = false;
15127
+ if (err.message?.includes("Device API not available in this browser")) ignore = true;
15128
+ if (!ignore) errors.push(err);
15122
15129
  }
15123
15130
  try {
15124
15131
  battery = await Device.getBatteryInfo();
@@ -15662,6 +15669,8 @@
15662
15669
  };
15663
15670
  const url = `${this.options.apiUrl}/client-error/`;
15664
15671
  const capacitorDevice = await util_getCapacitorDeviceMetadata();
15672
+ const supportedConstraints = navigator.mediaDevices.getSupportedConstraints();
15673
+ const enumerateDevices = await navigator.mediaDevices.enumerateDevices();
15665
15674
  const fullVideomailErrorData = {
15666
15675
  capacitorDevice,
15667
15676
  browser: err.browser,
@@ -15682,6 +15691,9 @@
15682
15691
  title: err.title,
15683
15692
  message: err.message,
15684
15693
  stack: err.stack,
15694
+ supportedConstraints,
15695
+ enumerateDevices,
15696
+ usedConstraints: err.usedConstraints,
15685
15697
  versions: {
15686
15698
  videomailClient: package_namespaceObject.rE,
15687
15699
  videomailNinjaFormPlugin: this.options.versions?.videomailNinjaFormPlugin
@@ -18097,7 +18109,7 @@
18097
18109
  if (notifying) return true;
18098
18110
  return this.blocking;
18099
18111
  }
18100
- userMediaErrorCallback(err) {
18112
+ userMediaErrorCallback(err, usedConstraints) {
18101
18113
  this.userMediaLoading = false;
18102
18114
  this.clearUserMediaTimeout();
18103
18115
  const characteristics = this.userMedia?.getCharacteristics();
@@ -18107,7 +18119,8 @@
18107
18119
  if (err.name !== error_VideomailError.MEDIA_DEVICE_NOT_SUPPORTED) {
18108
18120
  const videomailError = error_createError({
18109
18121
  err,
18110
- options: this.options
18122
+ options: this.options,
18123
+ usedConstraints
18111
18124
  });
18112
18125
  this.emit("ERROR", {
18113
18126
  err: videomailError
@@ -18173,11 +18186,11 @@
18173
18186
  }
18174
18187
  this.options.logger.debug(`Recorder: our webcam constraints are: ${util_pretty(constraints)}`);
18175
18188
  this.options.logger.debug(`Recorder: available webcam constraints are: ${util_pretty(navigator.mediaDevices.getSupportedConstraints())}`);
18176
- const genuineUserMediaRequest = navigator.mediaDevices.getUserMedia(constraints);
18177
- genuineUserMediaRequest.then((localStream)=>{
18189
+ const streamPromise = navigator.mediaDevices.getUserMedia(constraints);
18190
+ streamPromise.then((localStream)=>{
18178
18191
  this.getUserMediaCallback(localStream, params);
18179
18192
  }).catch((reason)=>{
18180
- this.userMediaErrorCallback(reason);
18193
+ this.userMediaErrorCallback(reason, constraints);
18181
18194
  });
18182
18195
  }
18183
18196
  loadUserMedia(params) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "videomail-client",
3
- "version": "15.3.1",
3
+ "version": "15.3.2",
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",
@@ -77,7 +77,7 @@
77
77
  },
78
78
  "devDependencies": {
79
79
  "@chromatic-com/storybook": "5.3.0",
80
- "@eslint/config-inspector": "3.3.0",
80
+ "@eslint/config-inspector": "3.4.0",
81
81
  "@eslint/js": "10.0.1",
82
82
  "@rsbuild/plugin-node-polyfill": "1.4.6",
83
83
  "@rsbuild/plugin-stylus": "2.0.1",
@@ -90,12 +90,12 @@
90
90
  "@tsconfig/node26": "26.0.1",
91
91
  "@tsconfig/strictest": "2.0.8",
92
92
  "@types/defined": "1.0.2",
93
- "@types/node": "26.4.0",
93
+ "@types/node": "26.4.1",
94
94
  "@types/superagent": "8.1.11",
95
95
  "@types/ua-parser-js": "0.7.39",
96
96
  "@vitest/eslint-plugin": "1.6.27",
97
97
  "audit-ci": "7.1.0",
98
- "chromatic": "18.7.1",
98
+ "chromatic": "18.7.2",
99
99
  "cross-env": "10.1.0",
100
100
  "eslint": "10.9.1",
101
101
  "eslint-import-resolver-typescript": "4.4.5",
@@ -105,7 +105,7 @@
105
105
  "eslint-plugin-package-json": "1.8.0",
106
106
  "eslint-plugin-regexp": "3.2.0",
107
107
  "eslint-plugin-simple-import-sort": "14.0.0",
108
- "globals": "17.11.0",
108
+ "globals": "17.12.0",
109
109
  "jsdom": "30.0.1",
110
110
  "msw": "2.15.0",
111
111
  "msw-storybook-addon": "2.0.7",
@@ -117,9 +117,9 @@
117
117
  "release-it": "21.0.2",
118
118
  "storybook": "10.5.10",
119
119
  "storybook-html-rsbuild": "3.4.2",
120
- "type-fest": "5.8.0",
120
+ "type-fest": "5.9.0",
121
121
  "typescript": "6.0.3",
122
- "typescript-eslint": "8.68.0",
122
+ "typescript-eslint": "8.69.0",
123
123
  "vitest": "4.1.11"
124
124
  },
125
125
  "engines": {