videomail-client 13.6.5 → 13.6.7
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 +37 -32
- package/dist/esm/index.js +32 -22
- package/dist/esm/types/Videomail.d.ts +2 -1
- package/dist/esm/wrappers/form.d.ts +4 -2
- package/dist/esm/wrappers/visuals/recorder.d.ts +1 -1
- package/dist/esm/wrappers/visuals.d.ts +1 -1
- package/dist/umd/index.js +32 -22
- package/package.json +6 -6
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.6.
|
|
10667
|
+
rE: "13.6.7"
|
|
10668
10668
|
};
|
|
10669
10669
|
function isAudioEnabled(options) {
|
|
10670
10670
|
return Boolean(options.audio.enabled);
|
|
@@ -13987,6 +13987,7 @@ var __webpack_exports__ = {};
|
|
|
13987
13987
|
return this.classList;
|
|
13988
13988
|
}
|
|
13989
13989
|
constructor(message, options, classList, errData){
|
|
13990
|
+
var _ref;
|
|
13990
13991
|
super(message, errData), VideomailError_define_property(this, "title", "Error from videomail-client npm package"), VideomailError_define_property(this, "location", window.location.href), VideomailError_define_property(this, "logLines", void 0), VideomailError_define_property(this, "siteName", void 0), VideomailError_define_property(this, "cookie", void 0), VideomailError_define_property(this, "err", void 0), VideomailError_define_property(this, "promise", void 0), VideomailError_define_property(this, "reason", void 0), VideomailError_define_property(this, "browser", void 0), VideomailError_define_property(this, "cpu", void 0), VideomailError_define_property(this, "device", void 0), VideomailError_define_property(this, "engine", void 0), VideomailError_define_property(this, "os", void 0), VideomailError_define_property(this, "screen", void 0), VideomailError_define_property(this, "orientation", void 0), VideomailError_define_property(this, "classList", void 0);
|
|
13991
13992
|
this.explanation = null == errData ? void 0 : errData.explanation;
|
|
13992
13993
|
this.logLines = null == errData ? void 0 : errData.logLines;
|
|
@@ -14009,7 +14010,6 @@ var __webpack_exports__ = {};
|
|
|
14009
14010
|
].join("×");
|
|
14010
14011
|
if (screen.orientation) this.orientation = screen.orientation.type;
|
|
14011
14012
|
this.err = null == errData ? void 0 : errData.err;
|
|
14012
|
-
var _ref;
|
|
14013
14013
|
const stackTarget = null != (_ref = null == errData ? void 0 : errData.cause) ? _ref : null == errData ? void 0 : errData.err;
|
|
14014
14014
|
if (stackTarget) {
|
|
14015
14015
|
if ("captureStackTrace" in Error) Error.captureStackTrace(stackTarget, VideomailError);
|
|
@@ -14030,16 +14030,15 @@ var __webpack_exports__ = {};
|
|
|
14030
14030
|
VideomailError_define_property(VideomailError, "INVALID_STATE_ERROR", "InvalidStateError");
|
|
14031
14031
|
const error_VideomailError = VideomailError;
|
|
14032
14032
|
function createError(errorParams) {
|
|
14033
|
+
var _errorParams_classList, _ref;
|
|
14033
14034
|
const { exc, options } = errorParams;
|
|
14034
14035
|
let err = errorParams.err;
|
|
14035
14036
|
if (!err && exc instanceof Error) err = exc;
|
|
14036
14037
|
if (err instanceof error_VideomailError) return err;
|
|
14037
14038
|
let message = errorParams.message;
|
|
14038
14039
|
let explanation = errorParams.explanation;
|
|
14039
|
-
var _errorParams_classList;
|
|
14040
14040
|
const classList = null != (_errorParams_classList = errorParams.classList) ? _errorParams_classList : [];
|
|
14041
14041
|
const audioEnabled = isAudioEnabled(options);
|
|
14042
|
-
var _ref;
|
|
14043
14042
|
const errName = null != (_ref = null == err ? void 0 : err.name) ? _ref : null == err ? void 0 : err.constructor.name;
|
|
14044
14043
|
switch(errName){
|
|
14045
14044
|
case error_VideomailError.SECURITY_ERROR:
|
|
@@ -14593,11 +14592,11 @@ var __webpack_exports__ = {};
|
|
|
14593
14592
|
}
|
|
14594
14593
|
doTheSubmit(e) {
|
|
14595
14594
|
return _async_to_generator(function*() {
|
|
14595
|
+
var _this_formElement_getAttribute;
|
|
14596
14596
|
if (e) {
|
|
14597
14597
|
this.options.logger.debug(`Form: doTheSubmit(${util_pretty(e)})`);
|
|
14598
14598
|
e.preventDefault();
|
|
14599
14599
|
} else this.options.logger.debug("Form: doTheSubmit()");
|
|
14600
|
-
var _this_formElement_getAttribute;
|
|
14601
14600
|
const url = null != (_this_formElement_getAttribute = this.formElement.getAttribute("action")) ? _this_formElement_getAttribute : this.options.apiUrl;
|
|
14602
14601
|
const method = this.formElement.getAttribute("method");
|
|
14603
14602
|
let chosenMethod;
|
|
@@ -16189,7 +16188,7 @@ var __webpack_exports__ = {};
|
|
|
16189
16188
|
if (this.options.video.stretch) {
|
|
16190
16189
|
const heightDimension = this.visuals.getRecorderHeight(true, true);
|
|
16191
16190
|
this.notifyElement.style.width = "auto";
|
|
16192
|
-
this.notifyElement.style.height = `${heightDimension.value}${heightDimension.unit}`;
|
|
16191
|
+
if (heightDimension) this.notifyElement.style.height = `${heightDimension.value}${heightDimension.unit}`;
|
|
16193
16192
|
} else {
|
|
16194
16193
|
let heightDimension;
|
|
16195
16194
|
let widthDimension = dimensions_useFullWidth(this.options.video.mobileBreakPoint);
|
|
@@ -16301,20 +16300,16 @@ var __webpack_exports__ = {};
|
|
|
16301
16300
|
return this.built;
|
|
16302
16301
|
}
|
|
16303
16302
|
notify(message, explanation, notifyOptions = {}) {
|
|
16303
|
+
var _notifyOptions_stillWait, _notifyOptions_entertain, _notifyOptions_blocking, _notifyOptions_classList, _notifyOptions_removeDimensions;
|
|
16304
16304
|
const params = [
|
|
16305
16305
|
message,
|
|
16306
16306
|
explanation
|
|
16307
16307
|
].filter(Boolean);
|
|
16308
16308
|
this.options.logger.debug(`Notifier: notify(${params.join(", ")})`);
|
|
16309
|
-
var _notifyOptions_stillWait;
|
|
16310
16309
|
const stillWait = null != (_notifyOptions_stillWait = notifyOptions.stillWait) ? _notifyOptions_stillWait : false;
|
|
16311
|
-
var _notifyOptions_entertain;
|
|
16312
16310
|
const entertain = null != (_notifyOptions_entertain = notifyOptions.entertain) ? _notifyOptions_entertain : false;
|
|
16313
|
-
var _notifyOptions_blocking;
|
|
16314
16311
|
const blocking = null != (_notifyOptions_blocking = notifyOptions.blocking) ? _notifyOptions_blocking : false;
|
|
16315
|
-
var _notifyOptions_classList;
|
|
16316
16312
|
const classList = null != (_notifyOptions_classList = notifyOptions.classList) ? _notifyOptions_classList : false;
|
|
16317
|
-
var _notifyOptions_removeDimensions;
|
|
16318
16313
|
const removeDimensions = null != (_notifyOptions_removeDimensions = notifyOptions.removeDimensions) ? _notifyOptions_removeDimensions : false;
|
|
16319
16314
|
if (this.notifyElement) {
|
|
16320
16315
|
if (!entertain) this.notifyElement.className = "notifier";
|
|
@@ -17080,6 +17075,7 @@ var __webpack_exports__ = {};
|
|
|
17080
17075
|
this.updateOverallProgress();
|
|
17081
17076
|
}
|
|
17082
17077
|
preview(args) {
|
|
17078
|
+
var _args_duration;
|
|
17083
17079
|
if (!args) throw error_createError({
|
|
17084
17080
|
message: "Preview arguments are missing.",
|
|
17085
17081
|
options: this.options
|
|
@@ -17093,12 +17089,11 @@ var __webpack_exports__ = {};
|
|
|
17093
17089
|
this.hide();
|
|
17094
17090
|
const widthDimension = this.getRecorderWidth(true);
|
|
17095
17091
|
const heightDimension = this.getRecorderHeight(true);
|
|
17096
|
-
var _args_duration;
|
|
17097
17092
|
const duration = null != (_args_duration = args.duration) ? _args_duration : -1;
|
|
17098
17093
|
this.emit("PREVIEW", {
|
|
17099
17094
|
key: this.key,
|
|
17100
17095
|
width: null == widthDimension ? void 0 : widthDimension.value,
|
|
17101
|
-
height: heightDimension.value,
|
|
17096
|
+
height: null == heightDimension ? void 0 : heightDimension.value,
|
|
17102
17097
|
hasAudio,
|
|
17103
17098
|
duration
|
|
17104
17099
|
});
|
|
@@ -17718,7 +17713,7 @@ var __webpack_exports__ = {};
|
|
|
17718
17713
|
}
|
|
17719
17714
|
if (this.options.video.height) {
|
|
17720
17715
|
const recorderHeight = this.getRecorderHeight(true);
|
|
17721
|
-
if (recorderHeight.value) this.recorderElement.height = recorderHeight.value;
|
|
17716
|
+
if (null == recorderHeight ? void 0 : recorderHeight.value) this.recorderElement.height = recorderHeight.value;
|
|
17722
17717
|
else this.recorderElement.style.removeProperty("height");
|
|
17723
17718
|
}
|
|
17724
17719
|
}
|
|
@@ -17830,29 +17825,28 @@ var __webpack_exports__ = {};
|
|
|
17830
17825
|
return dimension;
|
|
17831
17826
|
}
|
|
17832
17827
|
getRecorderHeight(responsive, useBoundingClientRect) {
|
|
17828
|
+
let recorderHeight;
|
|
17833
17829
|
if (this.recorderElement && useBoundingClientRect) {
|
|
17834
17830
|
const height = this.recorderElement.getBoundingClientRect().height;
|
|
17835
|
-
|
|
17831
|
+
recorderHeight = {
|
|
17836
17832
|
unit: "px",
|
|
17837
17833
|
value: height
|
|
17838
17834
|
};
|
|
17839
|
-
|
|
17840
|
-
}
|
|
17841
|
-
if (this.userMedia) {
|
|
17835
|
+
} else if (this.userMedia) {
|
|
17842
17836
|
const height = this.userMedia.getRawHeight(responsive);
|
|
17843
|
-
|
|
17837
|
+
recorderHeight = {
|
|
17838
|
+
unit: "px",
|
|
17839
|
+
value: height
|
|
17840
|
+
};
|
|
17841
|
+
} else if (responsive && this.options.video.height) recorderHeight = this.calculateHeight(responsive);
|
|
17842
|
+
else if (this.options.video.height) {
|
|
17843
|
+
const height = this.options.video.height;
|
|
17844
|
+
recorderHeight = {
|
|
17844
17845
|
unit: "px",
|
|
17845
17846
|
value: height
|
|
17846
17847
|
};
|
|
17847
|
-
return dimension;
|
|
17848
17848
|
}
|
|
17849
|
-
|
|
17850
|
-
const height = this.options.video.height;
|
|
17851
|
-
const dimension = {
|
|
17852
|
-
unit: "px",
|
|
17853
|
-
value: height
|
|
17854
|
-
};
|
|
17855
|
-
return dimension;
|
|
17849
|
+
return recorderHeight;
|
|
17856
17850
|
}
|
|
17857
17851
|
getRatio() {
|
|
17858
17852
|
let ratio;
|
|
@@ -17871,10 +17865,21 @@ var __webpack_exports__ = {};
|
|
|
17871
17865
|
return dimensions_calculateWidth(responsive, videoHeight, this.options, this.getRatio());
|
|
17872
17866
|
}
|
|
17873
17867
|
calculateHeight(responsive) {
|
|
17874
|
-
let
|
|
17875
|
-
if (this.userMedia)
|
|
17876
|
-
|
|
17877
|
-
|
|
17868
|
+
let videoDimension;
|
|
17869
|
+
if (this.userMedia) {
|
|
17870
|
+
const videoHeight = this.userMedia.getVideoHeight();
|
|
17871
|
+
videoDimension = {
|
|
17872
|
+
value: videoHeight,
|
|
17873
|
+
unit: "px"
|
|
17874
|
+
};
|
|
17875
|
+
} else if (this.recorderElement) {
|
|
17876
|
+
const videoHeight = this.recorderElement.videoHeight || this.recorderElement.height;
|
|
17877
|
+
videoDimension = {
|
|
17878
|
+
value: videoHeight,
|
|
17879
|
+
unit: "px"
|
|
17880
|
+
};
|
|
17881
|
+
} else videoDimension = dimensions_calculateHeight(responsive, void 0, this.options, this.getRatio(), this.recorderElement);
|
|
17882
|
+
return videoDimension;
|
|
17878
17883
|
}
|
|
17879
17884
|
getRawVisualUserMedia() {
|
|
17880
17885
|
return this.recorderElement;
|
|
@@ -18664,7 +18669,7 @@ var __webpack_exports__ = {};
|
|
|
18664
18669
|
const widthDimension = this.visuals.getRecorderWidth(true);
|
|
18665
18670
|
const heightDimension = this.visuals.getRecorderHeight(true);
|
|
18666
18671
|
videomailFormData.width = null == widthDimension ? void 0 : widthDimension.value;
|
|
18667
|
-
videomailFormData.height = heightDimension.value;
|
|
18672
|
+
videomailFormData.height = null == heightDimension ? void 0 : heightDimension.value;
|
|
18668
18673
|
return yield this.resource.post(videomailFormData);
|
|
18669
18674
|
}
|
|
18670
18675
|
if (method === FormMethod.PUT) return yield this.resource.put(videomailFormData);
|
package/dist/esm/index.js
CHANGED
|
@@ -3606,7 +3606,7 @@ const constants = {
|
|
|
3606
3606
|
}
|
|
3607
3607
|
};
|
|
3608
3608
|
var package_namespaceObject = {
|
|
3609
|
-
rE: "13.6.
|
|
3609
|
+
rE: "13.6.7"
|
|
3610
3610
|
};
|
|
3611
3611
|
function isAudioEnabled(options) {
|
|
3612
3612
|
return Boolean(options.audio.enabled);
|
|
@@ -5626,7 +5626,7 @@ class Notifier extends util_Despot {
|
|
|
5626
5626
|
if (this.options.video.stretch) {
|
|
5627
5627
|
const heightDimension = this.visuals.getRecorderHeight(true, true);
|
|
5628
5628
|
this.notifyElement.style.width = "auto";
|
|
5629
|
-
this.notifyElement.style.height = `${heightDimension.value}${heightDimension.unit}`;
|
|
5629
|
+
if (heightDimension) this.notifyElement.style.height = `${heightDimension.value}${heightDimension.unit}`;
|
|
5630
5630
|
} else {
|
|
5631
5631
|
let heightDimension;
|
|
5632
5632
|
let widthDimension = dimensions_useFullWidth(this.options.video.mobileBreakPoint);
|
|
@@ -6448,7 +6448,7 @@ class Recorder extends util_Despot {
|
|
|
6448
6448
|
this.emit("PREVIEW", {
|
|
6449
6449
|
key: this.key,
|
|
6450
6450
|
width: widthDimension?.value,
|
|
6451
|
-
height: heightDimension
|
|
6451
|
+
height: heightDimension?.value,
|
|
6452
6452
|
hasAudio,
|
|
6453
6453
|
duration
|
|
6454
6454
|
});
|
|
@@ -7056,7 +7056,7 @@ class Recorder extends util_Despot {
|
|
|
7056
7056
|
}
|
|
7057
7057
|
if (this.options.video.height) {
|
|
7058
7058
|
const recorderHeight = this.getRecorderHeight(true);
|
|
7059
|
-
if (recorderHeight
|
|
7059
|
+
if (recorderHeight?.value) this.recorderElement.height = recorderHeight.value;
|
|
7060
7060
|
else this.recorderElement.style.removeProperty("height");
|
|
7061
7061
|
}
|
|
7062
7062
|
}
|
|
@@ -7164,29 +7164,28 @@ class Recorder extends util_Despot {
|
|
|
7164
7164
|
return dimension;
|
|
7165
7165
|
}
|
|
7166
7166
|
getRecorderHeight(responsive, useBoundingClientRect) {
|
|
7167
|
+
let recorderHeight;
|
|
7167
7168
|
if (this.recorderElement && useBoundingClientRect) {
|
|
7168
7169
|
const height = this.recorderElement.getBoundingClientRect().height;
|
|
7169
|
-
|
|
7170
|
+
recorderHeight = {
|
|
7170
7171
|
unit: "px",
|
|
7171
7172
|
value: height
|
|
7172
7173
|
};
|
|
7173
|
-
|
|
7174
|
-
}
|
|
7175
|
-
if (this.userMedia) {
|
|
7174
|
+
} else if (this.userMedia) {
|
|
7176
7175
|
const height = this.userMedia.getRawHeight(responsive);
|
|
7177
|
-
|
|
7176
|
+
recorderHeight = {
|
|
7177
|
+
unit: "px",
|
|
7178
|
+
value: height
|
|
7179
|
+
};
|
|
7180
|
+
} else if (responsive && this.options.video.height) recorderHeight = this.calculateHeight(responsive);
|
|
7181
|
+
else if (this.options.video.height) {
|
|
7182
|
+
const height = this.options.video.height;
|
|
7183
|
+
recorderHeight = {
|
|
7178
7184
|
unit: "px",
|
|
7179
7185
|
value: height
|
|
7180
7186
|
};
|
|
7181
|
-
return dimension;
|
|
7182
7187
|
}
|
|
7183
|
-
|
|
7184
|
-
const height = this.options.video.height;
|
|
7185
|
-
const dimension = {
|
|
7186
|
-
unit: "px",
|
|
7187
|
-
value: height
|
|
7188
|
-
};
|
|
7189
|
-
return dimension;
|
|
7188
|
+
return recorderHeight;
|
|
7190
7189
|
}
|
|
7191
7190
|
getRatio() {
|
|
7192
7191
|
let ratio;
|
|
@@ -7205,10 +7204,21 @@ class Recorder extends util_Despot {
|
|
|
7205
7204
|
return dimensions_calculateWidth(responsive, videoHeight, this.options, this.getRatio());
|
|
7206
7205
|
}
|
|
7207
7206
|
calculateHeight(responsive) {
|
|
7208
|
-
let
|
|
7209
|
-
if (this.userMedia)
|
|
7210
|
-
|
|
7211
|
-
|
|
7207
|
+
let videoDimension;
|
|
7208
|
+
if (this.userMedia) {
|
|
7209
|
+
const videoHeight = this.userMedia.getVideoHeight();
|
|
7210
|
+
videoDimension = {
|
|
7211
|
+
value: videoHeight,
|
|
7212
|
+
unit: "px"
|
|
7213
|
+
};
|
|
7214
|
+
} else if (this.recorderElement) {
|
|
7215
|
+
const videoHeight = this.recorderElement.videoHeight || this.recorderElement.height;
|
|
7216
|
+
videoDimension = {
|
|
7217
|
+
value: videoHeight,
|
|
7218
|
+
unit: "px"
|
|
7219
|
+
};
|
|
7220
|
+
} else videoDimension = dimensions_calculateHeight(responsive, void 0, this.options, this.getRatio(), this.recorderElement);
|
|
7221
|
+
return videoDimension;
|
|
7212
7222
|
}
|
|
7213
7223
|
getRawVisualUserMedia() {
|
|
7214
7224
|
return this.recorderElement;
|
|
@@ -7936,7 +7946,7 @@ class Container extends util_Despot {
|
|
|
7936
7946
|
const widthDimension = this.visuals.getRecorderWidth(true);
|
|
7937
7947
|
const heightDimension = this.visuals.getRecorderHeight(true);
|
|
7938
7948
|
videomailFormData.width = widthDimension?.value;
|
|
7939
|
-
videomailFormData.height = heightDimension
|
|
7949
|
+
videomailFormData.height = heightDimension?.value;
|
|
7940
7950
|
return await this.resource.post(videomailFormData);
|
|
7941
7951
|
}
|
|
7942
7952
|
if (method === FormMethod.PUT) return await this.resource.put(videomailFormData);
|
|
@@ -13,7 +13,6 @@ export interface Videomail {
|
|
|
13
13
|
cc?: EmailAddresses | undefined;
|
|
14
14
|
alias: string;
|
|
15
15
|
connection?: Record<string, number | string>;
|
|
16
|
-
correctUrl: string;
|
|
17
16
|
dateCreated: number;
|
|
18
17
|
dateCreatedServerPretty: string;
|
|
19
18
|
dateUpdated?: number;
|
|
@@ -56,5 +55,7 @@ export interface Videomail {
|
|
|
56
55
|
rejectedTo?: DeliveryRecord;
|
|
57
56
|
rejectedCc?: DeliveryRecord;
|
|
58
57
|
rejectedBcc?: DeliveryRecord;
|
|
58
|
+
editUrl?: string;
|
|
59
|
+
repeatUrl?: string;
|
|
59
60
|
}
|
|
60
61
|
export type PartialVideomail = PartialDeep<Videomail>;
|
|
@@ -27,7 +27,6 @@ declare class Form extends Despot {
|
|
|
27
27
|
connection?: {
|
|
28
28
|
[x: string]: string | number | undefined;
|
|
29
29
|
};
|
|
30
|
-
correctUrl?: string;
|
|
31
30
|
dateCreated?: number;
|
|
32
31
|
dateCreatedServerPretty?: string;
|
|
33
32
|
dateUpdated?: number;
|
|
@@ -153,6 +152,8 @@ declare class Form extends Despot {
|
|
|
153
152
|
userKey?: string | false;
|
|
154
153
|
} | undefined;
|
|
155
154
|
};
|
|
155
|
+
editUrl?: string;
|
|
156
|
+
repeatUrl?: string;
|
|
156
157
|
};
|
|
157
158
|
getRecipients(): {
|
|
158
159
|
subject?: string;
|
|
@@ -165,7 +166,6 @@ declare class Form extends Despot {
|
|
|
165
166
|
connection?: {
|
|
166
167
|
[x: string]: string | number | undefined;
|
|
167
168
|
};
|
|
168
|
-
correctUrl?: string;
|
|
169
169
|
dateCreated?: number;
|
|
170
170
|
dateCreatedServerPretty?: string;
|
|
171
171
|
dateUpdated?: number;
|
|
@@ -291,6 +291,8 @@ declare class Form extends Despot {
|
|
|
291
291
|
userKey?: string | false;
|
|
292
292
|
} | undefined;
|
|
293
293
|
};
|
|
294
|
+
editUrl?: string;
|
|
295
|
+
repeatUrl?: string;
|
|
294
296
|
};
|
|
295
297
|
loadVideomail(videomail: Videomail): void;
|
|
296
298
|
private setDisabled;
|
|
@@ -102,7 +102,7 @@ declare class Recorder extends Despot {
|
|
|
102
102
|
hide(): void;
|
|
103
103
|
isUnloaded(): boolean | undefined;
|
|
104
104
|
getRecorderWidth(responsive: boolean): Dimension | undefined;
|
|
105
|
-
getRecorderHeight(responsive: boolean, useBoundingClientRect?: boolean): Dimension;
|
|
105
|
+
getRecorderHeight(responsive: boolean, useBoundingClientRect?: boolean): Dimension | undefined;
|
|
106
106
|
private getRatio;
|
|
107
107
|
calculateWidth(responsive: boolean): Dimension;
|
|
108
108
|
calculateHeight(responsive: boolean): Dimension;
|
|
@@ -54,7 +54,7 @@ declare class Visuals extends Despot {
|
|
|
54
54
|
isRecorderUnloaded(): boolean | undefined;
|
|
55
55
|
isConnecting(): boolean;
|
|
56
56
|
getRecorderWidth(responsive: boolean): Dimension | undefined;
|
|
57
|
-
getRecorderHeight(responsive: boolean, useBoundingClientRect?: boolean): Dimension;
|
|
57
|
+
getRecorderHeight(responsive: boolean, useBoundingClientRect?: boolean): Dimension | undefined;
|
|
58
58
|
limitWidth(width?: number): Dimension | undefined;
|
|
59
59
|
limitHeight(height: number): Dimension;
|
|
60
60
|
getReplay(): Replay;
|
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.6.
|
|
10673
|
+
rE: "13.6.7"
|
|
10674
10674
|
};
|
|
10675
10675
|
function isAudioEnabled(options) {
|
|
10676
10676
|
return Boolean(options.audio.enabled);
|
|
@@ -15962,7 +15962,7 @@
|
|
|
15962
15962
|
if (this.options.video.stretch) {
|
|
15963
15963
|
const heightDimension = this.visuals.getRecorderHeight(true, true);
|
|
15964
15964
|
this.notifyElement.style.width = "auto";
|
|
15965
|
-
this.notifyElement.style.height = `${heightDimension.value}${heightDimension.unit}`;
|
|
15965
|
+
if (heightDimension) this.notifyElement.style.height = `${heightDimension.value}${heightDimension.unit}`;
|
|
15966
15966
|
} else {
|
|
15967
15967
|
let heightDimension;
|
|
15968
15968
|
let widthDimension = dimensions_useFullWidth(this.options.video.mobileBreakPoint);
|
|
@@ -16860,7 +16860,7 @@
|
|
|
16860
16860
|
this.emit("PREVIEW", {
|
|
16861
16861
|
key: this.key,
|
|
16862
16862
|
width: widthDimension?.value,
|
|
16863
|
-
height: heightDimension
|
|
16863
|
+
height: heightDimension?.value,
|
|
16864
16864
|
hasAudio,
|
|
16865
16865
|
duration
|
|
16866
16866
|
});
|
|
@@ -17468,7 +17468,7 @@
|
|
|
17468
17468
|
}
|
|
17469
17469
|
if (this.options.video.height) {
|
|
17470
17470
|
const recorderHeight = this.getRecorderHeight(true);
|
|
17471
|
-
if (recorderHeight
|
|
17471
|
+
if (recorderHeight?.value) this.recorderElement.height = recorderHeight.value;
|
|
17472
17472
|
else this.recorderElement.style.removeProperty("height");
|
|
17473
17473
|
}
|
|
17474
17474
|
}
|
|
@@ -17576,29 +17576,28 @@
|
|
|
17576
17576
|
return dimension;
|
|
17577
17577
|
}
|
|
17578
17578
|
getRecorderHeight(responsive, useBoundingClientRect) {
|
|
17579
|
+
let recorderHeight;
|
|
17579
17580
|
if (this.recorderElement && useBoundingClientRect) {
|
|
17580
17581
|
const height = this.recorderElement.getBoundingClientRect().height;
|
|
17581
|
-
|
|
17582
|
+
recorderHeight = {
|
|
17582
17583
|
unit: "px",
|
|
17583
17584
|
value: height
|
|
17584
17585
|
};
|
|
17585
|
-
|
|
17586
|
-
}
|
|
17587
|
-
if (this.userMedia) {
|
|
17586
|
+
} else if (this.userMedia) {
|
|
17588
17587
|
const height = this.userMedia.getRawHeight(responsive);
|
|
17589
|
-
|
|
17588
|
+
recorderHeight = {
|
|
17589
|
+
unit: "px",
|
|
17590
|
+
value: height
|
|
17591
|
+
};
|
|
17592
|
+
} else if (responsive && this.options.video.height) recorderHeight = this.calculateHeight(responsive);
|
|
17593
|
+
else if (this.options.video.height) {
|
|
17594
|
+
const height = this.options.video.height;
|
|
17595
|
+
recorderHeight = {
|
|
17590
17596
|
unit: "px",
|
|
17591
17597
|
value: height
|
|
17592
17598
|
};
|
|
17593
|
-
return dimension;
|
|
17594
17599
|
}
|
|
17595
|
-
|
|
17596
|
-
const height = this.options.video.height;
|
|
17597
|
-
const dimension = {
|
|
17598
|
-
unit: "px",
|
|
17599
|
-
value: height
|
|
17600
|
-
};
|
|
17601
|
-
return dimension;
|
|
17600
|
+
return recorderHeight;
|
|
17602
17601
|
}
|
|
17603
17602
|
getRatio() {
|
|
17604
17603
|
let ratio;
|
|
@@ -17617,10 +17616,21 @@
|
|
|
17617
17616
|
return dimensions_calculateWidth(responsive, videoHeight, this.options, this.getRatio());
|
|
17618
17617
|
}
|
|
17619
17618
|
calculateHeight(responsive) {
|
|
17620
|
-
let
|
|
17621
|
-
if (this.userMedia)
|
|
17622
|
-
|
|
17623
|
-
|
|
17619
|
+
let videoDimension;
|
|
17620
|
+
if (this.userMedia) {
|
|
17621
|
+
const videoHeight = this.userMedia.getVideoHeight();
|
|
17622
|
+
videoDimension = {
|
|
17623
|
+
value: videoHeight,
|
|
17624
|
+
unit: "px"
|
|
17625
|
+
};
|
|
17626
|
+
} else if (this.recorderElement) {
|
|
17627
|
+
const videoHeight = this.recorderElement.videoHeight || this.recorderElement.height;
|
|
17628
|
+
videoDimension = {
|
|
17629
|
+
value: videoHeight,
|
|
17630
|
+
unit: "px"
|
|
17631
|
+
};
|
|
17632
|
+
} else videoDimension = dimensions_calculateHeight(responsive, void 0, this.options, this.getRatio(), this.recorderElement);
|
|
17633
|
+
return videoDimension;
|
|
17624
17634
|
}
|
|
17625
17635
|
getRawVisualUserMedia() {
|
|
17626
17636
|
return this.recorderElement;
|
|
@@ -18348,7 +18358,7 @@
|
|
|
18348
18358
|
const widthDimension = this.visuals.getRecorderWidth(true);
|
|
18349
18359
|
const heightDimension = this.visuals.getRecorderHeight(true);
|
|
18350
18360
|
videomailFormData.width = widthDimension?.value;
|
|
18351
|
-
videomailFormData.height = heightDimension
|
|
18361
|
+
videomailFormData.height = heightDimension?.value;
|
|
18352
18362
|
return await this.resource.post(videomailFormData);
|
|
18353
18363
|
}
|
|
18354
18364
|
if (method === FormMethod.PUT) return await this.resource.put(videomailFormData);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "videomail-client",
|
|
3
|
-
"version": "13.6.
|
|
3
|
+
"version": "13.6.7",
|
|
4
4
|
"description": "A wicked npm package to record videos directly in the browser, wohooo!",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"webcam",
|
|
@@ -79,8 +79,8 @@
|
|
|
79
79
|
"@eslint/js": "9.39.2",
|
|
80
80
|
"@rsbuild/plugin-node-polyfill": "1.4.2",
|
|
81
81
|
"@rsbuild/plugin-stylus": "1.2.0",
|
|
82
|
-
"@rsdoctor/rspack-plugin": "1.
|
|
83
|
-
"@rslib/core": "0.18.
|
|
82
|
+
"@rsdoctor/rspack-plugin": "1.4.0",
|
|
83
|
+
"@rslib/core": "0.18.6",
|
|
84
84
|
"@storybook/addon-a11y": "10.1.10",
|
|
85
85
|
"@storybook/addon-docs": "10.1.10",
|
|
86
86
|
"@storybook/addon-links": "10.1.10",
|
|
@@ -91,7 +91,7 @@
|
|
|
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.
|
|
94
|
+
"@vitest/eslint-plugin": "1.6.4",
|
|
95
95
|
"audit-ci": "7.1.0",
|
|
96
96
|
"chromatic": "13.3.4",
|
|
97
97
|
"cross-env": "10.1.0",
|
|
@@ -114,12 +114,12 @@
|
|
|
114
114
|
"prettier-plugin-curly": "0.4.1",
|
|
115
115
|
"prettier-plugin-packagejson": "2.5.20",
|
|
116
116
|
"prettier-plugin-sh": "0.18.0",
|
|
117
|
-
"release-it": "19.1
|
|
117
|
+
"release-it": "19.2.1",
|
|
118
118
|
"storybook": "10.1.10",
|
|
119
119
|
"storybook-html-rsbuild": "3.2.0",
|
|
120
120
|
"type-fest": "5.3.1",
|
|
121
121
|
"typescript": "5.9.3",
|
|
122
|
-
"typescript-eslint": "8.50.
|
|
122
|
+
"typescript-eslint": "8.50.1",
|
|
123
123
|
"vitest": "4.0.16"
|
|
124
124
|
},
|
|
125
125
|
"engines": {
|