videomail-client 11.3.1 → 11.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.
@@ -10325,7 +10325,7 @@ var __webpack_exports__ = {};
10325
10325
  __webpack_require__.r(__webpack_exports__);
10326
10326
  __webpack_require__.d(__webpack_exports__, {
10327
10327
  VideomailClient: ()=>src_client,
10328
- VideoType: ()=>VideoType_VideoType
10328
+ VideoType: ()=>VideoType
10329
10329
  });
10330
10330
  const constants = {
10331
10331
  SITE_NAME_LABEL: "x-videomail-site-name",
@@ -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.3.1"
10491
+ rE: "11.3.2"
10492
10492
  };
10493
10493
  var defined = __webpack_require__("./node_modules/defined/index.js");
10494
10494
  var defined_default = /*#__PURE__*/ __webpack_require__.n(defined);
@@ -13624,6 +13624,10 @@ var __webpack_exports__ = {};
13624
13624
  NAME,
13625
13625
  VERSION
13626
13626
  ]);
13627
+ const VideoType = {
13628
+ WebM: "webm",
13629
+ MP4: "mp4"
13630
+ };
13627
13631
  function canPlayType_canPlayType(video, type) {
13628
13632
  const canPlayType = video.canPlayType(`video/${type}`);
13629
13633
  if ("" === canPlayType) return false;
@@ -14979,7 +14983,7 @@ var __webpack_exports__ = {};
14979
14983
  return outerWidth;
14980
14984
  }
14981
14985
  const getOuterWidth = getOuterWidth_getOuterWidth;
14982
- function limitWidth(element, options, width) {
14986
+ function limitWidth_limitWidth(element, options, width) {
14983
14987
  let limitedWidth;
14984
14988
  const outerWidth = getOuterWidth(element);
14985
14989
  limitedWidth = width && "number" == typeof width ? outerWidth > 0 && outerWidth < width ? outerWidth : width : outerWidth;
@@ -14989,7 +14993,7 @@ var __webpack_exports__ = {};
14989
14993
  });
14990
14994
  return limitedWidth;
14991
14995
  }
14992
- const dimensions_limitWidth = limitWidth;
14996
+ const limitWidth = limitWidth_limitWidth;
14993
14997
  var contains = __webpack_require__("./node_modules/contains/index.js");
14994
14998
  var contains_default = /*#__PURE__*/ __webpack_require__.n(contains);
14995
14999
  function disableElement(element) {
@@ -16261,7 +16265,7 @@ var __webpack_exports__ = {};
16261
16265
  message: `Unable to calculate height for target ${target} when width is less than 1 (= ${width}) and responsive mode is set to ${responsive}`,
16262
16266
  options
16263
16267
  });
16264
- if (responsive && element) width = dimensions_limitWidth(element, options, width);
16268
+ if (responsive && element) width = limitWidth(element, options, width);
16265
16269
  const chosenRatio = null != ratio ? ratio : getRatio(options, void 0, videoWidth);
16266
16270
  const height = Math.round(width * chosenRatio);
16267
16271
  if (Number.isInteger(height) && height < 1) throw error_createError({
@@ -18394,7 +18398,7 @@ var __webpack_exports__ = {};
18394
18398
  }
18395
18399
  limitWidth(width) {
18396
18400
  if (!this.containerElement) return;
18397
- return dimensions_limitWidth(this.containerElement, this.options, width);
18401
+ return limitWidth(this.containerElement, this.options, width);
18398
18402
  }
18399
18403
  limitHeight(height) {
18400
18404
  return dimensions_limitHeight(height, this.options, "containers limitHeight fn");
@@ -18815,11 +18819,6 @@ var __webpack_exports__ = {};
18815
18819
  client_define_property(VideomailClient, "ENC_TYPE_APP_JSON", constants["public"].ENC_TYPE_APP_JSON);
18816
18820
  client_define_property(VideomailClient, "ENC_TYPE_FORM", constants["public"].ENC_TYPE_FORM);
18817
18821
  const src_client = VideomailClient;
18818
- var VideoType_VideoType = /*#__PURE__*/ function(VideoType1) {
18819
- VideoType1["WebM"] = "webm";
18820
- VideoType1["MP4"] = "mp4";
18821
- return VideoType1;
18822
- }({});
18823
18822
  })();
18824
18823
  exports.VideoType = __webpack_exports__.VideoType;
18825
18824
  exports.VideomailClient = __webpack_exports__.VideomailClient;
package/dist/esm/index.js CHANGED
@@ -3454,13 +3454,12 @@ const constants = {
3454
3454
  }
3455
3455
  };
3456
3456
  var package_namespaceObject = {
3457
- rE: "11.3.1"
3457
+ rE: "11.3.2"
3458
+ };
3459
+ const VideoType = {
3460
+ WebM: "webm",
3461
+ MP4: "mp4"
3458
3462
  };
3459
- var VideoType_VideoType = /*#__PURE__*/ function(VideoType1) {
3460
- VideoType1["WebM"] = "webm";
3461
- VideoType1["MP4"] = "mp4";
3462
- return VideoType1;
3463
- }({});
3464
3463
  function canPlayType_canPlayType(video, type) {
3465
3464
  const canPlayType = video.canPlayType(`video/${type}`);
3466
3465
  if ("" === canPlayType) return false;
@@ -8199,4 +8198,4 @@ class VideomailClient extends util_Despot {
8199
8198
  }
8200
8199
  }
8201
8200
  const client = VideomailClient;
8202
- export { VideoType_VideoType as VideoType, client as VideomailClient };
8201
+ export { VideoType, client as VideomailClient };
@@ -1,4 +1,5 @@
1
- export declare enum VideoType {
2
- WebM = "webm",
3
- MP4 = "mp4"
4
- }
1
+ export declare const VideoType: {
2
+ readonly WebM: "webm";
3
+ readonly MP4: "mp4";
4
+ };
5
+ export type VideoTypeValue = (typeof VideoType)[keyof typeof VideoType];
@@ -1,8 +1,7 @@
1
1
  import { VideomailClientOptions } from "../types/options";
2
- import { VideoType } from "../types/VideoType";
3
2
  declare class Browser {
4
- private options;
5
- private result;
3
+ private readonly options;
4
+ private readonly result;
6
5
  private videoType;
7
6
  constructor(options: VideomailClientOptions);
8
7
  isIOS(): boolean;
@@ -15,7 +14,7 @@ declare class Browser {
15
14
  isChromeBased(): boolean;
16
15
  isMobile(): boolean;
17
16
  isOkSafari(): boolean;
18
- getVideoType(video: HTMLVideoElement): VideoType;
17
+ getVideoType(video: HTMLVideoElement): "mp4" | "webm";
19
18
  getNoAccessIssue(): import("./error/VideomailError").default;
20
19
  getUsefulData(): {
21
20
  ua: string;
@@ -1,3 +1,3 @@
1
- import { VideoType } from "../../../types/VideoType";
2
- declare function canPlayType(video: HTMLVideoElement, type: VideoType): false | "maybe" | "probably";
1
+ import { VideoTypeValue } from "../../../types/VideoType";
2
+ declare function canPlayType(video: HTMLVideoElement, type: VideoTypeValue): false | "maybe" | "probably";
3
3
  export default canPlayType;
@@ -1,6 +1,5 @@
1
1
  import { VideomailClientOptions } from "../../types/options";
2
2
  import Videomail from "../../types/Videomail";
3
- import { VideoType } from "../../types/VideoType";
4
3
  import Despot from "../../util/Despot";
5
4
  import { UnloadParams } from "../container";
6
5
  import Visuals from "../visuals";
@@ -23,7 +22,7 @@ declare class Replay extends Despot {
23
22
  private setVideoSource;
24
23
  setMp4Source(src?: string, bustCache?: boolean): void;
25
24
  setWebMSource(src?: string, bustCache?: boolean): void;
26
- getVideoType(): VideoType | undefined;
25
+ getVideoType(): "mp4" | "webm" | undefined;
27
26
  private pause;
28
27
  reset(cb?: any): void;
29
28
  hide(): void;
package/dist/umd/index.js CHANGED
@@ -10331,7 +10331,7 @@
10331
10331
  __webpack_require__.r(__webpack_exports__);
10332
10332
  __webpack_require__.d(__webpack_exports__, {
10333
10333
  VideomailClient: ()=>src_client,
10334
- VideoType: ()=>VideoType_VideoType
10334
+ VideoType: ()=>VideoType
10335
10335
  });
10336
10336
  const constants = {
10337
10337
  SITE_NAME_LABEL: "x-videomail-site-name",
@@ -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.3.1"
10497
+ rE: "11.3.2"
10498
10498
  };
10499
10499
  var defined = __webpack_require__("./node_modules/defined/index.js");
10500
10500
  var defined_default = /*#__PURE__*/ __webpack_require__.n(defined);
@@ -13630,6 +13630,10 @@
13630
13630
  NAME,
13631
13631
  VERSION
13632
13632
  ]);
13633
+ const VideoType = {
13634
+ WebM: "webm",
13635
+ MP4: "mp4"
13636
+ };
13633
13637
  function canPlayType_canPlayType(video, type) {
13634
13638
  const canPlayType = video.canPlayType(`video/${type}`);
13635
13639
  if ("" === canPlayType) return false;
@@ -14672,7 +14676,7 @@
14672
14676
  }
14673
14677
  };
14674
14678
  const src_options = options_options;
14675
- class CollectLogger_CollectLogger {
14679
+ class CollectLogger {
14676
14680
  browser;
14677
14681
  logger;
14678
14682
  stack = [];
@@ -14711,7 +14715,7 @@
14711
14715
  return this.stack;
14712
14716
  }
14713
14717
  }
14714
- const CollectLogger = CollectLogger_CollectLogger;
14718
+ const util_CollectLogger = CollectLogger;
14715
14719
  var process = __webpack_require__("./node_modules/process/browser.js");
14716
14720
  function isTest() {
14717
14721
  return "test" === process.env.ENVIRON;
@@ -14723,7 +14727,7 @@
14723
14727
  return source;
14724
14728
  }
14725
14729
  });
14726
- const collectLogger = new CollectLogger(newOptions);
14730
+ const collectLogger = new util_CollectLogger(newOptions);
14727
14731
  newOptions.logger = collectLogger;
14728
14732
  if (util_isTest()) newOptions.verbose = false;
14729
14733
  return newOptions;
@@ -14918,7 +14922,7 @@
14918
14922
  return outerWidth;
14919
14923
  }
14920
14924
  const getOuterWidth = getOuterWidth_getOuterWidth;
14921
- function limitWidth(element, options, width) {
14925
+ function limitWidth_limitWidth(element, options, width) {
14922
14926
  let limitedWidth;
14923
14927
  const outerWidth = getOuterWidth(element);
14924
14928
  limitedWidth = width && "number" == typeof width ? outerWidth > 0 && outerWidth < width ? outerWidth : width : outerWidth;
@@ -14928,7 +14932,7 @@
14928
14932
  });
14929
14933
  return limitedWidth;
14930
14934
  }
14931
- const dimensions_limitWidth = limitWidth;
14935
+ const limitWidth = limitWidth_limitWidth;
14932
14936
  var contains = __webpack_require__("./node_modules/contains/index.js");
14933
14937
  var contains_default = /*#__PURE__*/ __webpack_require__.n(contains);
14934
14938
  function disableElement(element) {
@@ -16092,7 +16096,7 @@
16092
16096
  message: `Unable to calculate height for target ${target} when width is less than 1 (= ${width}) and responsive mode is set to ${responsive}`,
16093
16097
  options
16094
16098
  });
16095
- if (responsive && element) width = dimensions_limitWidth(element, options, width);
16099
+ if (responsive && element) width = limitWidth(element, options, width);
16096
16100
  const chosenRatio = ratio ?? getRatio(options, void 0, videoWidth);
16097
16101
  const height = Math.round(width * chosenRatio);
16098
16102
  if (Number.isInteger(height) && height < 1) throw error_createError({
@@ -18167,7 +18171,7 @@
18167
18171
  }
18168
18172
  limitWidth(width) {
18169
18173
  if (!this.containerElement) return;
18170
- return dimensions_limitWidth(this.containerElement, this.options, width);
18174
+ return limitWidth(this.containerElement, this.options, width);
18171
18175
  }
18172
18176
  limitHeight(height) {
18173
18177
  return dimensions_limitHeight(height, this.options, "containers limitHeight fn");
@@ -18561,11 +18565,6 @@
18561
18565
  }
18562
18566
  }
18563
18567
  const src_client = VideomailClient;
18564
- var VideoType_VideoType = /*#__PURE__*/ function(VideoType1) {
18565
- VideoType1["WebM"] = "webm";
18566
- VideoType1["MP4"] = "mp4";
18567
- return VideoType1;
18568
- }({});
18569
18568
  })();
18570
18569
  return __webpack_exports__;
18571
18570
  })());
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "videomail-client",
3
- "version": "11.3.1",
3
+ "version": "11.3.2",
4
4
  "description": "A wicked npm package to record videos directly in the browser, wohooo!",
5
5
  "keywords": [
6
6
  "webcam",