videomail-client 13.4.2 → 13.4.4
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/dist/cjs/index.cjs +7 -22
- package/dist/esm/index.js +7 -22
- package/dist/esm/util/html/dimensions/calculateHeight.d.ts +1 -1
- package/dist/umd/index.js +7 -22
- package/package.json +16 -16
package/dist/cjs/index.cjs
CHANGED
|
@@ -10664,7 +10664,7 @@ var __webpack_exports__ = {};
|
|
|
10664
10664
|
var client = __webpack_require__("./node_modules/superagent/lib/client.js");
|
|
10665
10665
|
var client_default = /*#__PURE__*/ __webpack_require__.n(client);
|
|
10666
10666
|
var package_namespaceObject = {
|
|
10667
|
-
rE: "13.4.
|
|
10667
|
+
rE: "13.4.4"
|
|
10668
10668
|
};
|
|
10669
10669
|
var defined = __webpack_require__("./node_modules/defined/index.js");
|
|
10670
10670
|
var defined_default = /*#__PURE__*/ __webpack_require__.n(defined);
|
|
@@ -16426,15 +16426,11 @@ var __webpack_exports__ = {};
|
|
|
16426
16426
|
return ratio;
|
|
16427
16427
|
}
|
|
16428
16428
|
const dimensions_getRatio = getRatio;
|
|
16429
|
-
function calculateHeight(responsive, videoWidth, options,
|
|
16429
|
+
function calculateHeight(responsive, videoWidth, options, ratio, element) {
|
|
16430
16430
|
const dimension = {
|
|
16431
16431
|
unit: "px"
|
|
16432
16432
|
};
|
|
16433
16433
|
let width = videoWidth;
|
|
16434
|
-
if (void 0 !== width && width < 1) throw error_createError({
|
|
16435
|
-
message: `Unable to calculate height for target ${target} when width is less than 1 (= ${width}) and responsive mode is set to ${responsive}`,
|
|
16436
|
-
options
|
|
16437
|
-
});
|
|
16438
16434
|
if (responsive && element) {
|
|
16439
16435
|
const limitedDimension = dimensions_limitWidth(element, options, width);
|
|
16440
16436
|
width = limitedDimension.value;
|
|
@@ -17863,15 +17859,9 @@ var __webpack_exports__ = {};
|
|
|
17863
17859
|
}
|
|
17864
17860
|
calculateHeight(responsive) {
|
|
17865
17861
|
let videoWidth;
|
|
17866
|
-
|
|
17867
|
-
if (this.
|
|
17868
|
-
|
|
17869
|
-
videoWidth = this.userMedia.getVideoWidth();
|
|
17870
|
-
} else if (this.recorderElement) {
|
|
17871
|
-
target = "recorderElement";
|
|
17872
|
-
videoWidth = this.recorderElement.videoWidth || this.recorderElement.width;
|
|
17873
|
-
}
|
|
17874
|
-
return dimensions_calculateHeight(responsive, videoWidth, this.options, target, this.getRatio(), this.recorderElement);
|
|
17862
|
+
if (this.userMedia) videoWidth = this.userMedia.getVideoWidth();
|
|
17863
|
+
else if (this.recorderElement) videoWidth = this.recorderElement.videoWidth || this.recorderElement.width;
|
|
17864
|
+
return dimensions_calculateHeight(responsive, videoWidth, this.options, this.getRatio(), this.recorderElement);
|
|
17875
17865
|
}
|
|
17876
17866
|
getRawVisualUserMedia() {
|
|
17877
17867
|
return this.recorderElement;
|
|
@@ -17946,13 +17936,8 @@ var __webpack_exports__ = {};
|
|
|
17946
17936
|
if (!width) width = dimensions_calculateWidth(responsive, videoHeight, this.options, ratio);
|
|
17947
17937
|
if (!height) {
|
|
17948
17938
|
let element = this.visuals.getElement();
|
|
17949
|
-
|
|
17950
|
-
|
|
17951
|
-
else {
|
|
17952
|
-
element = document.body;
|
|
17953
|
-
target = "document body";
|
|
17954
|
-
}
|
|
17955
|
-
height = dimensions_calculateHeight(responsive, videoWidth, this.options, target, ratio, element);
|
|
17939
|
+
if (!element) element = document.body;
|
|
17940
|
+
height = dimensions_calculateHeight(responsive, videoWidth, this.options, ratio, element);
|
|
17956
17941
|
}
|
|
17957
17942
|
if (width > 0) this.replayElement.style.width = `${width}px`;
|
|
17958
17943
|
else this.replayElement.style.width = "auto";
|
package/dist/esm/index.js
CHANGED
|
@@ -3606,7 +3606,7 @@ const constants = {
|
|
|
3606
3606
|
}
|
|
3607
3607
|
};
|
|
3608
3608
|
var package_namespaceObject = {
|
|
3609
|
-
rE: "13.4.
|
|
3609
|
+
rE: "13.4.4"
|
|
3610
3610
|
};
|
|
3611
3611
|
function canPlayType_canPlayType(video, type) {
|
|
3612
3612
|
const canPlayType = video.canPlayType(`video/${type}`);
|
|
@@ -5785,15 +5785,11 @@ function getRatio(options, videoHeight, videoWidth) {
|
|
|
5785
5785
|
return ratio;
|
|
5786
5786
|
}
|
|
5787
5787
|
const dimensions_getRatio = getRatio;
|
|
5788
|
-
function calculateHeight(responsive, videoWidth, options,
|
|
5788
|
+
function calculateHeight(responsive, videoWidth, options, ratio, element) {
|
|
5789
5789
|
const dimension = {
|
|
5790
5790
|
unit: "px"
|
|
5791
5791
|
};
|
|
5792
5792
|
let width = videoWidth;
|
|
5793
|
-
if (void 0 !== width && width < 1) throw error_createError({
|
|
5794
|
-
message: `Unable to calculate height for target ${target} when width is less than 1 (= ${width}) and responsive mode is set to ${responsive}`,
|
|
5795
|
-
options
|
|
5796
|
-
});
|
|
5797
5793
|
if (responsive && element) {
|
|
5798
5794
|
const limitedDimension = dimensions_limitWidth(element, options, width);
|
|
5799
5795
|
width = limitedDimension.value;
|
|
@@ -7194,15 +7190,9 @@ class Recorder extends util_Despot {
|
|
|
7194
7190
|
}
|
|
7195
7191
|
calculateHeight(responsive) {
|
|
7196
7192
|
let videoWidth;
|
|
7197
|
-
|
|
7198
|
-
if (this.
|
|
7199
|
-
|
|
7200
|
-
videoWidth = this.userMedia.getVideoWidth();
|
|
7201
|
-
} else if (this.recorderElement) {
|
|
7202
|
-
target = "recorderElement";
|
|
7203
|
-
videoWidth = this.recorderElement.videoWidth || this.recorderElement.width;
|
|
7204
|
-
}
|
|
7205
|
-
return dimensions_calculateHeight(responsive, videoWidth, this.options, target, this.getRatio(), this.recorderElement);
|
|
7193
|
+
if (this.userMedia) videoWidth = this.userMedia.getVideoWidth();
|
|
7194
|
+
else if (this.recorderElement) videoWidth = this.recorderElement.videoWidth || this.recorderElement.width;
|
|
7195
|
+
return dimensions_calculateHeight(responsive, videoWidth, this.options, this.getRatio(), this.recorderElement);
|
|
7206
7196
|
}
|
|
7207
7197
|
getRawVisualUserMedia() {
|
|
7208
7198
|
return this.recorderElement;
|
|
@@ -7268,13 +7258,8 @@ class Replay extends util_Despot {
|
|
|
7268
7258
|
if (!width) width = dimensions_calculateWidth(responsive, videoHeight, this.options, ratio);
|
|
7269
7259
|
if (!height) {
|
|
7270
7260
|
let element = this.visuals.getElement();
|
|
7271
|
-
|
|
7272
|
-
|
|
7273
|
-
else {
|
|
7274
|
-
element = document.body;
|
|
7275
|
-
target = "document body";
|
|
7276
|
-
}
|
|
7277
|
-
height = dimensions_calculateHeight(responsive, videoWidth, this.options, target, ratio, element);
|
|
7261
|
+
if (!element) element = document.body;
|
|
7262
|
+
height = dimensions_calculateHeight(responsive, videoWidth, this.options, ratio, element);
|
|
7278
7263
|
}
|
|
7279
7264
|
if (width > 0) this.replayElement.style.width = `${width}px`;
|
|
7280
7265
|
else this.replayElement.style.width = "auto";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { Dimension } from "../../../types/dimension";
|
|
2
2
|
import { VideomailClientOptions } from "../../../types/options";
|
|
3
|
-
declare function calculateHeight(responsive: boolean, videoWidth: number | undefined, options: VideomailClientOptions,
|
|
3
|
+
declare function calculateHeight(responsive: boolean, videoWidth: number | undefined, options: VideomailClientOptions, ratio?: number, element?: HTMLElement | null): Dimension;
|
|
4
4
|
export default calculateHeight;
|
package/dist/umd/index.js
CHANGED
|
@@ -10670,7 +10670,7 @@
|
|
|
10670
10670
|
var client = __webpack_require__("./node_modules/superagent/lib/client.js");
|
|
10671
10671
|
var client_default = /*#__PURE__*/ __webpack_require__.n(client);
|
|
10672
10672
|
var package_namespaceObject = {
|
|
10673
|
-
rE: "13.4.
|
|
10673
|
+
rE: "13.4.4"
|
|
10674
10674
|
};
|
|
10675
10675
|
var defined = __webpack_require__("./node_modules/defined/index.js");
|
|
10676
10676
|
var defined_default = /*#__PURE__*/ __webpack_require__.n(defined);
|
|
@@ -16187,15 +16187,11 @@
|
|
|
16187
16187
|
return ratio;
|
|
16188
16188
|
}
|
|
16189
16189
|
const dimensions_getRatio = getRatio;
|
|
16190
|
-
function calculateHeight(responsive, videoWidth, options,
|
|
16190
|
+
function calculateHeight(responsive, videoWidth, options, ratio, element) {
|
|
16191
16191
|
const dimension = {
|
|
16192
16192
|
unit: "px"
|
|
16193
16193
|
};
|
|
16194
16194
|
let width = videoWidth;
|
|
16195
|
-
if (void 0 !== width && width < 1) throw error_createError({
|
|
16196
|
-
message: `Unable to calculate height for target ${target} when width is less than 1 (= ${width}) and responsive mode is set to ${responsive}`,
|
|
16197
|
-
options
|
|
16198
|
-
});
|
|
16199
16195
|
if (responsive && element) {
|
|
16200
16196
|
const limitedDimension = dimensions_limitWidth(element, options, width);
|
|
16201
16197
|
width = limitedDimension.value;
|
|
@@ -17609,15 +17605,9 @@
|
|
|
17609
17605
|
}
|
|
17610
17606
|
calculateHeight(responsive) {
|
|
17611
17607
|
let videoWidth;
|
|
17612
|
-
|
|
17613
|
-
if (this.
|
|
17614
|
-
|
|
17615
|
-
videoWidth = this.userMedia.getVideoWidth();
|
|
17616
|
-
} else if (this.recorderElement) {
|
|
17617
|
-
target = "recorderElement";
|
|
17618
|
-
videoWidth = this.recorderElement.videoWidth || this.recorderElement.width;
|
|
17619
|
-
}
|
|
17620
|
-
return dimensions_calculateHeight(responsive, videoWidth, this.options, target, this.getRatio(), this.recorderElement);
|
|
17608
|
+
if (this.userMedia) videoWidth = this.userMedia.getVideoWidth();
|
|
17609
|
+
else if (this.recorderElement) videoWidth = this.recorderElement.videoWidth || this.recorderElement.width;
|
|
17610
|
+
return dimensions_calculateHeight(responsive, videoWidth, this.options, this.getRatio(), this.recorderElement);
|
|
17621
17611
|
}
|
|
17622
17612
|
getRawVisualUserMedia() {
|
|
17623
17613
|
return this.recorderElement;
|
|
@@ -17683,13 +17673,8 @@
|
|
|
17683
17673
|
if (!width) width = dimensions_calculateWidth(responsive, videoHeight, this.options, ratio);
|
|
17684
17674
|
if (!height) {
|
|
17685
17675
|
let element = this.visuals.getElement();
|
|
17686
|
-
|
|
17687
|
-
|
|
17688
|
-
else {
|
|
17689
|
-
element = document.body;
|
|
17690
|
-
target = "document body";
|
|
17691
|
-
}
|
|
17692
|
-
height = dimensions_calculateHeight(responsive, videoWidth, this.options, target, ratio, element);
|
|
17676
|
+
if (!element) element = document.body;
|
|
17677
|
+
height = dimensions_calculateHeight(responsive, videoWidth, this.options, ratio, element);
|
|
17693
17678
|
}
|
|
17694
17679
|
if (width > 0) this.replayElement.style.width = `${width}px`;
|
|
17695
17680
|
else this.replayElement.style.width = "auto";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "videomail-client",
|
|
3
|
-
"version": "13.4.
|
|
3
|
+
"version": "13.4.4",
|
|
4
4
|
"description": "A wicked npm package to record videos directly in the browser, wohooo!",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"webcam",
|
|
@@ -74,38 +74,38 @@
|
|
|
74
74
|
"websocket-stream": "5.5.2"
|
|
75
75
|
},
|
|
76
76
|
"devDependencies": {
|
|
77
|
-
"@chromatic-com/storybook": "4.1.
|
|
77
|
+
"@chromatic-com/storybook": "4.1.3",
|
|
78
78
|
"@eslint/config-inspector": "1.3.0",
|
|
79
79
|
"@eslint/js": "9.39.1",
|
|
80
80
|
"@rsbuild/plugin-node-polyfill": "1.4.2",
|
|
81
81
|
"@rsbuild/plugin-stylus": "1.2.0",
|
|
82
|
-
"@rsdoctor/rspack-plugin": "1.3.
|
|
83
|
-
"@rslib/core": "0.
|
|
84
|
-
"@storybook/addon-a11y": "10.0.
|
|
85
|
-
"@storybook/addon-docs": "10.0.
|
|
86
|
-
"@storybook/addon-links": "10.0.
|
|
87
|
-
"@storybook/html": "10.0.
|
|
88
|
-
"@tsconfig/node22": "22.0.
|
|
82
|
+
"@rsdoctor/rspack-plugin": "1.3.11",
|
|
83
|
+
"@rslib/core": "0.18.0",
|
|
84
|
+
"@storybook/addon-a11y": "10.0.8",
|
|
85
|
+
"@storybook/addon-docs": "10.0.8",
|
|
86
|
+
"@storybook/addon-links": "10.0.8",
|
|
87
|
+
"@storybook/html": "10.0.8",
|
|
88
|
+
"@tsconfig/node22": "22.0.5",
|
|
89
89
|
"@tsconfig/strictest": "2.0.8",
|
|
90
90
|
"@types/defined": "1.0.2",
|
|
91
91
|
"@types/node": "24.10.1",
|
|
92
92
|
"@types/superagent": "8.1.9",
|
|
93
93
|
"@types/ua-parser-js": "0.7.39",
|
|
94
|
-
"@vitest/eslint-plugin": "1.4.
|
|
94
|
+
"@vitest/eslint-plugin": "1.4.3",
|
|
95
95
|
"audit-ci": "7.1.0",
|
|
96
|
-
"chromatic": "13.3.
|
|
96
|
+
"chromatic": "13.3.4",
|
|
97
97
|
"cross-env": "10.1.0",
|
|
98
98
|
"eslint": "9.39.1",
|
|
99
99
|
"eslint-import-resolver-typescript": "4.4.4",
|
|
100
100
|
"eslint-plugin-de-morgan": "2.0.0",
|
|
101
101
|
"eslint-plugin-depend": "1.4.0",
|
|
102
102
|
"eslint-plugin-import-x": "4.16.1",
|
|
103
|
-
"eslint-plugin-package-json": "0.
|
|
103
|
+
"eslint-plugin-package-json": "0.85.0",
|
|
104
104
|
"eslint-plugin-promise": "7.2.1",
|
|
105
105
|
"eslint-plugin-regexp": "2.10.0",
|
|
106
106
|
"eslint-plugin-security": "3.0.1",
|
|
107
107
|
"eslint-plugin-simple-import-sort": "12.1.1",
|
|
108
|
-
"eslint-plugin-storybook": "10.0.
|
|
108
|
+
"eslint-plugin-storybook": "10.0.8",
|
|
109
109
|
"globals": "16.5.0",
|
|
110
110
|
"jsdom": "27.2.0",
|
|
111
111
|
"msw": "2.12.2",
|
|
@@ -115,12 +115,12 @@
|
|
|
115
115
|
"prettier-plugin-packagejson": "2.5.19",
|
|
116
116
|
"prettier-plugin-sh": "0.18.0",
|
|
117
117
|
"release-it": "19.0.6",
|
|
118
|
-
"storybook": "10.0.
|
|
119
|
-
"storybook-html-rsbuild": "2.1.
|
|
118
|
+
"storybook": "10.0.8",
|
|
119
|
+
"storybook-html-rsbuild": "2.1.6",
|
|
120
120
|
"type-fest": "5.2.0",
|
|
121
121
|
"typescript": "5.9.3",
|
|
122
122
|
"typescript-eslint": "8.41.0",
|
|
123
|
-
"vitest": "4.0.
|
|
123
|
+
"vitest": "4.0.13"
|
|
124
124
|
},
|
|
125
125
|
"engines": {
|
|
126
126
|
"node": "^24.11.0",
|