videomail-client 13.1.2 → 13.2.0
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 +91 -82
- package/dist/esm/index.js +60 -52
- package/dist/esm/types/Videomail.d.ts +1 -0
- package/dist/esm/util/getValidity.d.ts +2 -0
- package/dist/esm/wrappers/form.d.ts +2 -0
- package/dist/umd/index.js +57 -49
- package/package.json +12 -12
package/dist/esm/index.js
CHANGED
|
@@ -13,15 +13,15 @@ import websocket_stream from "websocket-stream";
|
|
|
13
13
|
import audio_sample from "audio-sample";
|
|
14
14
|
import is_power_of_two from "is-power-of-two";
|
|
15
15
|
var __webpack_modules__ = {
|
|
16
|
-
"./node_modules/@
|
|
16
|
+
"./node_modules/@rsbuild/core/compiled/css-loader/index.js??ruleSet[1].rules[13].use[1]!builtin:lightningcss-loader??ruleSet[1].rules[13].use[2]!./node_modules/stylus-loader/dist/cjs.js??ruleSet[1].rules[13].use[3]!./src/styles/main.styl": function(module, __webpack_exports__, __webpack_require__) {
|
|
17
17
|
__webpack_require__.d(__webpack_exports__, {
|
|
18
18
|
A: ()=>__WEBPACK_DEFAULT_EXPORT__
|
|
19
19
|
});
|
|
20
|
-
var
|
|
21
|
-
var
|
|
22
|
-
var
|
|
23
|
-
var
|
|
24
|
-
var ___CSS_LOADER_EXPORT___ =
|
|
20
|
+
var _node_modules_rsbuild_core_compiled_css_loader_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("./node_modules/@rsbuild/core/compiled/css-loader/noSourceMaps.js");
|
|
21
|
+
var _node_modules_rsbuild_core_compiled_css_loader_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/ __webpack_require__.n(_node_modules_rsbuild_core_compiled_css_loader_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__);
|
|
22
|
+
var _node_modules_rsbuild_core_compiled_css_loader_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("./node_modules/@rsbuild/core/compiled/css-loader/api.js");
|
|
23
|
+
var _node_modules_rsbuild_core_compiled_css_loader_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/ __webpack_require__.n(_node_modules_rsbuild_core_compiled_css_loader_api_js__WEBPACK_IMPORTED_MODULE_1__);
|
|
24
|
+
var ___CSS_LOADER_EXPORT___ = _node_modules_rsbuild_core_compiled_css_loader_api_js__WEBPACK_IMPORTED_MODULE_1___default()(_node_modules_rsbuild_core_compiled_css_loader_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default());
|
|
25
25
|
___CSS_LOADER_EXPORT___.push([
|
|
26
26
|
module.id,
|
|
27
27
|
`@keyframes blink {
|
|
@@ -3320,7 +3320,7 @@ var __webpack_modules__ = {
|
|
|
3320
3320
|
return tryTypedArrays(value);
|
|
3321
3321
|
};
|
|
3322
3322
|
},
|
|
3323
|
-
"./node_modules/@
|
|
3323
|
+
"./node_modules/@rsbuild/core/compiled/css-loader/api.js": function(module) {
|
|
3324
3324
|
module.exports = function(cssWithMappingToString) {
|
|
3325
3325
|
var list = [];
|
|
3326
3326
|
list.toString = function() {
|
|
@@ -3373,12 +3373,12 @@ var __webpack_modules__ = {
|
|
|
3373
3373
|
return list;
|
|
3374
3374
|
};
|
|
3375
3375
|
},
|
|
3376
|
-
"./node_modules/@
|
|
3376
|
+
"./node_modules/@rsbuild/core/compiled/css-loader/noSourceMaps.js": function(module) {
|
|
3377
3377
|
module.exports = function(i) {
|
|
3378
3378
|
return i[1];
|
|
3379
3379
|
};
|
|
3380
3380
|
},
|
|
3381
|
-
"./node_modules/@
|
|
3381
|
+
"./node_modules/@rsbuild/core/compiled/style-loader/runtime/injectStylesIntoStyleTag.js": function(module) {
|
|
3382
3382
|
var stylesInDOM = [];
|
|
3383
3383
|
function getIndexByIdentifier(identifier) {
|
|
3384
3384
|
var result = -1;
|
|
@@ -3456,7 +3456,7 @@ var __webpack_modules__ = {
|
|
|
3456
3456
|
};
|
|
3457
3457
|
};
|
|
3458
3458
|
},
|
|
3459
|
-
"./node_modules/@
|
|
3459
|
+
"./node_modules/@rsbuild/core/compiled/style-loader/runtime/insertBySelector.js": function(module) {
|
|
3460
3460
|
var memo = {};
|
|
3461
3461
|
function getTarget(target) {
|
|
3462
3462
|
if (void 0 === memo[target]) {
|
|
@@ -3477,7 +3477,7 @@ var __webpack_modules__ = {
|
|
|
3477
3477
|
}
|
|
3478
3478
|
module.exports = insertBySelector;
|
|
3479
3479
|
},
|
|
3480
|
-
"./node_modules/@
|
|
3480
|
+
"./node_modules/@rsbuild/core/compiled/style-loader/runtime/insertStyleElement.js": function(module) {
|
|
3481
3481
|
function insertStyleElement(options) {
|
|
3482
3482
|
var element = document.createElement("style");
|
|
3483
3483
|
options.setAttributes(element, options.attributes);
|
|
@@ -3486,14 +3486,14 @@ var __webpack_modules__ = {
|
|
|
3486
3486
|
}
|
|
3487
3487
|
module.exports = insertStyleElement;
|
|
3488
3488
|
},
|
|
3489
|
-
"./node_modules/@
|
|
3489
|
+
"./node_modules/@rsbuild/core/compiled/style-loader/runtime/setAttributesWithoutAttributes.js": function(module, __unused_webpack_exports, __webpack_require__) {
|
|
3490
3490
|
function setAttributesWithoutAttributes(styleElement) {
|
|
3491
3491
|
var nonce = __webpack_require__.nc;
|
|
3492
3492
|
if (nonce) styleElement.setAttribute("nonce", nonce);
|
|
3493
3493
|
}
|
|
3494
3494
|
module.exports = setAttributesWithoutAttributes;
|
|
3495
3495
|
},
|
|
3496
|
-
"./node_modules/@
|
|
3496
|
+
"./node_modules/@rsbuild/core/compiled/style-loader/runtime/styleDomAPI.js": function(module) {
|
|
3497
3497
|
function apply(styleElement, options, obj) {
|
|
3498
3498
|
var css = "";
|
|
3499
3499
|
if (obj.supports) css += "@supports (".concat(obj.supports, ") {");
|
|
@@ -3529,7 +3529,7 @@ var __webpack_modules__ = {
|
|
|
3529
3529
|
}
|
|
3530
3530
|
module.exports = domAPI;
|
|
3531
3531
|
},
|
|
3532
|
-
"./node_modules/@
|
|
3532
|
+
"./node_modules/@rsbuild/core/compiled/style-loader/runtime/styleTagTransform.js": function(module) {
|
|
3533
3533
|
function styleTagTransform(css, styleElement) {
|
|
3534
3534
|
if (styleElement.styleSheet) styleElement.styleSheet.cssText = css;
|
|
3535
3535
|
else {
|
|
@@ -3606,7 +3606,7 @@ const constants = {
|
|
|
3606
3606
|
}
|
|
3607
3607
|
};
|
|
3608
3608
|
var package_namespaceObject = {
|
|
3609
|
-
rE: "13.
|
|
3609
|
+
rE: "13.2.0"
|
|
3610
3610
|
};
|
|
3611
3611
|
function canPlayType_canPlayType(video, type) {
|
|
3612
3612
|
const canPlayType = video.canPlayType(`video/${type}`);
|
|
@@ -3725,13 +3725,13 @@ function pretty(anything) {
|
|
|
3725
3725
|
return inspect(anything);
|
|
3726
3726
|
}
|
|
3727
3727
|
const util_pretty = pretty;
|
|
3728
|
-
class
|
|
3728
|
+
class HTTPVideomailError extends Error {
|
|
3729
3729
|
code;
|
|
3730
3730
|
status;
|
|
3731
3731
|
explanation;
|
|
3732
3732
|
}
|
|
3733
|
-
const
|
|
3734
|
-
class VideomailError extends
|
|
3733
|
+
const error_HTTPVideomailError = HTTPVideomailError;
|
|
3734
|
+
class VideomailError extends error_HTTPVideomailError {
|
|
3735
3735
|
title = "Error from videomail-client npm package";
|
|
3736
3736
|
location = window.location.href;
|
|
3737
3737
|
logLines;
|
|
@@ -3981,6 +3981,11 @@ class Despot {
|
|
|
3981
3981
|
}
|
|
3982
3982
|
}
|
|
3983
3983
|
const util_Despot = Despot;
|
|
3984
|
+
function getValidity(element) {
|
|
3985
|
+
const validity = "validity" in element ? element.validity : void 0;
|
|
3986
|
+
return validity;
|
|
3987
|
+
}
|
|
3988
|
+
const util_getValidity = getValidity;
|
|
3984
3989
|
function hideElement(element) {
|
|
3985
3990
|
if (!element) return;
|
|
3986
3991
|
element.style.setProperty("display", "none", "important");
|
|
@@ -4238,7 +4243,7 @@ class Form extends util_Despot {
|
|
|
4238
4243
|
getInvalidElement() {
|
|
4239
4244
|
const elements = this.getRegisteredFormElements();
|
|
4240
4245
|
for (const element of elements){
|
|
4241
|
-
const validity =
|
|
4246
|
+
const validity = util_getValidity(element);
|
|
4242
4247
|
if (!validity?.valid) return element;
|
|
4243
4248
|
}
|
|
4244
4249
|
return null;
|
|
@@ -4261,7 +4266,7 @@ function findOriginalExc(exc) {
|
|
|
4261
4266
|
if ("error" in body) {
|
|
4262
4267
|
const message = body.error.message;
|
|
4263
4268
|
const cause = body.error.cause;
|
|
4264
|
-
const error = new
|
|
4269
|
+
const error = new error_HTTPVideomailError(message, {
|
|
4265
4270
|
cause
|
|
4266
4271
|
});
|
|
4267
4272
|
if (body.error.name) error.name = body.error.name;
|
|
@@ -4370,6 +4375,7 @@ class Resource {
|
|
|
4370
4375
|
async post(videomail) {
|
|
4371
4376
|
const newVideomail = this.applyDefaultValues(videomail);
|
|
4372
4377
|
newVideomail[constants.VERSION_LABEL] = package_namespaceObject.rE;
|
|
4378
|
+
newVideomail.recordLocation = window.location.href;
|
|
4373
4379
|
try {
|
|
4374
4380
|
let res;
|
|
4375
4381
|
if (this.options.callbacks.adjustFormDataBeforePosting) {
|
|
@@ -4545,7 +4551,7 @@ const options_options = {
|
|
|
4545
4551
|
}
|
|
4546
4552
|
};
|
|
4547
4553
|
const src_options = options_options;
|
|
4548
|
-
class
|
|
4554
|
+
class CollectLogger {
|
|
4549
4555
|
browser;
|
|
4550
4556
|
logger;
|
|
4551
4557
|
stack = [];
|
|
@@ -4584,37 +4590,37 @@ class CollectLogger_CollectLogger {
|
|
|
4584
4590
|
return this.stack;
|
|
4585
4591
|
}
|
|
4586
4592
|
}
|
|
4587
|
-
const
|
|
4593
|
+
const util_CollectLogger = CollectLogger;
|
|
4588
4594
|
var isTest_process = __webpack_require__("./node_modules/process/browser.js");
|
|
4589
4595
|
function isTest() {
|
|
4590
4596
|
return "test" === isTest_process.env.ENVIRON;
|
|
4591
4597
|
}
|
|
4592
4598
|
const util_isTest = isTest;
|
|
4593
|
-
function
|
|
4599
|
+
function mergeWithDefaultOptions(options = {}) {
|
|
4594
4600
|
const newOptions = deepmerge(src_options, options, {
|
|
4595
4601
|
arrayMerge (_destination, source) {
|
|
4596
4602
|
return source;
|
|
4597
4603
|
}
|
|
4598
4604
|
});
|
|
4599
|
-
const collectLogger = new
|
|
4605
|
+
const collectLogger = new util_CollectLogger(newOptions);
|
|
4600
4606
|
newOptions.logger = collectLogger;
|
|
4601
4607
|
if (util_isTest()) newOptions.verbose = false;
|
|
4602
4608
|
return newOptions;
|
|
4603
4609
|
}
|
|
4604
|
-
const
|
|
4605
|
-
var injectStylesIntoStyleTag = __webpack_require__("./node_modules/@
|
|
4610
|
+
const options_mergeWithDefaultOptions = mergeWithDefaultOptions;
|
|
4611
|
+
var injectStylesIntoStyleTag = __webpack_require__("./node_modules/@rsbuild/core/compiled/style-loader/runtime/injectStylesIntoStyleTag.js");
|
|
4606
4612
|
var injectStylesIntoStyleTag_default = /*#__PURE__*/ __webpack_require__.n(injectStylesIntoStyleTag);
|
|
4607
|
-
var styleDomAPI = __webpack_require__("./node_modules/@
|
|
4613
|
+
var styleDomAPI = __webpack_require__("./node_modules/@rsbuild/core/compiled/style-loader/runtime/styleDomAPI.js");
|
|
4608
4614
|
var styleDomAPI_default = /*#__PURE__*/ __webpack_require__.n(styleDomAPI);
|
|
4609
|
-
var insertBySelector = __webpack_require__("./node_modules/@
|
|
4615
|
+
var insertBySelector = __webpack_require__("./node_modules/@rsbuild/core/compiled/style-loader/runtime/insertBySelector.js");
|
|
4610
4616
|
var insertBySelector_default = /*#__PURE__*/ __webpack_require__.n(insertBySelector);
|
|
4611
|
-
var setAttributesWithoutAttributes = __webpack_require__("./node_modules/@
|
|
4617
|
+
var setAttributesWithoutAttributes = __webpack_require__("./node_modules/@rsbuild/core/compiled/style-loader/runtime/setAttributesWithoutAttributes.js");
|
|
4612
4618
|
var setAttributesWithoutAttributes_default = /*#__PURE__*/ __webpack_require__.n(setAttributesWithoutAttributes);
|
|
4613
|
-
var insertStyleElement = __webpack_require__("./node_modules/@
|
|
4619
|
+
var insertStyleElement = __webpack_require__("./node_modules/@rsbuild/core/compiled/style-loader/runtime/insertStyleElement.js");
|
|
4614
4620
|
var insertStyleElement_default = /*#__PURE__*/ __webpack_require__.n(insertStyleElement);
|
|
4615
|
-
var styleTagTransform = __webpack_require__("./node_modules/@
|
|
4621
|
+
var styleTagTransform = __webpack_require__("./node_modules/@rsbuild/core/compiled/style-loader/runtime/styleTagTransform.js");
|
|
4616
4622
|
var styleTagTransform_default = /*#__PURE__*/ __webpack_require__.n(styleTagTransform);
|
|
4617
|
-
var main = __webpack_require__("./node_modules/@
|
|
4623
|
+
var main = __webpack_require__("./node_modules/@rsbuild/core/compiled/css-loader/index.js??ruleSet[1].rules[13].use[1]!builtin:lightningcss-loader??ruleSet[1].rules[13].use[2]!./node_modules/stylus-loader/dist/cjs.js??ruleSet[1].rules[13].use[3]!./src/styles/main.styl");
|
|
4618
4624
|
var main_options = {};
|
|
4619
4625
|
main_options.styleTagTransform = styleTagTransform_default();
|
|
4620
4626
|
main_options.setAttributes = setAttributesWithoutAttributes_default();
|
|
@@ -4633,7 +4639,7 @@ function limitHeight(height, options, calledFrom) {
|
|
|
4633
4639
|
return limitedHeight;
|
|
4634
4640
|
}
|
|
4635
4641
|
const dimensions_limitHeight = limitHeight;
|
|
4636
|
-
function
|
|
4642
|
+
function getOuterWidth(element) {
|
|
4637
4643
|
let rect = element.getBoundingClientRect();
|
|
4638
4644
|
let outerWidth = rect.right - rect.left;
|
|
4639
4645
|
if (outerWidth < 1) {
|
|
@@ -4642,10 +4648,10 @@ function getOuterWidth_getOuterWidth(element) {
|
|
|
4642
4648
|
}
|
|
4643
4649
|
return outerWidth;
|
|
4644
4650
|
}
|
|
4645
|
-
const
|
|
4651
|
+
const dimensions_getOuterWidth = getOuterWidth;
|
|
4646
4652
|
function limitWidth(element, options, width) {
|
|
4647
4653
|
let limitedWidth;
|
|
4648
|
-
const outerWidth =
|
|
4654
|
+
const outerWidth = dimensions_getOuterWidth(element);
|
|
4649
4655
|
limitedWidth = width && "number" == typeof width ? outerWidth > 0 && outerWidth < width ? outerWidth : width : outerWidth;
|
|
4650
4656
|
if (Number.isInteger(limitedWidth) && limitedWidth < 1) throw error_createError({
|
|
4651
4657
|
message: "Limited width cannot be less than 1!",
|
|
@@ -5076,12 +5082,12 @@ class Buttons extends util_Despot {
|
|
|
5076
5082
|
}
|
|
5077
5083
|
}
|
|
5078
5084
|
const buttons = Buttons;
|
|
5079
|
-
function
|
|
5085
|
+
function isHidden(element) {
|
|
5080
5086
|
if (!element) return true;
|
|
5081
5087
|
const display = element.style.getPropertyValue("display");
|
|
5082
5088
|
return display.includes("none");
|
|
5083
5089
|
}
|
|
5084
|
-
const
|
|
5090
|
+
const html_isHidden = isHidden;
|
|
5085
5091
|
class Countdown {
|
|
5086
5092
|
visuals;
|
|
5087
5093
|
options;
|
|
@@ -5681,7 +5687,7 @@ class Notifier extends util_Despot {
|
|
|
5681
5687
|
}
|
|
5682
5688
|
isVisible() {
|
|
5683
5689
|
if (!this.built) return false;
|
|
5684
|
-
return this.notifyElement && !
|
|
5690
|
+
return this.notifyElement && !html_isHidden(this.notifyElement);
|
|
5685
5691
|
}
|
|
5686
5692
|
isBuilt() {
|
|
5687
5693
|
return this.built;
|
|
@@ -5735,7 +5741,7 @@ function figureMinHeight(height, options) {
|
|
|
5735
5741
|
return minHeight;
|
|
5736
5742
|
}
|
|
5737
5743
|
const dimensions_figureMinHeight = figureMinHeight;
|
|
5738
|
-
function
|
|
5744
|
+
function getRatio(options, videoHeight, videoWidth) {
|
|
5739
5745
|
let ratio = 1;
|
|
5740
5746
|
const hasVideoDimensions = videoHeight && videoWidth;
|
|
5741
5747
|
const desiredHeight = options.video.height;
|
|
@@ -5745,7 +5751,7 @@ function getRatio_getRatio(options, videoHeight, videoWidth) {
|
|
|
5745
5751
|
else if (hasVideoDimensions) ratio = videoHeight / videoWidth;
|
|
5746
5752
|
return ratio;
|
|
5747
5753
|
}
|
|
5748
|
-
const
|
|
5754
|
+
const dimensions_getRatio = getRatio;
|
|
5749
5755
|
function calculateHeight(responsive, videoWidth, options, target, ratio, element) {
|
|
5750
5756
|
let width = videoWidth;
|
|
5751
5757
|
if (width < 1) throw error_createError({
|
|
@@ -5753,7 +5759,7 @@ function calculateHeight(responsive, videoWidth, options, target, ratio, element
|
|
|
5753
5759
|
options
|
|
5754
5760
|
});
|
|
5755
5761
|
if (responsive && element) width = dimensions_limitWidth(element, options, width);
|
|
5756
|
-
const chosenRatio = ratio ??
|
|
5762
|
+
const chosenRatio = ratio ?? dimensions_getRatio(options, void 0, videoWidth);
|
|
5757
5763
|
const height = Math.round(width * chosenRatio);
|
|
5758
5764
|
if (Number.isInteger(height) && height < 1) throw error_createError({
|
|
5759
5765
|
message: "Just calculated a height less than 1 which is wrong.",
|
|
@@ -5769,7 +5775,7 @@ function calculateWidth(responsive, videoHeight, options, ratio) {
|
|
|
5769
5775
|
message: `Height ${height} cannot be smaller than 1 when calculating width.`,
|
|
5770
5776
|
options
|
|
5771
5777
|
});
|
|
5772
|
-
const chosenRatio = ratio ??
|
|
5778
|
+
const chosenRatio = ratio ?? dimensions_getRatio(options, videoHeight);
|
|
5773
5779
|
const calculatedWidth = Math.round(height / chosenRatio);
|
|
5774
5780
|
if (calculatedWidth < 1) throw error_createError({
|
|
5775
5781
|
message: "Calculated width cannot be smaller than 1!",
|
|
@@ -5782,7 +5788,7 @@ const CHANNELS = 1;
|
|
|
5782
5788
|
function getAudioContextClass() {
|
|
5783
5789
|
return window.AudioContext;
|
|
5784
5790
|
}
|
|
5785
|
-
class
|
|
5791
|
+
class AudioRecorder {
|
|
5786
5792
|
scriptProcessor;
|
|
5787
5793
|
audioInput;
|
|
5788
5794
|
vcAudioContext;
|
|
@@ -5862,7 +5868,7 @@ class AudioRecorder_AudioRecorder {
|
|
|
5862
5868
|
return -1;
|
|
5863
5869
|
}
|
|
5864
5870
|
}
|
|
5865
|
-
const
|
|
5871
|
+
const media_AudioRecorder = AudioRecorder;
|
|
5866
5872
|
function getFirstVideoTrack(localMediaStream) {
|
|
5867
5873
|
const videoTracks = localMediaStream.getVideoTracks();
|
|
5868
5874
|
let videoTrack;
|
|
@@ -5962,7 +5968,7 @@ class UserMedia extends util_Despot {
|
|
|
5962
5968
|
this.onPlayReached = false;
|
|
5963
5969
|
this.onLoadedMetaDataReached = false;
|
|
5964
5970
|
this.playingPromiseReached = false;
|
|
5965
|
-
if (isAudioEnabled(this.options)) this.audioRecorder ??= new
|
|
5971
|
+
if (isAudioEnabled(this.options)) this.audioRecorder ??= new media_AudioRecorder(this, this.options);
|
|
5966
5972
|
const unloadAllEventListeners = ()=>{
|
|
5967
5973
|
this.options.logger.debug("UserMedia: unloadAllEventListeners()");
|
|
5968
5974
|
this.unloadRemainingEventListeners();
|
|
@@ -6666,7 +6672,7 @@ class Recorder extends util_Despot {
|
|
|
6666
6672
|
return this.visuals.isNotifying();
|
|
6667
6673
|
}
|
|
6668
6674
|
isHidden() {
|
|
6669
|
-
return !this.recorderElement ||
|
|
6675
|
+
return !this.recorderElement || html_isHidden(this.recorderElement);
|
|
6670
6676
|
}
|
|
6671
6677
|
writeCommand(command, args, cb) {
|
|
6672
6678
|
if (this.connected) {
|
|
@@ -7082,7 +7088,7 @@ class Recorder extends util_Despot {
|
|
|
7082
7088
|
const userMediaVideoHeight = this.userMedia.getVideoHeight();
|
|
7083
7089
|
if (!userMediaVideoWidth || userMediaVideoWidth < 1) ratio = this.visuals.getRatio();
|
|
7084
7090
|
else if (userMediaVideoHeight) ratio = userMediaVideoHeight / userMediaVideoWidth;
|
|
7085
|
-
} else ratio =
|
|
7091
|
+
} else ratio = dimensions_getRatio(this.options);
|
|
7086
7092
|
return ratio;
|
|
7087
7093
|
}
|
|
7088
7094
|
calculateWidth(responsive) {
|
|
@@ -7357,7 +7363,7 @@ class Replay extends util_Despot {
|
|
|
7357
7363
|
}
|
|
7358
7364
|
isShown() {
|
|
7359
7365
|
if (!this.replayElement) return false;
|
|
7360
|
-
return !
|
|
7366
|
+
return !html_isHidden(this.replayElement) && !this.visuals.isHidden();
|
|
7361
7367
|
}
|
|
7362
7368
|
getVisuals() {
|
|
7363
7369
|
return this.visuals;
|
|
@@ -7568,7 +7574,7 @@ class Visuals extends util_Despot {
|
|
|
7568
7574
|
}
|
|
7569
7575
|
isHidden() {
|
|
7570
7576
|
if (!this.built) return true;
|
|
7571
|
-
return
|
|
7577
|
+
return html_isHidden(this.visualsElement);
|
|
7572
7578
|
}
|
|
7573
7579
|
showVisuals() {
|
|
7574
7580
|
html_showElement(this.visualsElement);
|
|
@@ -7708,7 +7714,7 @@ class Container extends util_Despot {
|
|
|
7708
7714
|
}
|
|
7709
7715
|
getFormElement() {
|
|
7710
7716
|
let formElement;
|
|
7711
|
-
if (this.containerElement
|
|
7717
|
+
if (this.containerElement?.tagName === "FORM") formElement = this.containerElement;
|
|
7712
7718
|
else if (this.options.selectors.formId) {
|
|
7713
7719
|
formElement = document.querySelector(`#${this.options.selectors.formId}`);
|
|
7714
7720
|
if (formElement && "FORM" !== formElement.tagName) throw new Error(`HTML element with ID ${this.options.selectors.formId} is not a form.`);
|
|
@@ -7961,8 +7967,10 @@ class Container extends util_Despot {
|
|
|
7961
7967
|
const invalidInput = this.form.getInvalidElement();
|
|
7962
7968
|
if (invalidInput) {
|
|
7963
7969
|
const name = invalidInput.getAttribute("name");
|
|
7970
|
+
const validity = util_getValidity(invalidInput);
|
|
7964
7971
|
valid = false;
|
|
7965
|
-
if (name) {
|
|
7972
|
+
if (name) if (validity?.valueMissing) whyInvalid = `Please fill out field "${name}" ⚠️`;
|
|
7973
|
+
else {
|
|
7966
7974
|
whyInvalid = `Input "${name}" seems wrong 🤔`;
|
|
7967
7975
|
invalidData = {
|
|
7968
7976
|
[name]: invalidInput.getAttribute("value")
|
|
@@ -8133,7 +8141,7 @@ class VideomailClient extends util_Despot {
|
|
|
8133
8141
|
static ENC_TYPE_APP_JSON = constants["public"].ENC_TYPE_APP_JSON;
|
|
8134
8142
|
static ENC_TYPE_FORM = constants["public"].ENC_TYPE_FORM;
|
|
8135
8143
|
constructor(options = {}){
|
|
8136
|
-
super("VideomailClient",
|
|
8144
|
+
super("VideomailClient", options_mergeWithDefaultOptions(options));
|
|
8137
8145
|
this.validateOptions();
|
|
8138
8146
|
util_Despot.removeAllListeners();
|
|
8139
8147
|
this.container = new wrappers_container(this.options);
|
|
@@ -59,6 +59,7 @@ declare class Form extends Despot {
|
|
|
59
59
|
wantedFps?: number;
|
|
60
60
|
wantedInterval?: number;
|
|
61
61
|
} | undefined;
|
|
62
|
+
recordLocation?: string | undefined | undefined;
|
|
62
63
|
replyAllUrl?: string;
|
|
63
64
|
replyUrl?: string;
|
|
64
65
|
sending?: boolean;
|
|
@@ -150,6 +151,7 @@ declare class Form extends Despot {
|
|
|
150
151
|
wantedFps?: number;
|
|
151
152
|
wantedInterval?: number;
|
|
152
153
|
} | undefined;
|
|
154
|
+
recordLocation?: string | undefined | undefined;
|
|
153
155
|
replyAllUrl?: string;
|
|
154
156
|
replyUrl?: string;
|
|
155
157
|
sending?: boolean;
|