videomail-client 11.1.2 → 11.3.1

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.
@@ -10488,7 +10488,7 @@ var __webpack_exports__ = {};
10488
10488
  var client = __webpack_require__("./node_modules/superagent/lib/client.js");
10489
10489
  var client_default = /*#__PURE__*/ __webpack_require__.n(client);
10490
10490
  var package_namespaceObject = {
10491
- rE: "11.1.2"
10491
+ rE: "11.3.1"
10492
10492
  };
10493
10493
  var defined = __webpack_require__("./node_modules/defined/index.js");
10494
10494
  var defined_default = /*#__PURE__*/ __webpack_require__.n(defined);
@@ -13624,11 +13624,6 @@ var __webpack_exports__ = {};
13624
13624
  NAME,
13625
13625
  VERSION
13626
13626
  ]);
13627
- var VideoType_VideoType = /*#__PURE__*/ function(VideoType) {
13628
- VideoType["WebM"] = "webm";
13629
- VideoType["MP4"] = "mp4";
13630
- return VideoType;
13631
- }({});
13632
13627
  function canPlayType_canPlayType(video, type) {
13633
13628
  const canPlayType = video.canPlayType(`video/${type}`);
13634
13629
  if ("" === canPlayType) return false;
@@ -13645,7 +13640,7 @@ var __webpack_exports__ = {};
13645
13640
  else obj[key] = value;
13646
13641
  return obj;
13647
13642
  }
13648
- const FALLBACK_VIDEO_TYPE = VideoType_VideoType.MP4;
13643
+ const FALLBACK_VIDEO_TYPE = VideoType.MP4;
13649
13644
  class Browser_Browser {
13650
13645
  isIOS() {
13651
13646
  return "iOS" === this.result.os.name;
@@ -13683,10 +13678,10 @@ var __webpack_exports__ = {};
13683
13678
  }
13684
13679
  getVideoType(video) {
13685
13680
  if (!this.videoType) {
13686
- if (media_canPlayType(video, VideoType_VideoType.MP4)) this.videoType = VideoType_VideoType.MP4;
13687
- else if (media_canPlayType(video, VideoType_VideoType.WebM)) this.videoType = VideoType_VideoType.WebM;
13681
+ if (media_canPlayType(video, VideoType.MP4)) this.videoType = VideoType.MP4;
13682
+ else if (media_canPlayType(video, VideoType.WebM)) this.videoType = VideoType.WebM;
13688
13683
  }
13689
- if (this.videoType !== VideoType_VideoType.WebM && this.videoType !== VideoType_VideoType.MP4) this.videoType = FALLBACK_VIDEO_TYPE;
13684
+ if (this.videoType !== VideoType.WebM && this.videoType !== VideoType.MP4) this.videoType = FALLBACK_VIDEO_TYPE;
13690
13685
  if ("" === this.videoType.trim()) this.videoType = FALLBACK_VIDEO_TYPE;
13691
13686
  return this.videoType;
13692
13687
  }
@@ -14984,7 +14979,7 @@ var __webpack_exports__ = {};
14984
14979
  return outerWidth;
14985
14980
  }
14986
14981
  const getOuterWidth = getOuterWidth_getOuterWidth;
14987
- function limitWidth_limitWidth(element, options, width) {
14982
+ function limitWidth(element, options, width) {
14988
14983
  let limitedWidth;
14989
14984
  const outerWidth = getOuterWidth(element);
14990
14985
  limitedWidth = width && "number" == typeof width ? outerWidth > 0 && outerWidth < width ? outerWidth : width : outerWidth;
@@ -14994,7 +14989,7 @@ var __webpack_exports__ = {};
14994
14989
  });
14995
14990
  return limitedWidth;
14996
14991
  }
14997
- const limitWidth = limitWidth_limitWidth;
14992
+ const dimensions_limitWidth = limitWidth;
14998
14993
  var contains = __webpack_require__("./node_modules/contains/index.js");
14999
14994
  var contains_default = /*#__PURE__*/ __webpack_require__.n(contains);
15000
14995
  function disableElement(element) {
@@ -16266,7 +16261,7 @@ var __webpack_exports__ = {};
16266
16261
  message: `Unable to calculate height for target ${target} when width is less than 1 (= ${width}) and responsive mode is set to ${responsive}`,
16267
16262
  options
16268
16263
  });
16269
- if (responsive && element) width = limitWidth(element, options, width);
16264
+ if (responsive && element) width = dimensions_limitWidth(element, options, width);
16270
16265
  const chosenRatio = null != ratio ? ratio : getRatio(options, void 0, videoWidth);
16271
16266
  const height = Math.round(width * chosenRatio);
16272
16267
  if (Number.isInteger(height) && height < 1) throw error_createError({
@@ -17887,10 +17882,10 @@ var __webpack_exports__ = {};
17887
17882
  }
17888
17883
  }
17889
17884
  setMp4Source(src, bustCache) {
17890
- this.setVideoSource(VideoType_VideoType.MP4, src, bustCache);
17885
+ this.setVideoSource(VideoType.MP4, src, bustCache);
17891
17886
  }
17892
17887
  setWebMSource(src, bustCache) {
17893
- this.setVideoSource(VideoType_VideoType.WebM, src, bustCache);
17888
+ this.setVideoSource(VideoType.WebM, src, bustCache);
17894
17889
  }
17895
17890
  getVideoType() {
17896
17891
  if (!this.replayElement) return;
@@ -18399,7 +18394,7 @@ var __webpack_exports__ = {};
18399
18394
  }
18400
18395
  limitWidth(width) {
18401
18396
  if (!this.containerElement) return;
18402
- return limitWidth(this.containerElement, this.options, width);
18397
+ return dimensions_limitWidth(this.containerElement, this.options, width);
18403
18398
  }
18404
18399
  limitHeight(height) {
18405
18400
  return dimensions_limitHeight(height, this.options, "containers limitHeight fn");
@@ -18820,6 +18815,11 @@ var __webpack_exports__ = {};
18820
18815
  client_define_property(VideomailClient, "ENC_TYPE_APP_JSON", constants["public"].ENC_TYPE_APP_JSON);
18821
18816
  client_define_property(VideomailClient, "ENC_TYPE_FORM", constants["public"].ENC_TYPE_FORM);
18822
18817
  const src_client = VideomailClient;
18818
+ var VideoType_VideoType = /*#__PURE__*/ function(VideoType1) {
18819
+ VideoType1["WebM"] = "webm";
18820
+ VideoType1["MP4"] = "mp4";
18821
+ return VideoType1;
18822
+ }({});
18823
18823
  })();
18824
18824
  exports.VideoType = __webpack_exports__.VideoType;
18825
18825
  exports.VideomailClient = __webpack_exports__.VideomailClient;
@@ -1,5 +1,5 @@
1
1
  import { PartialVideomailClientOptions } from "./types/options";
2
- import type { Videomail } from "./types/Videomail";
2
+ import Videomail from "./types/Videomail";
3
3
  import Despot from "./util/Despot";
4
4
  export interface StartOverParams {
5
5
  keepHidden?: boolean | undefined;
@@ -1,12 +1,19 @@
1
1
  import VideomailClient from "./client";
2
- import type { Command, CommandArgs } from "./types/command";
3
- import type DeliveryRecord from "./types/DeliveryRecord";
4
- import type { EmailAddress, EmailAddresses } from "./types/EmailAddress";
5
- import type { FullVideomailErrorData, VideomailErrorData } from "./types/error";
6
- import type VideomailEvents from "./types/events";
7
- import type { VideomailClientOptions } from "./types/options";
8
- import type RecordingStats from "./types/RecordingStats";
9
- import type { PartialVideomail, Videomail } from "./types/Videomail";
2
+ import { Command, CommandArgs } from "./types/command";
3
+ import DeliveryRecord from "./types/DeliveryRecord";
4
+ import { EmailAddress, EmailAddresses } from "./types/EmailAddress";
5
+ import { FullVideomailErrorData, VideomailErrorData } from "./types/error";
6
+ import VideomailEvents from "./types/events";
7
+ import { VideomailClientOptions } from "./types/options";
8
+ import RecordingStats from "./types/RecordingStats";
9
+ import Videomail, { PartialVideomail } from "./types/Videomail";
10
10
  import { VideoType } from "./types/VideoType";
11
- export type { Command, CommandArgs, DeliveryRecord, EmailAddress, EmailAddresses, FullVideomailErrorData, PartialVideomail, RecordingStats, Videomail, VideomailClientOptions, VideomailErrorData, VideomailEvents, };
11
+ export type { Videomail };
12
+ export type { VideomailEvents };
13
+ export type { RecordingStats };
14
+ export type { VideomailClientOptions };
12
15
  export { VideomailClient, VideoType };
16
+ export type { FullVideomailErrorData, PartialVideomail, VideomailErrorData };
17
+ export type { Command, CommandArgs };
18
+ export type { DeliveryRecord };
19
+ export type { EmailAddress, EmailAddresses };
package/dist/esm/index.js CHANGED
@@ -3454,12 +3454,12 @@ const constants = {
3454
3454
  }
3455
3455
  };
3456
3456
  var package_namespaceObject = {
3457
- rE: "11.1.2"
3457
+ rE: "11.3.1"
3458
3458
  };
3459
- var VideoType_VideoType = /*#__PURE__*/ function(VideoType) {
3460
- VideoType["WebM"] = "webm";
3461
- VideoType["MP4"] = "mp4";
3462
- return VideoType;
3459
+ var VideoType_VideoType = /*#__PURE__*/ function(VideoType1) {
3460
+ VideoType1["WebM"] = "webm";
3461
+ VideoType1["MP4"] = "mp4";
3462
+ return VideoType1;
3463
3463
  }({});
3464
3464
  function canPlayType_canPlayType(video, type) {
3465
3465
  const canPlayType = video.canPlayType(`video/${type}`);
@@ -3467,7 +3467,7 @@ function canPlayType_canPlayType(video, type) {
3467
3467
  return canPlayType;
3468
3468
  }
3469
3469
  const media_canPlayType = canPlayType_canPlayType;
3470
- const FALLBACK_VIDEO_TYPE = VideoType_VideoType.MP4;
3470
+ const FALLBACK_VIDEO_TYPE = VideoType.MP4;
3471
3471
  class Browser {
3472
3472
  options;
3473
3473
  result;
@@ -3514,10 +3514,10 @@ class Browser {
3514
3514
  }
3515
3515
  getVideoType(video) {
3516
3516
  if (!this.videoType) {
3517
- if (media_canPlayType(video, VideoType_VideoType.MP4)) this.videoType = VideoType_VideoType.MP4;
3518
- else if (media_canPlayType(video, VideoType_VideoType.WebM)) this.videoType = VideoType_VideoType.WebM;
3517
+ if (media_canPlayType(video, VideoType.MP4)) this.videoType = VideoType.MP4;
3518
+ else if (media_canPlayType(video, VideoType.WebM)) this.videoType = VideoType.WebM;
3519
3519
  }
3520
- if (this.videoType !== VideoType_VideoType.WebM && this.videoType !== VideoType_VideoType.MP4) this.videoType = FALLBACK_VIDEO_TYPE;
3520
+ if (this.videoType !== VideoType.WebM && this.videoType !== VideoType.MP4) this.videoType = FALLBACK_VIDEO_TYPE;
3521
3521
  if ("" === this.videoType.trim()) this.videoType = FALLBACK_VIDEO_TYPE;
3522
3522
  return this.videoType;
3523
3523
  }
@@ -7308,10 +7308,10 @@ class Replay extends util_Despot {
7308
7308
  }
7309
7309
  }
7310
7310
  setMp4Source(src, bustCache) {
7311
- this.setVideoSource(VideoType_VideoType.MP4, src, bustCache);
7311
+ this.setVideoSource(VideoType.MP4, src, bustCache);
7312
7312
  }
7313
7313
  setWebMSource(src, bustCache) {
7314
- this.setVideoSource(VideoType_VideoType.WebM, src, bustCache);
7314
+ this.setVideoSource(VideoType.WebM, src, bustCache);
7315
7315
  }
7316
7316
  getVideoType() {
7317
7317
  if (!this.replayElement) return;
@@ -1,6 +1,6 @@
1
1
  import Response from "superagent/lib/node/response";
2
2
  import { VideomailClientOptions } from "./types/options";
3
- import type { PartialVideomail, Videomail } from "./types/Videomail";
3
+ import Videomail, { PartialVideomail } from "./types/Videomail";
4
4
  import VideomailError from "./util/error/VideomailError";
5
5
  import { FormInputs } from "./wrappers/form";
6
6
  declare class Resource {
@@ -53,5 +53,5 @@ interface Videomail {
53
53
  rejectedCc?: DeliveryRecord;
54
54
  rejectedBcc?: DeliveryRecord;
55
55
  }
56
- type PartialVideomail = PartialDeep<Videomail>;
57
- export type { PartialVideomail, Videomail };
56
+ export type PartialVideomail = PartialDeep<Videomail>;
57
+ export default Videomail;
@@ -2,7 +2,7 @@ import Response from "superagent/lib/node/response";
2
2
  import VideomailError from "../../util/error/VideomailError";
3
3
  import { FormReadyParams } from "../../wrappers/container";
4
4
  import RecordingStats from "../RecordingStats";
5
- import type { Videomail } from "../Videomail";
5
+ import Videomail from "../Videomail";
6
6
  export interface UserMediaReadyParams {
7
7
  switchingFacingMode?: ConstrainDOMString | undefined;
8
8
  recordWhenReady?: boolean | undefined;
@@ -1,7 +1,7 @@
1
1
  import "./../styles/main.styl";
2
2
  import { ShowParams, StartOverParams } from "../client";
3
3
  import { VideomailClientOptions } from "../types/options";
4
- import type { Videomail } from "../types/Videomail";
4
+ import Videomail from "../types/Videomail";
5
5
  import Despot from "../util/Despot";
6
6
  import { FormInputs, FormMethod } from "./form";
7
7
  interface BuildOptions {
@@ -1,5 +1,5 @@
1
1
  import { VideomailClientOptions } from "../types/options";
2
- import type { Videomail } from "../types/Videomail";
2
+ import Videomail from "../types/Videomail";
3
3
  import Despot from "../util/Despot";
4
4
  import Container from "./container";
5
5
  export type FormInputs = Record<string, string>;
@@ -1,5 +1,5 @@
1
1
  import { VideomailClientOptions } from "../../types/options";
2
- import type { Videomail } from "../../types/Videomail";
2
+ import Videomail from "../../types/Videomail";
3
3
  import { VideoType } from "../../types/VideoType";
4
4
  import Despot from "../../util/Despot";
5
5
  import { UnloadParams } from "../container";
package/dist/umd/index.js CHANGED
@@ -10494,7 +10494,7 @@
10494
10494
  var client = __webpack_require__("./node_modules/superagent/lib/client.js");
10495
10495
  var client_default = /*#__PURE__*/ __webpack_require__.n(client);
10496
10496
  var package_namespaceObject = {
10497
- rE: "11.1.2"
10497
+ rE: "11.3.1"
10498
10498
  };
10499
10499
  var defined = __webpack_require__("./node_modules/defined/index.js");
10500
10500
  var defined_default = /*#__PURE__*/ __webpack_require__.n(defined);
@@ -13630,18 +13630,13 @@
13630
13630
  NAME,
13631
13631
  VERSION
13632
13632
  ]);
13633
- var VideoType_VideoType = /*#__PURE__*/ function(VideoType) {
13634
- VideoType["WebM"] = "webm";
13635
- VideoType["MP4"] = "mp4";
13636
- return VideoType;
13637
- }({});
13638
13633
  function canPlayType_canPlayType(video, type) {
13639
13634
  const canPlayType = video.canPlayType(`video/${type}`);
13640
13635
  if ("" === canPlayType) return false;
13641
13636
  return canPlayType;
13642
13637
  }
13643
13638
  const media_canPlayType = canPlayType_canPlayType;
13644
- const FALLBACK_VIDEO_TYPE = VideoType_VideoType.MP4;
13639
+ const FALLBACK_VIDEO_TYPE = VideoType.MP4;
13645
13640
  class Browser {
13646
13641
  options;
13647
13642
  result;
@@ -13688,10 +13683,10 @@
13688
13683
  }
13689
13684
  getVideoType(video) {
13690
13685
  if (!this.videoType) {
13691
- if (media_canPlayType(video, VideoType_VideoType.MP4)) this.videoType = VideoType_VideoType.MP4;
13692
- else if (media_canPlayType(video, VideoType_VideoType.WebM)) this.videoType = VideoType_VideoType.WebM;
13686
+ if (media_canPlayType(video, VideoType.MP4)) this.videoType = VideoType.MP4;
13687
+ else if (media_canPlayType(video, VideoType.WebM)) this.videoType = VideoType.WebM;
13693
13688
  }
13694
- if (this.videoType !== VideoType_VideoType.WebM && this.videoType !== VideoType_VideoType.MP4) this.videoType = FALLBACK_VIDEO_TYPE;
13689
+ if (this.videoType !== VideoType.WebM && this.videoType !== VideoType.MP4) this.videoType = FALLBACK_VIDEO_TYPE;
13695
13690
  if ("" === this.videoType.trim()) this.videoType = FALLBACK_VIDEO_TYPE;
13696
13691
  return this.videoType;
13697
13692
  }
@@ -14677,7 +14672,7 @@
14677
14672
  }
14678
14673
  };
14679
14674
  const src_options = options_options;
14680
- class CollectLogger {
14675
+ class CollectLogger_CollectLogger {
14681
14676
  browser;
14682
14677
  logger;
14683
14678
  stack = [];
@@ -14716,7 +14711,7 @@
14716
14711
  return this.stack;
14717
14712
  }
14718
14713
  }
14719
- const util_CollectLogger = CollectLogger;
14714
+ const CollectLogger = CollectLogger_CollectLogger;
14720
14715
  var process = __webpack_require__("./node_modules/process/browser.js");
14721
14716
  function isTest() {
14722
14717
  return "test" === process.env.ENVIRON;
@@ -14728,7 +14723,7 @@
14728
14723
  return source;
14729
14724
  }
14730
14725
  });
14731
- const collectLogger = new util_CollectLogger(newOptions);
14726
+ const collectLogger = new CollectLogger(newOptions);
14732
14727
  newOptions.logger = collectLogger;
14733
14728
  if (util_isTest()) newOptions.verbose = false;
14734
14729
  return newOptions;
@@ -14923,7 +14918,7 @@
14923
14918
  return outerWidth;
14924
14919
  }
14925
14920
  const getOuterWidth = getOuterWidth_getOuterWidth;
14926
- function limitWidth_limitWidth(element, options, width) {
14921
+ function limitWidth(element, options, width) {
14927
14922
  let limitedWidth;
14928
14923
  const outerWidth = getOuterWidth(element);
14929
14924
  limitedWidth = width && "number" == typeof width ? outerWidth > 0 && outerWidth < width ? outerWidth : width : outerWidth;
@@ -14933,7 +14928,7 @@
14933
14928
  });
14934
14929
  return limitedWidth;
14935
14930
  }
14936
- const limitWidth = limitWidth_limitWidth;
14931
+ const dimensions_limitWidth = limitWidth;
14937
14932
  var contains = __webpack_require__("./node_modules/contains/index.js");
14938
14933
  var contains_default = /*#__PURE__*/ __webpack_require__.n(contains);
14939
14934
  function disableElement(element) {
@@ -16097,7 +16092,7 @@
16097
16092
  message: `Unable to calculate height for target ${target} when width is less than 1 (= ${width}) and responsive mode is set to ${responsive}`,
16098
16093
  options
16099
16094
  });
16100
- if (responsive && element) width = limitWidth(element, options, width);
16095
+ if (responsive && element) width = dimensions_limitWidth(element, options, width);
16101
16096
  const chosenRatio = ratio ?? getRatio(options, void 0, videoWidth);
16102
16097
  const height = Math.round(width * chosenRatio);
16103
16098
  if (Number.isInteger(height) && height < 1) throw error_createError({
@@ -17675,10 +17670,10 @@
17675
17670
  }
17676
17671
  }
17677
17672
  setMp4Source(src, bustCache) {
17678
- this.setVideoSource(VideoType_VideoType.MP4, src, bustCache);
17673
+ this.setVideoSource(VideoType.MP4, src, bustCache);
17679
17674
  }
17680
17675
  setWebMSource(src, bustCache) {
17681
- this.setVideoSource(VideoType_VideoType.WebM, src, bustCache);
17676
+ this.setVideoSource(VideoType.WebM, src, bustCache);
17682
17677
  }
17683
17678
  getVideoType() {
17684
17679
  if (!this.replayElement) return;
@@ -18172,7 +18167,7 @@
18172
18167
  }
18173
18168
  limitWidth(width) {
18174
18169
  if (!this.containerElement) return;
18175
- return limitWidth(this.containerElement, this.options, width);
18170
+ return dimensions_limitWidth(this.containerElement, this.options, width);
18176
18171
  }
18177
18172
  limitHeight(height) {
18178
18173
  return dimensions_limitHeight(height, this.options, "containers limitHeight fn");
@@ -18566,6 +18561,11 @@
18566
18561
  }
18567
18562
  }
18568
18563
  const src_client = VideomailClient;
18564
+ var VideoType_VideoType = /*#__PURE__*/ function(VideoType1) {
18565
+ VideoType1["WebM"] = "webm";
18566
+ VideoType1["MP4"] = "mp4";
18567
+ return VideoType1;
18568
+ }({});
18569
18569
  })();
18570
18570
  return __webpack_exports__;
18571
18571
  })());
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "videomail-client",
3
- "version": "11.1.2",
3
+ "version": "11.3.1",
4
4
  "description": "A wicked npm package to record videos directly in the browser, wohooo!",
5
5
  "keywords": [
6
6
  "webcam",
@@ -80,10 +80,10 @@
80
80
  "@rsbuild/plugin-stylus": "1.2.0",
81
81
  "@rsdoctor/rspack-plugin": "1.2.3",
82
82
  "@rslib/core": "0.13.3",
83
- "@storybook/addon-a11y": "9.1.8",
84
- "@storybook/addon-docs": "9.1.8",
85
- "@storybook/addon-links": "9.1.8",
86
- "@storybook/html": "9.1.8",
83
+ "@storybook/addon-a11y": "9.1.3",
84
+ "@storybook/addon-docs": "9.1.3",
85
+ "@storybook/addon-links": "9.1.3",
86
+ "@storybook/html": "9.1.3",
87
87
  "@tsconfig/node22": "22.0.2",
88
88
  "@tsconfig/strictest": "2.0.6",
89
89
  "@types/defined": "1.0.2",
@@ -104,7 +104,7 @@
104
104
  "eslint-plugin-regexp": "2.10.0",
105
105
  "eslint-plugin-security": "3.0.1",
106
106
  "eslint-plugin-simple-import-sort": "12.1.1",
107
- "eslint-plugin-storybook": "9.1.8",
107
+ "eslint-plugin-storybook": "9.1.3",
108
108
  "globals": "16.4.0",
109
109
  "jsdom": "27.0.0",
110
110
  "msw": "2.11.1",
@@ -114,7 +114,7 @@
114
114
  "prettier-plugin-packagejson": "2.5.19",
115
115
  "prettier-plugin-sh": "0.18.0",
116
116
  "release-it": "19.0.5",
117
- "storybook": "9.1.8",
117
+ "storybook": "9.1.3",
118
118
  "storybook-html-rsbuild": "2.0.4",
119
119
  "type-fest": "5.0.1",
120
120
  "typescript": "5.9.2",
@@ -122,8 +122,8 @@
122
122
  "vitest": "3.2.4"
123
123
  },
124
124
  "engines": {
125
- "node": "^22.16.0",
126
- "npm": "^10.9.2"
125
+ "node": "^22.20.0",
126
+ "npm": "^10.9.3"
127
127
  },
128
128
  "msw": {
129
129
  "workerDirectory": [