videomail-client 13.8.20 → 13.8.22

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.
@@ -10852,7 +10852,7 @@ var __webpack_exports__ = {};
10852
10852
  var client = __webpack_require__("./node_modules/superagent/lib/client.js");
10853
10853
  var client_default = /*#__PURE__*/ __webpack_require__.n(client);
10854
10854
  var package_namespaceObject = {
10855
- rE: "13.8.20"
10855
+ rE: "13.8.22"
10856
10856
  };
10857
10857
  function isAudioEnabled(options) {
10858
10858
  return Boolean(options.audio.enabled);
@@ -18162,23 +18162,28 @@ var __webpack_exports__ = {};
18162
18162
  }
18163
18163
  correctDimensions(responsive, videoWidth, videoHeight) {
18164
18164
  if (!this.replayElement) throw new Error("There is no replay element to correct dimensions for.");
18165
- let height;
18166
- let width;
18165
+ let heightValue;
18166
+ let widthValue;
18167
18167
  let ratio;
18168
18168
  if (this.videomail) {
18169
- width = this.videomail.width;
18170
- height = this.videomail.height;
18171
- if (width) ratio = height / width;
18169
+ widthValue = this.videomail.width;
18170
+ heightValue = this.videomail.height;
18171
+ if (widthValue && heightValue) ratio = heightValue / widthValue;
18172
18172
  }
18173
- if (!width) width = dimensions_calculateWidth(responsive, this.options, videoHeight, ratio);
18174
- if (!height) {
18173
+ if (!widthValue) {
18174
+ const newWidthDimensions = dimensions_calculateWidth(responsive, this.options, videoHeight, ratio);
18175
+ const newWidth = newWidthDimensions.value;
18176
+ widthValue = newWidth;
18177
+ }
18178
+ if (!heightValue) {
18175
18179
  let element = this.visuals.getElement();
18176
18180
  if (!element) element = document.body;
18177
- height = dimensions_calculateHeight(responsive, videoWidth, this.options, ratio, element);
18181
+ const newDimensions = dimensions_calculateHeight(responsive, videoWidth, this.options, ratio, element);
18182
+ heightValue = newDimensions.value;
18178
18183
  }
18179
- if (width > 0) this.replayElement.style.width = `${width}px`;
18184
+ if (widthValue) this.replayElement.style.width = `${widthValue}px`;
18180
18185
  else this.replayElement.style.width = "auto";
18181
- if (height > 0) this.replayElement.style.height = `${height}px`;
18186
+ if (heightValue) this.replayElement.style.height = `${heightValue}px`;
18182
18187
  else this.replayElement.style.height = "auto";
18183
18188
  }
18184
18189
  setVideomail(newVideomail, playerOnly = false) {
package/dist/esm/index.js CHANGED
@@ -3613,7 +3613,7 @@ const constants = {
3613
3613
  }
3614
3614
  };
3615
3615
  var package_namespaceObject = {
3616
- rE: "13.8.20"
3616
+ rE: "13.8.22"
3617
3617
  };
3618
3618
  function isAudioEnabled(options) {
3619
3619
  return Boolean(options.audio.enabled);
@@ -7366,23 +7366,28 @@ class Replay extends util_Despot {
7366
7366
  }
7367
7367
  correctDimensions(responsive, videoWidth, videoHeight) {
7368
7368
  if (!this.replayElement) throw new Error("There is no replay element to correct dimensions for.");
7369
- let height;
7370
- let width;
7369
+ let heightValue;
7370
+ let widthValue;
7371
7371
  let ratio;
7372
7372
  if (this.videomail) {
7373
- width = this.videomail.width;
7374
- height = this.videomail.height;
7375
- if (width) ratio = height / width;
7373
+ widthValue = this.videomail.width;
7374
+ heightValue = this.videomail.height;
7375
+ if (widthValue && heightValue) ratio = heightValue / widthValue;
7376
7376
  }
7377
- if (!width) width = dimensions_calculateWidth(responsive, this.options, videoHeight, ratio);
7378
- if (!height) {
7377
+ if (!widthValue) {
7378
+ const newWidthDimensions = dimensions_calculateWidth(responsive, this.options, videoHeight, ratio);
7379
+ const newWidth = newWidthDimensions.value;
7380
+ widthValue = newWidth;
7381
+ }
7382
+ if (!heightValue) {
7379
7383
  let element = this.visuals.getElement();
7380
7384
  if (!element) element = document.body;
7381
- height = dimensions_calculateHeight(responsive, videoWidth, this.options, ratio, element);
7385
+ const newDimensions = dimensions_calculateHeight(responsive, videoWidth, this.options, ratio, element);
7386
+ heightValue = newDimensions.value;
7382
7387
  }
7383
- if (width > 0) this.replayElement.style.width = `${width}px`;
7388
+ if (widthValue) this.replayElement.style.width = `${widthValue}px`;
7384
7389
  else this.replayElement.style.width = "auto";
7385
- if (height > 0) this.replayElement.style.height = `${height}px`;
7390
+ if (heightValue) this.replayElement.style.height = `${heightValue}px`;
7386
7391
  else this.replayElement.style.height = "auto";
7387
7392
  }
7388
7393
  setVideomail(newVideomail, playerOnly = false) {
@@ -50,6 +50,7 @@ export interface Videomail {
50
50
  siteName?: string | undefined;
51
51
  url: string;
52
52
  userKey?: UserKey | undefined;
53
+ userPublicPoster?: string | undefined;
53
54
  versions: {
54
55
  videomailNinjaFormPlugin?: string;
55
56
  videomailClient: string;
@@ -151,6 +151,7 @@ declare class Form extends Despot {
151
151
  siteName?: string | undefined | undefined;
152
152
  url?: string;
153
153
  userKey?: string | undefined;
154
+ userPublicPoster?: string | undefined | undefined;
154
155
  versions?: {
155
156
  videomailNinjaFormPlugin?: string;
156
157
  videomailClient?: string;
@@ -326,6 +327,7 @@ declare class Form extends Despot {
326
327
  siteName?: string | undefined | undefined;
327
328
  url?: string;
328
329
  userKey?: string | undefined;
330
+ userPublicPoster?: string | undefined | undefined;
329
331
  versions?: {
330
332
  videomailNinjaFormPlugin?: string;
331
333
  videomailClient?: string;
package/dist/umd/index.js CHANGED
@@ -10858,7 +10858,7 @@
10858
10858
  var client = __webpack_require__("./node_modules/superagent/lib/client.js");
10859
10859
  var client_default = /*#__PURE__*/ __webpack_require__.n(client);
10860
10860
  var package_namespaceObject = {
10861
- rE: "13.8.20"
10861
+ rE: "13.8.22"
10862
10862
  };
10863
10863
  function isAudioEnabled(options) {
10864
10864
  return Boolean(options.audio.enabled);
@@ -17904,23 +17904,28 @@
17904
17904
  }
17905
17905
  correctDimensions(responsive, videoWidth, videoHeight) {
17906
17906
  if (!this.replayElement) throw new Error("There is no replay element to correct dimensions for.");
17907
- let height;
17908
- let width;
17907
+ let heightValue;
17908
+ let widthValue;
17909
17909
  let ratio;
17910
17910
  if (this.videomail) {
17911
- width = this.videomail.width;
17912
- height = this.videomail.height;
17913
- if (width) ratio = height / width;
17911
+ widthValue = this.videomail.width;
17912
+ heightValue = this.videomail.height;
17913
+ if (widthValue && heightValue) ratio = heightValue / widthValue;
17914
17914
  }
17915
- if (!width) width = dimensions_calculateWidth(responsive, this.options, videoHeight, ratio);
17916
- if (!height) {
17915
+ if (!widthValue) {
17916
+ const newWidthDimensions = dimensions_calculateWidth(responsive, this.options, videoHeight, ratio);
17917
+ const newWidth = newWidthDimensions.value;
17918
+ widthValue = newWidth;
17919
+ }
17920
+ if (!heightValue) {
17917
17921
  let element = this.visuals.getElement();
17918
17922
  if (!element) element = document.body;
17919
- height = dimensions_calculateHeight(responsive, videoWidth, this.options, ratio, element);
17923
+ const newDimensions = dimensions_calculateHeight(responsive, videoWidth, this.options, ratio, element);
17924
+ heightValue = newDimensions.value;
17920
17925
  }
17921
- if (width > 0) this.replayElement.style.width = `${width}px`;
17926
+ if (widthValue) this.replayElement.style.width = `${widthValue}px`;
17922
17927
  else this.replayElement.style.width = "auto";
17923
- if (height > 0) this.replayElement.style.height = `${height}px`;
17928
+ if (heightValue) this.replayElement.style.height = `${heightValue}px`;
17924
17929
  else this.replayElement.style.height = "auto";
17925
17930
  }
17926
17931
  setVideomail(newVideomail, playerOnly = false) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "videomail-client",
3
- "version": "13.8.20",
3
+ "version": "13.8.22",
4
4
  "description": "A wicked npm package to record videos directly in the browser, wohooo!",
5
5
  "keywords": [
6
6
  "webcam",
@@ -121,7 +121,7 @@
121
121
  "storybook-html-rsbuild": "3.3.3",
122
122
  "type-fest": "5.6.0",
123
123
  "typescript": "5.9.3",
124
- "typescript-eslint": "8.58.2",
124
+ "typescript-eslint": "8.59.0",
125
125
  "vitest": "4.1.4"
126
126
  },
127
127
  "engines": {