videomail-client 11.4.2 → 11.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 +53 -48
- package/dist/esm/index.d.ts +2 -9
- package/dist/esm/index.js +53 -48
- package/dist/esm/types/VideoType.d.ts +5 -4
- package/dist/esm/util/Browser.d.ts +3 -4
- package/dist/esm/util/html/media/canPlayType.d.ts +2 -2
- package/dist/esm/wrappers/container.d.ts +2 -2
- package/dist/esm/wrappers/form.d.ts +6 -5
- package/dist/esm/wrappers/visuals/replay.d.ts +1 -2
- package/dist/umd/index.js +53 -48
- package/package.json +14 -14
package/dist/cjs/index.cjs
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
var __webpack_modules__ = {
|
|
2
|
-
"./node_modules/@rsbuild/core/compiled/css-loader/index.js??ruleSet[1].rules[12].use[1]!builtin:lightningcss-loader??ruleSet[1].rules[12].use[2]!./node_modules/stylus-loader/dist/cjs.js??ruleSet[1].rules[12].use[3]!./src/styles/main.styl": function(module, __webpack_exports__, __webpack_require__) {
|
|
2
|
+
"./node_modules/@rslib/core/node_modules/@rsbuild/core/compiled/css-loader/index.js??ruleSet[1].rules[12].use[1]!builtin:lightningcss-loader??ruleSet[1].rules[12].use[2]!./node_modules/stylus-loader/dist/cjs.js??ruleSet[1].rules[12].use[3]!./src/styles/main.styl": function(module, __webpack_exports__, __webpack_require__) {
|
|
3
3
|
"use strict";
|
|
4
4
|
__webpack_require__.d(__webpack_exports__, {
|
|
5
5
|
A: ()=>__WEBPACK_DEFAULT_EXPORT__
|
|
6
6
|
});
|
|
7
|
-
var
|
|
8
|
-
var
|
|
9
|
-
var
|
|
10
|
-
var
|
|
11
|
-
var ___CSS_LOADER_EXPORT___ =
|
|
7
|
+
var _node_modules_rslib_core_node_modules_rsbuild_core_compiled_css_loader_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("./node_modules/@rslib/core/node_modules/@rsbuild/core/compiled/css-loader/noSourceMaps.js");
|
|
8
|
+
var _node_modules_rslib_core_node_modules_rsbuild_core_compiled_css_loader_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/ __webpack_require__.n(_node_modules_rslib_core_node_modules_rsbuild_core_compiled_css_loader_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__);
|
|
9
|
+
var _node_modules_rslib_core_node_modules_rsbuild_core_compiled_css_loader_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("./node_modules/@rslib/core/node_modules/@rsbuild/core/compiled/css-loader/api.js");
|
|
10
|
+
var _node_modules_rslib_core_node_modules_rsbuild_core_compiled_css_loader_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/ __webpack_require__.n(_node_modules_rslib_core_node_modules_rsbuild_core_compiled_css_loader_api_js__WEBPACK_IMPORTED_MODULE_1__);
|
|
11
|
+
var ___CSS_LOADER_EXPORT___ = _node_modules_rslib_core_node_modules_rsbuild_core_compiled_css_loader_api_js__WEBPACK_IMPORTED_MODULE_1___default()(_node_modules_rslib_core_node_modules_rsbuild_core_compiled_css_loader_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default());
|
|
12
12
|
___CSS_LOADER_EXPORT___.push([
|
|
13
13
|
module.id,
|
|
14
14
|
`@keyframes blink {
|
|
@@ -10181,7 +10181,7 @@ var __webpack_modules__ = {
|
|
|
10181
10181
|
"?aa23": function() {},
|
|
10182
10182
|
"?9936": function() {},
|
|
10183
10183
|
"?5f55": function() {},
|
|
10184
|
-
"./node_modules/@rsbuild/core/compiled/css-loader/api.js": function(module) {
|
|
10184
|
+
"./node_modules/@rslib/core/node_modules/@rsbuild/core/compiled/css-loader/api.js": function(module) {
|
|
10185
10185
|
"use strict";
|
|
10186
10186
|
module.exports = function(cssWithMappingToString) {
|
|
10187
10187
|
var list = [];
|
|
@@ -10235,13 +10235,13 @@ var __webpack_modules__ = {
|
|
|
10235
10235
|
return list;
|
|
10236
10236
|
};
|
|
10237
10237
|
},
|
|
10238
|
-
"./node_modules/@rsbuild/core/compiled/css-loader/noSourceMaps.js": function(module) {
|
|
10238
|
+
"./node_modules/@rslib/core/node_modules/@rsbuild/core/compiled/css-loader/noSourceMaps.js": function(module) {
|
|
10239
10239
|
"use strict";
|
|
10240
10240
|
module.exports = function(i) {
|
|
10241
10241
|
return i[1];
|
|
10242
10242
|
};
|
|
10243
10243
|
},
|
|
10244
|
-
"./node_modules/@rsbuild/core/compiled/style-loader/runtime/injectStylesIntoStyleTag.js": function(module) {
|
|
10244
|
+
"./node_modules/@rslib/core/node_modules/@rsbuild/core/compiled/style-loader/runtime/injectStylesIntoStyleTag.js": function(module) {
|
|
10245
10245
|
"use strict";
|
|
10246
10246
|
var stylesInDOM = [];
|
|
10247
10247
|
function getIndexByIdentifier(identifier) {
|
|
@@ -10320,7 +10320,7 @@ var __webpack_modules__ = {
|
|
|
10320
10320
|
};
|
|
10321
10321
|
};
|
|
10322
10322
|
},
|
|
10323
|
-
"./node_modules/@rsbuild/core/compiled/style-loader/runtime/insertBySelector.js": function(module) {
|
|
10323
|
+
"./node_modules/@rslib/core/node_modules/@rsbuild/core/compiled/style-loader/runtime/insertBySelector.js": function(module) {
|
|
10324
10324
|
"use strict";
|
|
10325
10325
|
var memo = {};
|
|
10326
10326
|
function getTarget(target) {
|
|
@@ -10342,7 +10342,7 @@ var __webpack_modules__ = {
|
|
|
10342
10342
|
}
|
|
10343
10343
|
module.exports = insertBySelector;
|
|
10344
10344
|
},
|
|
10345
|
-
"./node_modules/@rsbuild/core/compiled/style-loader/runtime/insertStyleElement.js": function(module) {
|
|
10345
|
+
"./node_modules/@rslib/core/node_modules/@rsbuild/core/compiled/style-loader/runtime/insertStyleElement.js": function(module) {
|
|
10346
10346
|
"use strict";
|
|
10347
10347
|
function insertStyleElement(options) {
|
|
10348
10348
|
var element = document.createElement("style");
|
|
@@ -10352,7 +10352,7 @@ var __webpack_modules__ = {
|
|
|
10352
10352
|
}
|
|
10353
10353
|
module.exports = insertStyleElement;
|
|
10354
10354
|
},
|
|
10355
|
-
"./node_modules/@rsbuild/core/compiled/style-loader/runtime/setAttributesWithoutAttributes.js": function(module, __unused_webpack_exports, __webpack_require__) {
|
|
10355
|
+
"./node_modules/@rslib/core/node_modules/@rsbuild/core/compiled/style-loader/runtime/setAttributesWithoutAttributes.js": function(module, __unused_webpack_exports, __webpack_require__) {
|
|
10356
10356
|
"use strict";
|
|
10357
10357
|
function setAttributesWithoutAttributes(styleElement) {
|
|
10358
10358
|
var nonce = __webpack_require__.nc;
|
|
@@ -10360,7 +10360,7 @@ var __webpack_modules__ = {
|
|
|
10360
10360
|
}
|
|
10361
10361
|
module.exports = setAttributesWithoutAttributes;
|
|
10362
10362
|
},
|
|
10363
|
-
"./node_modules/@rsbuild/core/compiled/style-loader/runtime/styleDomAPI.js": function(module) {
|
|
10363
|
+
"./node_modules/@rslib/core/node_modules/@rsbuild/core/compiled/style-loader/runtime/styleDomAPI.js": function(module) {
|
|
10364
10364
|
"use strict";
|
|
10365
10365
|
function apply(styleElement, options, obj) {
|
|
10366
10366
|
var css = "";
|
|
@@ -10397,7 +10397,7 @@ var __webpack_modules__ = {
|
|
|
10397
10397
|
}
|
|
10398
10398
|
module.exports = domAPI;
|
|
10399
10399
|
},
|
|
10400
|
-
"./node_modules/@rsbuild/core/compiled/style-loader/runtime/styleTagTransform.js": function(module) {
|
|
10400
|
+
"./node_modules/@rslib/core/node_modules/@rsbuild/core/compiled/style-loader/runtime/styleTagTransform.js": function(module) {
|
|
10401
10401
|
"use strict";
|
|
10402
10402
|
function styleTagTransform(css, styleElement) {
|
|
10403
10403
|
if (styleElement.styleSheet) styleElement.styleSheet.cssText = css;
|
|
@@ -10479,7 +10479,7 @@ var __webpack_exports__ = {};
|
|
|
10479
10479
|
__webpack_require__.r(__webpack_exports__);
|
|
10480
10480
|
__webpack_require__.d(__webpack_exports__, {
|
|
10481
10481
|
VideomailClient: ()=>src_client,
|
|
10482
|
-
VideoType: ()=>
|
|
10482
|
+
VideoType: ()=>VideoType
|
|
10483
10483
|
});
|
|
10484
10484
|
const constants = {
|
|
10485
10485
|
SITE_NAME_LABEL: "x-videomail-site-name",
|
|
@@ -10642,7 +10642,7 @@ var __webpack_exports__ = {};
|
|
|
10642
10642
|
var client = __webpack_require__("./node_modules/superagent/lib/client.js");
|
|
10643
10643
|
var client_default = /*#__PURE__*/ __webpack_require__.n(client);
|
|
10644
10644
|
var package_namespaceObject = {
|
|
10645
|
-
rE: "11.4.
|
|
10645
|
+
rE: "11.4.4"
|
|
10646
10646
|
};
|
|
10647
10647
|
var defined = __webpack_require__("./node_modules/defined/index.js");
|
|
10648
10648
|
var defined_default = /*#__PURE__*/ __webpack_require__.n(defined);
|
|
@@ -13778,11 +13778,10 @@ var __webpack_exports__ = {};
|
|
|
13778
13778
|
NAME,
|
|
13779
13779
|
VERSION
|
|
13780
13780
|
]);
|
|
13781
|
-
|
|
13782
|
-
|
|
13783
|
-
|
|
13784
|
-
|
|
13785
|
-
}({});
|
|
13781
|
+
const VideoType = {
|
|
13782
|
+
WebM: "webm",
|
|
13783
|
+
MP4: "mp4"
|
|
13784
|
+
};
|
|
13786
13785
|
function canPlayType_canPlayType(video, type) {
|
|
13787
13786
|
const canPlayType = video.canPlayType(`video/${type}`);
|
|
13788
13787
|
if ("" === canPlayType) return false;
|
|
@@ -13799,7 +13798,7 @@ var __webpack_exports__ = {};
|
|
|
13799
13798
|
else obj[key] = value;
|
|
13800
13799
|
return obj;
|
|
13801
13800
|
}
|
|
13802
|
-
const FALLBACK_VIDEO_TYPE =
|
|
13801
|
+
const FALLBACK_VIDEO_TYPE = VideoType.MP4;
|
|
13803
13802
|
class Browser_Browser {
|
|
13804
13803
|
isIOS() {
|
|
13805
13804
|
return "iOS" === this.result.os.name;
|
|
@@ -13837,10 +13836,10 @@ var __webpack_exports__ = {};
|
|
|
13837
13836
|
}
|
|
13838
13837
|
getVideoType(video) {
|
|
13839
13838
|
if (!this.videoType) {
|
|
13840
|
-
if (media_canPlayType(video,
|
|
13841
|
-
else if (media_canPlayType(video,
|
|
13839
|
+
if (media_canPlayType(video, VideoType.MP4)) this.videoType = VideoType.MP4;
|
|
13840
|
+
else if (media_canPlayType(video, VideoType.WebM)) this.videoType = VideoType.WebM;
|
|
13842
13841
|
}
|
|
13843
|
-
if (this.videoType !==
|
|
13842
|
+
if (this.videoType !== VideoType.WebM && this.videoType !== VideoType.MP4) this.videoType = FALLBACK_VIDEO_TYPE;
|
|
13844
13843
|
if ("" === this.videoType.trim()) this.videoType = FALLBACK_VIDEO_TYPE;
|
|
13845
13844
|
return this.videoType;
|
|
13846
13845
|
}
|
|
@@ -14331,6 +14330,11 @@ var __webpack_exports__ = {};
|
|
|
14331
14330
|
else obj[key] = value;
|
|
14332
14331
|
return obj;
|
|
14333
14332
|
}
|
|
14333
|
+
const FormMethod = {
|
|
14334
|
+
POST: "post",
|
|
14335
|
+
PUT: "put",
|
|
14336
|
+
GET: "get"
|
|
14337
|
+
};
|
|
14334
14338
|
class Form extends util_Despot {
|
|
14335
14339
|
getData() {
|
|
14336
14340
|
return getFormData(this.formElement, {
|
|
@@ -14398,7 +14402,7 @@ var __webpack_exports__ = {};
|
|
|
14398
14402
|
if (name === this.options.selectors.toInputName || name === this.options.selectors.subjectInputName || name === this.options.selectors.bodyInputName) formControl.setAttribute("disabled", "disabled");
|
|
14399
14403
|
}
|
|
14400
14404
|
}
|
|
14401
|
-
this.formElement.setAttribute("method",
|
|
14405
|
+
this.formElement.setAttribute("method", FormMethod.PUT);
|
|
14402
14406
|
}
|
|
14403
14407
|
setDisabled(disabled, buttonsToo) {
|
|
14404
14408
|
for (const formControl of this.formElement.elements)if (buttonsToo || html_isNotButton(formControl)) if (disabled) formControl.setAttribute("disabled", "disabled");
|
|
@@ -14528,14 +14532,14 @@ var __webpack_exports__ = {};
|
|
|
14528
14532
|
const method = this.formElement.getAttribute("method");
|
|
14529
14533
|
let chosenMethod;
|
|
14530
14534
|
switch(method){
|
|
14531
|
-
case
|
|
14532
|
-
chosenMethod =
|
|
14535
|
+
case FormMethod.POST:
|
|
14536
|
+
chosenMethod = FormMethod.POST;
|
|
14533
14537
|
break;
|
|
14534
|
-
case
|
|
14535
|
-
chosenMethod =
|
|
14538
|
+
case FormMethod.PUT:
|
|
14539
|
+
chosenMethod = FormMethod.PUT;
|
|
14536
14540
|
break;
|
|
14537
14541
|
default:
|
|
14538
|
-
chosenMethod =
|
|
14542
|
+
chosenMethod = FormMethod.POST;
|
|
14539
14543
|
}
|
|
14540
14544
|
if (this.container.hasElement()) await this.container.submitAll(this.getData(), chosenMethod, url);
|
|
14541
14545
|
return false;
|
|
@@ -14640,7 +14644,7 @@ var __webpack_exports__ = {};
|
|
|
14640
14644
|
[constants.SITE_NAME_LABEL]: this.options.siteName
|
|
14641
14645
|
};
|
|
14642
14646
|
let url = `${this.options.baseUrl}/videomail/`;
|
|
14643
|
-
if (
|
|
14647
|
+
if (method === FormMethod.PUT && videomail.key) url += videomail.key;
|
|
14644
14648
|
try {
|
|
14645
14649
|
const request = await client_default()(method, url).query(queryParams).set("Timezone-Id", this.timezoneId).withCredentials().send(videomail).timeout(this.options.timeouts.connection);
|
|
14646
14650
|
return request;
|
|
@@ -14688,7 +14692,7 @@ var __webpack_exports__ = {};
|
|
|
14688
14692
|
videomailNinjaFormPlugin: null == (_this_options_versions = this.options.versions) ? void 0 : _this_options_versions.videomailNinjaFormPlugin
|
|
14689
14693
|
}
|
|
14690
14694
|
};
|
|
14691
|
-
await client_default()(
|
|
14695
|
+
await client_default()(FormMethod.POST, url).query(queryParams).set("Timezone-Id", this.timezoneId).withCredentials().send(fullVideomailErrorData).timeout(this.options.timeouts.connection);
|
|
14692
14696
|
} catch (exc) {
|
|
14693
14697
|
console.error(exc);
|
|
14694
14698
|
}
|
|
@@ -14700,8 +14704,8 @@ var __webpack_exports__ = {};
|
|
|
14700
14704
|
let res;
|
|
14701
14705
|
if (this.options.callbacks.adjustFormDataBeforePosting) {
|
|
14702
14706
|
const adjustedVideomail = this.options.callbacks.adjustFormDataBeforePosting(newVideomail);
|
|
14703
|
-
res = await this.write(
|
|
14704
|
-
} else res = await this.write(
|
|
14707
|
+
res = await this.write(FormMethod.POST, adjustedVideomail);
|
|
14708
|
+
} else res = await this.write(FormMethod.POST, newVideomail);
|
|
14705
14709
|
return res;
|
|
14706
14710
|
} catch (exc) {
|
|
14707
14711
|
throw error_createError({
|
|
@@ -14711,7 +14715,7 @@ var __webpack_exports__ = {};
|
|
|
14711
14715
|
}
|
|
14712
14716
|
}
|
|
14713
14717
|
async put(videomail) {
|
|
14714
|
-
return await this.write(
|
|
14718
|
+
return await this.write(FormMethod.PUT, videomail);
|
|
14715
14719
|
}
|
|
14716
14720
|
async form(formData, url) {
|
|
14717
14721
|
let formType;
|
|
@@ -14949,19 +14953,19 @@ var __webpack_exports__ = {};
|
|
|
14949
14953
|
return newOptions;
|
|
14950
14954
|
}
|
|
14951
14955
|
const mergeWithDefaultOptions = mergeWithDefaultOptions_mergeWithDefaultOptions;
|
|
14952
|
-
var injectStylesIntoStyleTag = __webpack_require__("./node_modules/@rsbuild/core/compiled/style-loader/runtime/injectStylesIntoStyleTag.js");
|
|
14956
|
+
var injectStylesIntoStyleTag = __webpack_require__("./node_modules/@rslib/core/node_modules/@rsbuild/core/compiled/style-loader/runtime/injectStylesIntoStyleTag.js");
|
|
14953
14957
|
var injectStylesIntoStyleTag_default = /*#__PURE__*/ __webpack_require__.n(injectStylesIntoStyleTag);
|
|
14954
|
-
var styleDomAPI = __webpack_require__("./node_modules/@rsbuild/core/compiled/style-loader/runtime/styleDomAPI.js");
|
|
14958
|
+
var styleDomAPI = __webpack_require__("./node_modules/@rslib/core/node_modules/@rsbuild/core/compiled/style-loader/runtime/styleDomAPI.js");
|
|
14955
14959
|
var styleDomAPI_default = /*#__PURE__*/ __webpack_require__.n(styleDomAPI);
|
|
14956
|
-
var insertBySelector = __webpack_require__("./node_modules/@rsbuild/core/compiled/style-loader/runtime/insertBySelector.js");
|
|
14960
|
+
var insertBySelector = __webpack_require__("./node_modules/@rslib/core/node_modules/@rsbuild/core/compiled/style-loader/runtime/insertBySelector.js");
|
|
14957
14961
|
var insertBySelector_default = /*#__PURE__*/ __webpack_require__.n(insertBySelector);
|
|
14958
|
-
var setAttributesWithoutAttributes = __webpack_require__("./node_modules/@rsbuild/core/compiled/style-loader/runtime/setAttributesWithoutAttributes.js");
|
|
14962
|
+
var setAttributesWithoutAttributes = __webpack_require__("./node_modules/@rslib/core/node_modules/@rsbuild/core/compiled/style-loader/runtime/setAttributesWithoutAttributes.js");
|
|
14959
14963
|
var setAttributesWithoutAttributes_default = /*#__PURE__*/ __webpack_require__.n(setAttributesWithoutAttributes);
|
|
14960
|
-
var insertStyleElement = __webpack_require__("./node_modules/@rsbuild/core/compiled/style-loader/runtime/insertStyleElement.js");
|
|
14964
|
+
var insertStyleElement = __webpack_require__("./node_modules/@rslib/core/node_modules/@rsbuild/core/compiled/style-loader/runtime/insertStyleElement.js");
|
|
14961
14965
|
var insertStyleElement_default = /*#__PURE__*/ __webpack_require__.n(insertStyleElement);
|
|
14962
|
-
var styleTagTransform = __webpack_require__("./node_modules/@rsbuild/core/compiled/style-loader/runtime/styleTagTransform.js");
|
|
14966
|
+
var styleTagTransform = __webpack_require__("./node_modules/@rslib/core/node_modules/@rsbuild/core/compiled/style-loader/runtime/styleTagTransform.js");
|
|
14963
14967
|
var styleTagTransform_default = /*#__PURE__*/ __webpack_require__.n(styleTagTransform);
|
|
14964
|
-
var main = __webpack_require__("./node_modules/@rsbuild/core/compiled/css-loader/index.js??ruleSet[1].rules[12].use[1]!builtin:lightningcss-loader??ruleSet[1].rules[12].use[2]!./node_modules/stylus-loader/dist/cjs.js??ruleSet[1].rules[12].use[3]!./src/styles/main.styl");
|
|
14968
|
+
var main = __webpack_require__("./node_modules/@rslib/core/node_modules/@rsbuild/core/compiled/css-loader/index.js??ruleSet[1].rules[12].use[1]!builtin:lightningcss-loader??ruleSet[1].rules[12].use[2]!./node_modules/stylus-loader/dist/cjs.js??ruleSet[1].rules[12].use[3]!./src/styles/main.styl");
|
|
14965
14969
|
var main_options = {};
|
|
14966
14970
|
main_options.styleTagTransform = styleTagTransform_default();
|
|
14967
14971
|
main_options.setAttributes = setAttributesWithoutAttributes_default();
|
|
@@ -17895,10 +17899,10 @@ var __webpack_exports__ = {};
|
|
|
17895
17899
|
}
|
|
17896
17900
|
}
|
|
17897
17901
|
setMp4Source(src, bustCache) {
|
|
17898
|
-
this.setVideoSource(
|
|
17902
|
+
this.setVideoSource(VideoType.MP4, src, bustCache);
|
|
17899
17903
|
}
|
|
17900
17904
|
setWebMSource(src, bustCache) {
|
|
17901
|
-
this.setVideoSource(
|
|
17905
|
+
this.setVideoSource(VideoType.WebM, src, bustCache);
|
|
17902
17906
|
}
|
|
17903
17907
|
getVideoType() {
|
|
17904
17908
|
if (!this.replayElement) return;
|
|
@@ -18249,7 +18253,8 @@ var __webpack_exports__ = {};
|
|
|
18249
18253
|
class Container extends util_Despot {
|
|
18250
18254
|
buildChildren() {
|
|
18251
18255
|
let playerOnly = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : false, parentElement = arguments.length > 1 ? arguments[1] : void 0;
|
|
18252
|
-
|
|
18256
|
+
const parentElementInfo = parentElement ? `, parentElement="${util_pretty(parentElement)}"` : "";
|
|
18257
|
+
this.options.logger.debug(`Container: buildChildren (playerOnly = ${playerOnly}${parentElementInfo})`);
|
|
18253
18258
|
if (this.containerElement) this.containerElement.classList.add(this.options.selectors.containerClass);
|
|
18254
18259
|
if (!playerOnly) this.buttons.build();
|
|
18255
18260
|
this.visuals.build(playerOnly, parentElement);
|
|
@@ -18393,13 +18398,13 @@ var __webpack_exports__ = {};
|
|
|
18393
18398
|
var _this_form;
|
|
18394
18399
|
const videomailFormData = null == (_this_form = this.form) ? void 0 : _this_form.transformFormData(formInputs);
|
|
18395
18400
|
if (!videomailFormData) throw new Error("No videomail form data defined");
|
|
18396
|
-
if (
|
|
18401
|
+
if (method === FormMethod.POST) {
|
|
18397
18402
|
videomailFormData.recordingStats = this.visuals.getRecordingStats();
|
|
18398
18403
|
videomailFormData.width = this.visuals.getRecorderWidth(true);
|
|
18399
18404
|
videomailFormData.height = this.visuals.getRecorderHeight(true);
|
|
18400
18405
|
return await this.resource.post(videomailFormData);
|
|
18401
18406
|
}
|
|
18402
|
-
if (
|
|
18407
|
+
if (method === FormMethod.PUT) return await this.resource.put(videomailFormData);
|
|
18403
18408
|
throw error_createError({
|
|
18404
18409
|
message: `Unsupported form method ${method}, unable to submit videomail.`,
|
|
18405
18410
|
options: this.options
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -7,13 +7,6 @@ import VideomailEvents from "./types/events";
|
|
|
7
7
|
import { VideomailClientOptions } from "./types/options";
|
|
8
8
|
import RecordingStats from "./types/RecordingStats";
|
|
9
9
|
import Videomail, { PartialVideomail } from "./types/Videomail";
|
|
10
|
-
import { VideoType } from "./types/VideoType";
|
|
11
|
-
export type { Videomail };
|
|
12
|
-
export type { VideomailEvents };
|
|
13
|
-
export type { RecordingStats };
|
|
14
|
-
export type { VideomailClientOptions };
|
|
10
|
+
import { VideoType, VideoTypeType } from "./types/VideoType";
|
|
11
|
+
export type { Command, CommandArgs, DeliveryRecord, EmailAddress, EmailAddresses, FullVideomailErrorData, PartialVideomail, RecordingStats, Videomail, VideomailClientOptions, VideomailErrorData, VideomailEvents, VideoTypeType, };
|
|
15
12
|
export { VideomailClient, VideoType };
|
|
16
|
-
export type { FullVideomailErrorData, PartialVideomail, VideomailErrorData };
|
|
17
|
-
export type { Command, CommandArgs };
|
|
18
|
-
export type { DeliveryRecord };
|
|
19
|
-
export type { EmailAddress, EmailAddresses };
|
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/@rsbuild/core/compiled/css-loader/index.js??ruleSet[1].rules[12].use[1]!builtin:lightningcss-loader??ruleSet[1].rules[12].use[2]!./node_modules/stylus-loader/dist/cjs.js??ruleSet[1].rules[12].use[3]!./src/styles/main.styl": function(module, __webpack_exports__, __webpack_require__) {
|
|
16
|
+
"./node_modules/@rslib/core/node_modules/@rsbuild/core/compiled/css-loader/index.js??ruleSet[1].rules[12].use[1]!builtin:lightningcss-loader??ruleSet[1].rules[12].use[2]!./node_modules/stylus-loader/dist/cjs.js??ruleSet[1].rules[12].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_rslib_core_node_modules_rsbuild_core_compiled_css_loader_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("./node_modules/@rslib/core/node_modules/@rsbuild/core/compiled/css-loader/noSourceMaps.js");
|
|
21
|
+
var _node_modules_rslib_core_node_modules_rsbuild_core_compiled_css_loader_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/ __webpack_require__.n(_node_modules_rslib_core_node_modules_rsbuild_core_compiled_css_loader_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__);
|
|
22
|
+
var _node_modules_rslib_core_node_modules_rsbuild_core_compiled_css_loader_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("./node_modules/@rslib/core/node_modules/@rsbuild/core/compiled/css-loader/api.js");
|
|
23
|
+
var _node_modules_rslib_core_node_modules_rsbuild_core_compiled_css_loader_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/ __webpack_require__.n(_node_modules_rslib_core_node_modules_rsbuild_core_compiled_css_loader_api_js__WEBPACK_IMPORTED_MODULE_1__);
|
|
24
|
+
var ___CSS_LOADER_EXPORT___ = _node_modules_rslib_core_node_modules_rsbuild_core_compiled_css_loader_api_js__WEBPACK_IMPORTED_MODULE_1___default()(_node_modules_rslib_core_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 {
|
|
@@ -3325,7 +3325,7 @@ var __webpack_modules__ = {
|
|
|
3325
3325
|
return tryTypedArrays(value);
|
|
3326
3326
|
};
|
|
3327
3327
|
},
|
|
3328
|
-
"./node_modules/@rsbuild/core/compiled/css-loader/api.js": function(module) {
|
|
3328
|
+
"./node_modules/@rslib/core/node_modules/@rsbuild/core/compiled/css-loader/api.js": function(module) {
|
|
3329
3329
|
module.exports = function(cssWithMappingToString) {
|
|
3330
3330
|
var list = [];
|
|
3331
3331
|
list.toString = function() {
|
|
@@ -3378,12 +3378,12 @@ var __webpack_modules__ = {
|
|
|
3378
3378
|
return list;
|
|
3379
3379
|
};
|
|
3380
3380
|
},
|
|
3381
|
-
"./node_modules/@rsbuild/core/compiled/css-loader/noSourceMaps.js": function(module) {
|
|
3381
|
+
"./node_modules/@rslib/core/node_modules/@rsbuild/core/compiled/css-loader/noSourceMaps.js": function(module) {
|
|
3382
3382
|
module.exports = function(i) {
|
|
3383
3383
|
return i[1];
|
|
3384
3384
|
};
|
|
3385
3385
|
},
|
|
3386
|
-
"./node_modules/@rsbuild/core/compiled/style-loader/runtime/injectStylesIntoStyleTag.js": function(module) {
|
|
3386
|
+
"./node_modules/@rslib/core/node_modules/@rsbuild/core/compiled/style-loader/runtime/injectStylesIntoStyleTag.js": function(module) {
|
|
3387
3387
|
var stylesInDOM = [];
|
|
3388
3388
|
function getIndexByIdentifier(identifier) {
|
|
3389
3389
|
var result = -1;
|
|
@@ -3461,7 +3461,7 @@ var __webpack_modules__ = {
|
|
|
3461
3461
|
};
|
|
3462
3462
|
};
|
|
3463
3463
|
},
|
|
3464
|
-
"./node_modules/@rsbuild/core/compiled/style-loader/runtime/insertBySelector.js": function(module) {
|
|
3464
|
+
"./node_modules/@rslib/core/node_modules/@rsbuild/core/compiled/style-loader/runtime/insertBySelector.js": function(module) {
|
|
3465
3465
|
var memo = {};
|
|
3466
3466
|
function getTarget(target) {
|
|
3467
3467
|
if (void 0 === memo[target]) {
|
|
@@ -3482,7 +3482,7 @@ var __webpack_modules__ = {
|
|
|
3482
3482
|
}
|
|
3483
3483
|
module.exports = insertBySelector;
|
|
3484
3484
|
},
|
|
3485
|
-
"./node_modules/@rsbuild/core/compiled/style-loader/runtime/insertStyleElement.js": function(module) {
|
|
3485
|
+
"./node_modules/@rslib/core/node_modules/@rsbuild/core/compiled/style-loader/runtime/insertStyleElement.js": function(module) {
|
|
3486
3486
|
function insertStyleElement(options) {
|
|
3487
3487
|
var element = document.createElement("style");
|
|
3488
3488
|
options.setAttributes(element, options.attributes);
|
|
@@ -3491,14 +3491,14 @@ var __webpack_modules__ = {
|
|
|
3491
3491
|
}
|
|
3492
3492
|
module.exports = insertStyleElement;
|
|
3493
3493
|
},
|
|
3494
|
-
"./node_modules/@rsbuild/core/compiled/style-loader/runtime/setAttributesWithoutAttributes.js": function(module, __unused_webpack_exports, __webpack_require__) {
|
|
3494
|
+
"./node_modules/@rslib/core/node_modules/@rsbuild/core/compiled/style-loader/runtime/setAttributesWithoutAttributes.js": function(module, __unused_webpack_exports, __webpack_require__) {
|
|
3495
3495
|
function setAttributesWithoutAttributes(styleElement) {
|
|
3496
3496
|
var nonce = __webpack_require__.nc;
|
|
3497
3497
|
if (nonce) styleElement.setAttribute("nonce", nonce);
|
|
3498
3498
|
}
|
|
3499
3499
|
module.exports = setAttributesWithoutAttributes;
|
|
3500
3500
|
},
|
|
3501
|
-
"./node_modules/@rsbuild/core/compiled/style-loader/runtime/styleDomAPI.js": function(module) {
|
|
3501
|
+
"./node_modules/@rslib/core/node_modules/@rsbuild/core/compiled/style-loader/runtime/styleDomAPI.js": function(module) {
|
|
3502
3502
|
function apply(styleElement, options, obj) {
|
|
3503
3503
|
var css = "";
|
|
3504
3504
|
if (obj.supports) css += "@supports (".concat(obj.supports, ") {");
|
|
@@ -3534,7 +3534,7 @@ var __webpack_modules__ = {
|
|
|
3534
3534
|
}
|
|
3535
3535
|
module.exports = domAPI;
|
|
3536
3536
|
},
|
|
3537
|
-
"./node_modules/@rsbuild/core/compiled/style-loader/runtime/styleTagTransform.js": function(module) {
|
|
3537
|
+
"./node_modules/@rslib/core/node_modules/@rsbuild/core/compiled/style-loader/runtime/styleTagTransform.js": function(module) {
|
|
3538
3538
|
function styleTagTransform(css, styleElement) {
|
|
3539
3539
|
if (styleElement.styleSheet) styleElement.styleSheet.cssText = css;
|
|
3540
3540
|
else {
|
|
@@ -3607,20 +3607,19 @@ const constants = {
|
|
|
3607
3607
|
}
|
|
3608
3608
|
};
|
|
3609
3609
|
var package_namespaceObject = {
|
|
3610
|
-
rE: "11.4.
|
|
3610
|
+
rE: "11.4.4"
|
|
3611
|
+
};
|
|
3612
|
+
const VideoType = {
|
|
3613
|
+
WebM: "webm",
|
|
3614
|
+
MP4: "mp4"
|
|
3611
3615
|
};
|
|
3612
|
-
var VideoType_VideoType = /*#__PURE__*/ function(VideoType) {
|
|
3613
|
-
VideoType["WebM"] = "webm";
|
|
3614
|
-
VideoType["MP4"] = "mp4";
|
|
3615
|
-
return VideoType;
|
|
3616
|
-
}({});
|
|
3617
3616
|
function canPlayType_canPlayType(video, type) {
|
|
3618
3617
|
const canPlayType = video.canPlayType(`video/${type}`);
|
|
3619
3618
|
if ("" === canPlayType) return false;
|
|
3620
3619
|
return canPlayType;
|
|
3621
3620
|
}
|
|
3622
3621
|
const media_canPlayType = canPlayType_canPlayType;
|
|
3623
|
-
const FALLBACK_VIDEO_TYPE =
|
|
3622
|
+
const FALLBACK_VIDEO_TYPE = VideoType.MP4;
|
|
3624
3623
|
class Browser {
|
|
3625
3624
|
options;
|
|
3626
3625
|
result;
|
|
@@ -3667,10 +3666,10 @@ class Browser {
|
|
|
3667
3666
|
}
|
|
3668
3667
|
getVideoType(video) {
|
|
3669
3668
|
if (!this.videoType) {
|
|
3670
|
-
if (media_canPlayType(video,
|
|
3671
|
-
else if (media_canPlayType(video,
|
|
3669
|
+
if (media_canPlayType(video, VideoType.MP4)) this.videoType = VideoType.MP4;
|
|
3670
|
+
else if (media_canPlayType(video, VideoType.WebM)) this.videoType = VideoType.WebM;
|
|
3672
3671
|
}
|
|
3673
|
-
if (this.videoType !==
|
|
3672
|
+
if (this.videoType !== VideoType.WebM && this.videoType !== VideoType.MP4) this.videoType = FALLBACK_VIDEO_TYPE;
|
|
3674
3673
|
if ("" === this.videoType.trim()) this.videoType = FALLBACK_VIDEO_TYPE;
|
|
3675
3674
|
return this.videoType;
|
|
3676
3675
|
}
|
|
@@ -4009,6 +4008,11 @@ function trimEmails(emails) {
|
|
|
4009
4008
|
const trimmedEmails = emails.split(REGEX).map((item)=>item.trim()).filter(Boolean);
|
|
4010
4009
|
return trimmedEmails;
|
|
4011
4010
|
}
|
|
4011
|
+
const FormMethod = {
|
|
4012
|
+
POST: "post",
|
|
4013
|
+
PUT: "put",
|
|
4014
|
+
GET: "get"
|
|
4015
|
+
};
|
|
4012
4016
|
class Form extends util_Despot {
|
|
4013
4017
|
container;
|
|
4014
4018
|
formElement;
|
|
@@ -4096,7 +4100,7 @@ class Form extends util_Despot {
|
|
|
4096
4100
|
if (name === this.options.selectors.toInputName || name === this.options.selectors.subjectInputName || name === this.options.selectors.bodyInputName) formControl.setAttribute("disabled", "disabled");
|
|
4097
4101
|
}
|
|
4098
4102
|
}
|
|
4099
|
-
this.formElement.setAttribute("method",
|
|
4103
|
+
this.formElement.setAttribute("method", FormMethod.PUT);
|
|
4100
4104
|
}
|
|
4101
4105
|
setDisabled(disabled, buttonsToo) {
|
|
4102
4106
|
for (const formControl of this.formElement.elements)if (buttonsToo || html_isNotButton(formControl)) if (disabled) formControl.setAttribute("disabled", "disabled");
|
|
@@ -4223,14 +4227,14 @@ class Form extends util_Despot {
|
|
|
4223
4227
|
const method = this.formElement.getAttribute("method");
|
|
4224
4228
|
let chosenMethod;
|
|
4225
4229
|
switch(method){
|
|
4226
|
-
case
|
|
4227
|
-
chosenMethod =
|
|
4230
|
+
case FormMethod.POST:
|
|
4231
|
+
chosenMethod = FormMethod.POST;
|
|
4228
4232
|
break;
|
|
4229
|
-
case
|
|
4230
|
-
chosenMethod =
|
|
4233
|
+
case FormMethod.PUT:
|
|
4234
|
+
chosenMethod = FormMethod.PUT;
|
|
4231
4235
|
break;
|
|
4232
4236
|
default:
|
|
4233
|
-
chosenMethod =
|
|
4237
|
+
chosenMethod = FormMethod.POST;
|
|
4234
4238
|
}
|
|
4235
4239
|
if (this.container.hasElement()) await this.container.submitAll(this.getData(), chosenMethod, url);
|
|
4236
4240
|
return false;
|
|
@@ -4315,7 +4319,7 @@ class Resource {
|
|
|
4315
4319
|
[constants.SITE_NAME_LABEL]: this.options.siteName
|
|
4316
4320
|
};
|
|
4317
4321
|
let url = `${this.options.baseUrl}/videomail/`;
|
|
4318
|
-
if (
|
|
4322
|
+
if (method === FormMethod.PUT && videomail.key) url += videomail.key;
|
|
4319
4323
|
try {
|
|
4320
4324
|
const request = await superagent(method, url).query(queryParams).set("Timezone-Id", this.timezoneId).withCredentials().send(videomail).timeout(this.options.timeouts.connection);
|
|
4321
4325
|
return request;
|
|
@@ -4362,7 +4366,7 @@ class Resource {
|
|
|
4362
4366
|
videomailNinjaFormPlugin: this.options.versions?.videomailNinjaFormPlugin
|
|
4363
4367
|
}
|
|
4364
4368
|
};
|
|
4365
|
-
await superagent(
|
|
4369
|
+
await superagent(FormMethod.POST, url).query(queryParams).set("Timezone-Id", this.timezoneId).withCredentials().send(fullVideomailErrorData).timeout(this.options.timeouts.connection);
|
|
4366
4370
|
} catch (exc) {
|
|
4367
4371
|
console.error(exc);
|
|
4368
4372
|
}
|
|
@@ -4374,8 +4378,8 @@ class Resource {
|
|
|
4374
4378
|
let res;
|
|
4375
4379
|
if (this.options.callbacks.adjustFormDataBeforePosting) {
|
|
4376
4380
|
const adjustedVideomail = this.options.callbacks.adjustFormDataBeforePosting(newVideomail);
|
|
4377
|
-
res = await this.write(
|
|
4378
|
-
} else res = await this.write(
|
|
4381
|
+
res = await this.write(FormMethod.POST, adjustedVideomail);
|
|
4382
|
+
} else res = await this.write(FormMethod.POST, newVideomail);
|
|
4379
4383
|
return res;
|
|
4380
4384
|
} catch (exc) {
|
|
4381
4385
|
throw error_createError({
|
|
@@ -4385,7 +4389,7 @@ class Resource {
|
|
|
4385
4389
|
}
|
|
4386
4390
|
}
|
|
4387
4391
|
async put(videomail) {
|
|
4388
|
-
return await this.write(
|
|
4392
|
+
return await this.write(FormMethod.PUT, videomail);
|
|
4389
4393
|
}
|
|
4390
4394
|
async form(formData, url) {
|
|
4391
4395
|
let formType;
|
|
@@ -4600,19 +4604,19 @@ function mergeWithDefaultOptions_mergeWithDefaultOptions(options = {}) {
|
|
|
4600
4604
|
return newOptions;
|
|
4601
4605
|
}
|
|
4602
4606
|
const mergeWithDefaultOptions = mergeWithDefaultOptions_mergeWithDefaultOptions;
|
|
4603
|
-
var injectStylesIntoStyleTag = __webpack_require__("./node_modules/@rsbuild/core/compiled/style-loader/runtime/injectStylesIntoStyleTag.js");
|
|
4607
|
+
var injectStylesIntoStyleTag = __webpack_require__("./node_modules/@rslib/core/node_modules/@rsbuild/core/compiled/style-loader/runtime/injectStylesIntoStyleTag.js");
|
|
4604
4608
|
var injectStylesIntoStyleTag_default = /*#__PURE__*/ __webpack_require__.n(injectStylesIntoStyleTag);
|
|
4605
|
-
var styleDomAPI = __webpack_require__("./node_modules/@rsbuild/core/compiled/style-loader/runtime/styleDomAPI.js");
|
|
4609
|
+
var styleDomAPI = __webpack_require__("./node_modules/@rslib/core/node_modules/@rsbuild/core/compiled/style-loader/runtime/styleDomAPI.js");
|
|
4606
4610
|
var styleDomAPI_default = /*#__PURE__*/ __webpack_require__.n(styleDomAPI);
|
|
4607
|
-
var insertBySelector = __webpack_require__("./node_modules/@rsbuild/core/compiled/style-loader/runtime/insertBySelector.js");
|
|
4611
|
+
var insertBySelector = __webpack_require__("./node_modules/@rslib/core/node_modules/@rsbuild/core/compiled/style-loader/runtime/insertBySelector.js");
|
|
4608
4612
|
var insertBySelector_default = /*#__PURE__*/ __webpack_require__.n(insertBySelector);
|
|
4609
|
-
var setAttributesWithoutAttributes = __webpack_require__("./node_modules/@rsbuild/core/compiled/style-loader/runtime/setAttributesWithoutAttributes.js");
|
|
4613
|
+
var setAttributesWithoutAttributes = __webpack_require__("./node_modules/@rslib/core/node_modules/@rsbuild/core/compiled/style-loader/runtime/setAttributesWithoutAttributes.js");
|
|
4610
4614
|
var setAttributesWithoutAttributes_default = /*#__PURE__*/ __webpack_require__.n(setAttributesWithoutAttributes);
|
|
4611
|
-
var insertStyleElement = __webpack_require__("./node_modules/@rsbuild/core/compiled/style-loader/runtime/insertStyleElement.js");
|
|
4615
|
+
var insertStyleElement = __webpack_require__("./node_modules/@rslib/core/node_modules/@rsbuild/core/compiled/style-loader/runtime/insertStyleElement.js");
|
|
4612
4616
|
var insertStyleElement_default = /*#__PURE__*/ __webpack_require__.n(insertStyleElement);
|
|
4613
|
-
var styleTagTransform = __webpack_require__("./node_modules/@rsbuild/core/compiled/style-loader/runtime/styleTagTransform.js");
|
|
4617
|
+
var styleTagTransform = __webpack_require__("./node_modules/@rslib/core/node_modules/@rsbuild/core/compiled/style-loader/runtime/styleTagTransform.js");
|
|
4614
4618
|
var styleTagTransform_default = /*#__PURE__*/ __webpack_require__.n(styleTagTransform);
|
|
4615
|
-
var main = __webpack_require__("./node_modules/@rsbuild/core/compiled/css-loader/index.js??ruleSet[1].rules[12].use[1]!builtin:lightningcss-loader??ruleSet[1].rules[12].use[2]!./node_modules/stylus-loader/dist/cjs.js??ruleSet[1].rules[12].use[3]!./src/styles/main.styl");
|
|
4619
|
+
var main = __webpack_require__("./node_modules/@rslib/core/node_modules/@rsbuild/core/compiled/css-loader/index.js??ruleSet[1].rules[12].use[1]!builtin:lightningcss-loader??ruleSet[1].rules[12].use[2]!./node_modules/stylus-loader/dist/cjs.js??ruleSet[1].rules[12].use[3]!./src/styles/main.styl");
|
|
4616
4620
|
var main_options = {};
|
|
4617
4621
|
main_options.styleTagTransform = styleTagTransform_default();
|
|
4618
4622
|
main_options.setAttributes = setAttributesWithoutAttributes_default();
|
|
@@ -7315,10 +7319,10 @@ class Replay extends util_Despot {
|
|
|
7315
7319
|
}
|
|
7316
7320
|
}
|
|
7317
7321
|
setMp4Source(src, bustCache) {
|
|
7318
|
-
this.setVideoSource(
|
|
7322
|
+
this.setVideoSource(VideoType.MP4, src, bustCache);
|
|
7319
7323
|
}
|
|
7320
7324
|
setWebMSource(src, bustCache) {
|
|
7321
|
-
this.setVideoSource(
|
|
7325
|
+
this.setVideoSource(VideoType.WebM, src, bustCache);
|
|
7322
7326
|
}
|
|
7323
7327
|
getVideoType() {
|
|
7324
7328
|
if (!this.replayElement) return;
|
|
@@ -7658,7 +7662,8 @@ class Container extends util_Despot {
|
|
|
7658
7662
|
this.resource = new src_resource(options);
|
|
7659
7663
|
}
|
|
7660
7664
|
buildChildren(playerOnly = false, parentElement) {
|
|
7661
|
-
|
|
7665
|
+
const parentElementInfo = parentElement ? `, parentElement="${util_pretty(parentElement)}"` : "";
|
|
7666
|
+
this.options.logger.debug(`Container: buildChildren (playerOnly = ${playerOnly}${parentElementInfo})`);
|
|
7662
7667
|
if (this.containerElement) this.containerElement.classList.add(this.options.selectors.containerClass);
|
|
7663
7668
|
if (!playerOnly) this.buttons.build();
|
|
7664
7669
|
this.visuals.build(playerOnly, parentElement);
|
|
@@ -7798,13 +7803,13 @@ class Container extends util_Despot {
|
|
|
7798
7803
|
async submitVideomail(formInputs, method) {
|
|
7799
7804
|
const videomailFormData = this.form?.transformFormData(formInputs);
|
|
7800
7805
|
if (!videomailFormData) throw new Error("No videomail form data defined");
|
|
7801
|
-
if (
|
|
7806
|
+
if (method === FormMethod.POST) {
|
|
7802
7807
|
videomailFormData.recordingStats = this.visuals.getRecordingStats();
|
|
7803
7808
|
videomailFormData.width = this.visuals.getRecorderWidth(true);
|
|
7804
7809
|
videomailFormData.height = this.visuals.getRecorderHeight(true);
|
|
7805
7810
|
return await this.resource.post(videomailFormData);
|
|
7806
7811
|
}
|
|
7807
|
-
if (
|
|
7812
|
+
if (method === FormMethod.PUT) return await this.resource.put(videomailFormData);
|
|
7808
7813
|
throw error_createError({
|
|
7809
7814
|
message: `Unsupported form method ${method}, unable to submit videomail.`,
|
|
7810
7815
|
options: this.options
|
|
@@ -8206,4 +8211,4 @@ class VideomailClient extends util_Despot {
|
|
|
8206
8211
|
}
|
|
8207
8212
|
}
|
|
8208
8213
|
const client = VideomailClient;
|
|
8209
|
-
export {
|
|
8214
|
+
export { VideoType, client as VideomailClient };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
export declare
|
|
2
|
-
WebM
|
|
3
|
-
MP4
|
|
4
|
-
}
|
|
1
|
+
export declare const VideoType: {
|
|
2
|
+
readonly WebM: "webm";
|
|
3
|
+
readonly MP4: "mp4";
|
|
4
|
+
};
|
|
5
|
+
export type VideoTypeType = (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):
|
|
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 {
|
|
2
|
-
declare function canPlayType(video: HTMLVideoElement, type:
|
|
1
|
+
import { VideoTypeType } from "./../../../types/VideoType";
|
|
2
|
+
declare function canPlayType(video: HTMLVideoElement, type: VideoTypeType): false | "maybe" | "probably";
|
|
3
3
|
export default canPlayType;
|
|
@@ -3,7 +3,7 @@ import { ShowParams, StartOverParams } from "../client";
|
|
|
3
3
|
import { VideomailClientOptions } from "../types/options";
|
|
4
4
|
import Videomail from "../types/Videomail";
|
|
5
5
|
import Despot from "../util/Despot";
|
|
6
|
-
import { FormInputs,
|
|
6
|
+
import { FormInputs, FormMethodType } from "./form";
|
|
7
7
|
interface BuildOptions {
|
|
8
8
|
playerOnly?: boolean;
|
|
9
9
|
replayParentElementId?: string | undefined;
|
|
@@ -66,7 +66,7 @@ declare class Container extends Despot {
|
|
|
66
66
|
enableForm(buttonsToo: boolean): void;
|
|
67
67
|
hasForm(): boolean;
|
|
68
68
|
private buttonsAreReady;
|
|
69
|
-
submitAll(formData: FormInputs, method:
|
|
69
|
+
submitAll(formData: FormInputs, method: FormMethodType, url: string): Promise<void>;
|
|
70
70
|
isBuilt(): boolean;
|
|
71
71
|
isReplayShown(): boolean;
|
|
72
72
|
isDirty(): boolean;
|
|
@@ -3,11 +3,12 @@ import Videomail from "../types/Videomail";
|
|
|
3
3
|
import Despot from "../util/Despot";
|
|
4
4
|
import Container from "./container";
|
|
5
5
|
export type FormInputs = Record<string, string>;
|
|
6
|
-
export declare
|
|
7
|
-
POST
|
|
8
|
-
PUT
|
|
9
|
-
GET
|
|
10
|
-
}
|
|
6
|
+
export declare const FormMethod: {
|
|
7
|
+
readonly POST: "post";
|
|
8
|
+
readonly PUT: "put";
|
|
9
|
+
readonly GET: "get";
|
|
10
|
+
};
|
|
11
|
+
export type FormMethodType = (typeof FormMethod)[keyof typeof FormMethod];
|
|
11
12
|
declare class Form extends Despot {
|
|
12
13
|
private readonly container;
|
|
13
14
|
private readonly formElement;
|
|
@@ -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():
|
|
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
|
@@ -5,16 +5,16 @@
|
|
|
5
5
|
else root["VideomailClient"] = factory();
|
|
6
6
|
})(globalThis, ()=>(()=>{
|
|
7
7
|
var __webpack_modules__ = {
|
|
8
|
-
"./node_modules/@rsbuild/core/compiled/css-loader/index.js??ruleSet[1].rules[12].use[1]!builtin:lightningcss-loader??ruleSet[1].rules[12].use[2]!./node_modules/stylus-loader/dist/cjs.js??ruleSet[1].rules[12].use[3]!./src/styles/main.styl": function(module1, __webpack_exports__, __webpack_require__) {
|
|
8
|
+
"./node_modules/@rslib/core/node_modules/@rsbuild/core/compiled/css-loader/index.js??ruleSet[1].rules[12].use[1]!builtin:lightningcss-loader??ruleSet[1].rules[12].use[2]!./node_modules/stylus-loader/dist/cjs.js??ruleSet[1].rules[12].use[3]!./src/styles/main.styl": function(module1, __webpack_exports__, __webpack_require__) {
|
|
9
9
|
"use strict";
|
|
10
10
|
__webpack_require__.d(__webpack_exports__, {
|
|
11
11
|
A: ()=>__WEBPACK_DEFAULT_EXPORT__
|
|
12
12
|
});
|
|
13
|
-
var
|
|
14
|
-
var
|
|
15
|
-
var
|
|
16
|
-
var
|
|
17
|
-
var ___CSS_LOADER_EXPORT___ =
|
|
13
|
+
var _node_modules_rslib_core_node_modules_rsbuild_core_compiled_css_loader_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("./node_modules/@rslib/core/node_modules/@rsbuild/core/compiled/css-loader/noSourceMaps.js");
|
|
14
|
+
var _node_modules_rslib_core_node_modules_rsbuild_core_compiled_css_loader_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/ __webpack_require__.n(_node_modules_rslib_core_node_modules_rsbuild_core_compiled_css_loader_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__);
|
|
15
|
+
var _node_modules_rslib_core_node_modules_rsbuild_core_compiled_css_loader_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("./node_modules/@rslib/core/node_modules/@rsbuild/core/compiled/css-loader/api.js");
|
|
16
|
+
var _node_modules_rslib_core_node_modules_rsbuild_core_compiled_css_loader_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/ __webpack_require__.n(_node_modules_rslib_core_node_modules_rsbuild_core_compiled_css_loader_api_js__WEBPACK_IMPORTED_MODULE_1__);
|
|
17
|
+
var ___CSS_LOADER_EXPORT___ = _node_modules_rslib_core_node_modules_rsbuild_core_compiled_css_loader_api_js__WEBPACK_IMPORTED_MODULE_1___default()(_node_modules_rslib_core_node_modules_rsbuild_core_compiled_css_loader_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default());
|
|
18
18
|
___CSS_LOADER_EXPORT___.push([
|
|
19
19
|
module1.id,
|
|
20
20
|
`@keyframes blink {
|
|
@@ -10187,7 +10187,7 @@
|
|
|
10187
10187
|
"?aa23": function() {},
|
|
10188
10188
|
"?9936": function() {},
|
|
10189
10189
|
"?5f55": function() {},
|
|
10190
|
-
"./node_modules/@rsbuild/core/compiled/css-loader/api.js": function(module1) {
|
|
10190
|
+
"./node_modules/@rslib/core/node_modules/@rsbuild/core/compiled/css-loader/api.js": function(module1) {
|
|
10191
10191
|
"use strict";
|
|
10192
10192
|
module1.exports = function(cssWithMappingToString) {
|
|
10193
10193
|
var list = [];
|
|
@@ -10241,13 +10241,13 @@
|
|
|
10241
10241
|
return list;
|
|
10242
10242
|
};
|
|
10243
10243
|
},
|
|
10244
|
-
"./node_modules/@rsbuild/core/compiled/css-loader/noSourceMaps.js": function(module1) {
|
|
10244
|
+
"./node_modules/@rslib/core/node_modules/@rsbuild/core/compiled/css-loader/noSourceMaps.js": function(module1) {
|
|
10245
10245
|
"use strict";
|
|
10246
10246
|
module1.exports = function(i) {
|
|
10247
10247
|
return i[1];
|
|
10248
10248
|
};
|
|
10249
10249
|
},
|
|
10250
|
-
"./node_modules/@rsbuild/core/compiled/style-loader/runtime/injectStylesIntoStyleTag.js": function(module1) {
|
|
10250
|
+
"./node_modules/@rslib/core/node_modules/@rsbuild/core/compiled/style-loader/runtime/injectStylesIntoStyleTag.js": function(module1) {
|
|
10251
10251
|
"use strict";
|
|
10252
10252
|
var stylesInDOM = [];
|
|
10253
10253
|
function getIndexByIdentifier(identifier) {
|
|
@@ -10326,7 +10326,7 @@
|
|
|
10326
10326
|
};
|
|
10327
10327
|
};
|
|
10328
10328
|
},
|
|
10329
|
-
"./node_modules/@rsbuild/core/compiled/style-loader/runtime/insertBySelector.js": function(module1) {
|
|
10329
|
+
"./node_modules/@rslib/core/node_modules/@rsbuild/core/compiled/style-loader/runtime/insertBySelector.js": function(module1) {
|
|
10330
10330
|
"use strict";
|
|
10331
10331
|
var memo = {};
|
|
10332
10332
|
function getTarget(target) {
|
|
@@ -10348,7 +10348,7 @@
|
|
|
10348
10348
|
}
|
|
10349
10349
|
module1.exports = insertBySelector;
|
|
10350
10350
|
},
|
|
10351
|
-
"./node_modules/@rsbuild/core/compiled/style-loader/runtime/insertStyleElement.js": function(module1) {
|
|
10351
|
+
"./node_modules/@rslib/core/node_modules/@rsbuild/core/compiled/style-loader/runtime/insertStyleElement.js": function(module1) {
|
|
10352
10352
|
"use strict";
|
|
10353
10353
|
function insertStyleElement(options) {
|
|
10354
10354
|
var element = document.createElement("style");
|
|
@@ -10358,7 +10358,7 @@
|
|
|
10358
10358
|
}
|
|
10359
10359
|
module1.exports = insertStyleElement;
|
|
10360
10360
|
},
|
|
10361
|
-
"./node_modules/@rsbuild/core/compiled/style-loader/runtime/setAttributesWithoutAttributes.js": function(module1, __unused_webpack_exports, __webpack_require__) {
|
|
10361
|
+
"./node_modules/@rslib/core/node_modules/@rsbuild/core/compiled/style-loader/runtime/setAttributesWithoutAttributes.js": function(module1, __unused_webpack_exports, __webpack_require__) {
|
|
10362
10362
|
"use strict";
|
|
10363
10363
|
function setAttributesWithoutAttributes(styleElement) {
|
|
10364
10364
|
var nonce = __webpack_require__.nc;
|
|
@@ -10366,7 +10366,7 @@
|
|
|
10366
10366
|
}
|
|
10367
10367
|
module1.exports = setAttributesWithoutAttributes;
|
|
10368
10368
|
},
|
|
10369
|
-
"./node_modules/@rsbuild/core/compiled/style-loader/runtime/styleDomAPI.js": function(module1) {
|
|
10369
|
+
"./node_modules/@rslib/core/node_modules/@rsbuild/core/compiled/style-loader/runtime/styleDomAPI.js": function(module1) {
|
|
10370
10370
|
"use strict";
|
|
10371
10371
|
function apply(styleElement, options, obj) {
|
|
10372
10372
|
var css = "";
|
|
@@ -10403,7 +10403,7 @@
|
|
|
10403
10403
|
}
|
|
10404
10404
|
module1.exports = domAPI;
|
|
10405
10405
|
},
|
|
10406
|
-
"./node_modules/@rsbuild/core/compiled/style-loader/runtime/styleTagTransform.js": function(module1) {
|
|
10406
|
+
"./node_modules/@rslib/core/node_modules/@rsbuild/core/compiled/style-loader/runtime/styleTagTransform.js": function(module1) {
|
|
10407
10407
|
"use strict";
|
|
10408
10408
|
function styleTagTransform(css, styleElement) {
|
|
10409
10409
|
if (styleElement.styleSheet) styleElement.styleSheet.cssText = css;
|
|
@@ -10485,7 +10485,7 @@
|
|
|
10485
10485
|
__webpack_require__.r(__webpack_exports__);
|
|
10486
10486
|
__webpack_require__.d(__webpack_exports__, {
|
|
10487
10487
|
VideomailClient: ()=>src_client,
|
|
10488
|
-
VideoType: ()=>
|
|
10488
|
+
VideoType: ()=>VideoType
|
|
10489
10489
|
});
|
|
10490
10490
|
const constants = {
|
|
10491
10491
|
SITE_NAME_LABEL: "x-videomail-site-name",
|
|
@@ -10648,7 +10648,7 @@
|
|
|
10648
10648
|
var client = __webpack_require__("./node_modules/superagent/lib/client.js");
|
|
10649
10649
|
var client_default = /*#__PURE__*/ __webpack_require__.n(client);
|
|
10650
10650
|
var package_namespaceObject = {
|
|
10651
|
-
rE: "11.4.
|
|
10651
|
+
rE: "11.4.4"
|
|
10652
10652
|
};
|
|
10653
10653
|
var defined = __webpack_require__("./node_modules/defined/index.js");
|
|
10654
10654
|
var defined_default = /*#__PURE__*/ __webpack_require__.n(defined);
|
|
@@ -13784,18 +13784,17 @@
|
|
|
13784
13784
|
NAME,
|
|
13785
13785
|
VERSION
|
|
13786
13786
|
]);
|
|
13787
|
-
|
|
13788
|
-
|
|
13789
|
-
|
|
13790
|
-
|
|
13791
|
-
}({});
|
|
13787
|
+
const VideoType = {
|
|
13788
|
+
WebM: "webm",
|
|
13789
|
+
MP4: "mp4"
|
|
13790
|
+
};
|
|
13792
13791
|
function canPlayType_canPlayType(video, type) {
|
|
13793
13792
|
const canPlayType = video.canPlayType(`video/${type}`);
|
|
13794
13793
|
if ("" === canPlayType) return false;
|
|
13795
13794
|
return canPlayType;
|
|
13796
13795
|
}
|
|
13797
13796
|
const media_canPlayType = canPlayType_canPlayType;
|
|
13798
|
-
const FALLBACK_VIDEO_TYPE =
|
|
13797
|
+
const FALLBACK_VIDEO_TYPE = VideoType.MP4;
|
|
13799
13798
|
class Browser {
|
|
13800
13799
|
options;
|
|
13801
13800
|
result;
|
|
@@ -13842,10 +13841,10 @@
|
|
|
13842
13841
|
}
|
|
13843
13842
|
getVideoType(video) {
|
|
13844
13843
|
if (!this.videoType) {
|
|
13845
|
-
if (media_canPlayType(video,
|
|
13846
|
-
else if (media_canPlayType(video,
|
|
13844
|
+
if (media_canPlayType(video, VideoType.MP4)) this.videoType = VideoType.MP4;
|
|
13845
|
+
else if (media_canPlayType(video, VideoType.WebM)) this.videoType = VideoType.WebM;
|
|
13847
13846
|
}
|
|
13848
|
-
if (this.videoType !==
|
|
13847
|
+
if (this.videoType !== VideoType.WebM && this.videoType !== VideoType.MP4) this.videoType = FALLBACK_VIDEO_TYPE;
|
|
13849
13848
|
if ("" === this.videoType.trim()) this.videoType = FALLBACK_VIDEO_TYPE;
|
|
13850
13849
|
return this.videoType;
|
|
13851
13850
|
}
|
|
@@ -14297,6 +14296,11 @@
|
|
|
14297
14296
|
const trimmedEmails = emails.split(REGEX).map((item)=>item.trim()).filter(Boolean);
|
|
14298
14297
|
return trimmedEmails;
|
|
14299
14298
|
}
|
|
14299
|
+
const FormMethod = {
|
|
14300
|
+
POST: "post",
|
|
14301
|
+
PUT: "put",
|
|
14302
|
+
GET: "get"
|
|
14303
|
+
};
|
|
14300
14304
|
class Form extends util_Despot {
|
|
14301
14305
|
container;
|
|
14302
14306
|
formElement;
|
|
@@ -14384,7 +14388,7 @@
|
|
|
14384
14388
|
if (name === this.options.selectors.toInputName || name === this.options.selectors.subjectInputName || name === this.options.selectors.bodyInputName) formControl.setAttribute("disabled", "disabled");
|
|
14385
14389
|
}
|
|
14386
14390
|
}
|
|
14387
|
-
this.formElement.setAttribute("method",
|
|
14391
|
+
this.formElement.setAttribute("method", FormMethod.PUT);
|
|
14388
14392
|
}
|
|
14389
14393
|
setDisabled(disabled, buttonsToo) {
|
|
14390
14394
|
for (const formControl of this.formElement.elements)if (buttonsToo || html_isNotButton(formControl)) if (disabled) formControl.setAttribute("disabled", "disabled");
|
|
@@ -14511,14 +14515,14 @@
|
|
|
14511
14515
|
const method = this.formElement.getAttribute("method");
|
|
14512
14516
|
let chosenMethod;
|
|
14513
14517
|
switch(method){
|
|
14514
|
-
case
|
|
14515
|
-
chosenMethod =
|
|
14518
|
+
case FormMethod.POST:
|
|
14519
|
+
chosenMethod = FormMethod.POST;
|
|
14516
14520
|
break;
|
|
14517
|
-
case
|
|
14518
|
-
chosenMethod =
|
|
14521
|
+
case FormMethod.PUT:
|
|
14522
|
+
chosenMethod = FormMethod.PUT;
|
|
14519
14523
|
break;
|
|
14520
14524
|
default:
|
|
14521
|
-
chosenMethod =
|
|
14525
|
+
chosenMethod = FormMethod.POST;
|
|
14522
14526
|
}
|
|
14523
14527
|
if (this.container.hasElement()) await this.container.submitAll(this.getData(), chosenMethod, url);
|
|
14524
14528
|
return false;
|
|
@@ -14603,7 +14607,7 @@
|
|
|
14603
14607
|
[constants.SITE_NAME_LABEL]: this.options.siteName
|
|
14604
14608
|
};
|
|
14605
14609
|
let url = `${this.options.baseUrl}/videomail/`;
|
|
14606
|
-
if (
|
|
14610
|
+
if (method === FormMethod.PUT && videomail.key) url += videomail.key;
|
|
14607
14611
|
try {
|
|
14608
14612
|
const request = await client_default()(method, url).query(queryParams).set("Timezone-Id", this.timezoneId).withCredentials().send(videomail).timeout(this.options.timeouts.connection);
|
|
14609
14613
|
return request;
|
|
@@ -14650,7 +14654,7 @@
|
|
|
14650
14654
|
videomailNinjaFormPlugin: this.options.versions?.videomailNinjaFormPlugin
|
|
14651
14655
|
}
|
|
14652
14656
|
};
|
|
14653
|
-
await client_default()(
|
|
14657
|
+
await client_default()(FormMethod.POST, url).query(queryParams).set("Timezone-Id", this.timezoneId).withCredentials().send(fullVideomailErrorData).timeout(this.options.timeouts.connection);
|
|
14654
14658
|
} catch (exc) {
|
|
14655
14659
|
console.error(exc);
|
|
14656
14660
|
}
|
|
@@ -14662,8 +14666,8 @@
|
|
|
14662
14666
|
let res;
|
|
14663
14667
|
if (this.options.callbacks.adjustFormDataBeforePosting) {
|
|
14664
14668
|
const adjustedVideomail = this.options.callbacks.adjustFormDataBeforePosting(newVideomail);
|
|
14665
|
-
res = await this.write(
|
|
14666
|
-
} else res = await this.write(
|
|
14669
|
+
res = await this.write(FormMethod.POST, adjustedVideomail);
|
|
14670
|
+
} else res = await this.write(FormMethod.POST, newVideomail);
|
|
14667
14671
|
return res;
|
|
14668
14672
|
} catch (exc) {
|
|
14669
14673
|
throw error_createError({
|
|
@@ -14673,7 +14677,7 @@
|
|
|
14673
14677
|
}
|
|
14674
14678
|
}
|
|
14675
14679
|
async put(videomail) {
|
|
14676
|
-
return await this.write(
|
|
14680
|
+
return await this.write(FormMethod.PUT, videomail);
|
|
14677
14681
|
}
|
|
14678
14682
|
async form(formData, url) {
|
|
14679
14683
|
let formType;
|
|
@@ -14888,19 +14892,19 @@
|
|
|
14888
14892
|
return newOptions;
|
|
14889
14893
|
}
|
|
14890
14894
|
const mergeWithDefaultOptions = mergeWithDefaultOptions_mergeWithDefaultOptions;
|
|
14891
|
-
var injectStylesIntoStyleTag = __webpack_require__("./node_modules/@rsbuild/core/compiled/style-loader/runtime/injectStylesIntoStyleTag.js");
|
|
14895
|
+
var injectStylesIntoStyleTag = __webpack_require__("./node_modules/@rslib/core/node_modules/@rsbuild/core/compiled/style-loader/runtime/injectStylesIntoStyleTag.js");
|
|
14892
14896
|
var injectStylesIntoStyleTag_default = /*#__PURE__*/ __webpack_require__.n(injectStylesIntoStyleTag);
|
|
14893
|
-
var styleDomAPI = __webpack_require__("./node_modules/@rsbuild/core/compiled/style-loader/runtime/styleDomAPI.js");
|
|
14897
|
+
var styleDomAPI = __webpack_require__("./node_modules/@rslib/core/node_modules/@rsbuild/core/compiled/style-loader/runtime/styleDomAPI.js");
|
|
14894
14898
|
var styleDomAPI_default = /*#__PURE__*/ __webpack_require__.n(styleDomAPI);
|
|
14895
|
-
var insertBySelector = __webpack_require__("./node_modules/@rsbuild/core/compiled/style-loader/runtime/insertBySelector.js");
|
|
14899
|
+
var insertBySelector = __webpack_require__("./node_modules/@rslib/core/node_modules/@rsbuild/core/compiled/style-loader/runtime/insertBySelector.js");
|
|
14896
14900
|
var insertBySelector_default = /*#__PURE__*/ __webpack_require__.n(insertBySelector);
|
|
14897
|
-
var setAttributesWithoutAttributes = __webpack_require__("./node_modules/@rsbuild/core/compiled/style-loader/runtime/setAttributesWithoutAttributes.js");
|
|
14901
|
+
var setAttributesWithoutAttributes = __webpack_require__("./node_modules/@rslib/core/node_modules/@rsbuild/core/compiled/style-loader/runtime/setAttributesWithoutAttributes.js");
|
|
14898
14902
|
var setAttributesWithoutAttributes_default = /*#__PURE__*/ __webpack_require__.n(setAttributesWithoutAttributes);
|
|
14899
|
-
var insertStyleElement = __webpack_require__("./node_modules/@rsbuild/core/compiled/style-loader/runtime/insertStyleElement.js");
|
|
14903
|
+
var insertStyleElement = __webpack_require__("./node_modules/@rslib/core/node_modules/@rsbuild/core/compiled/style-loader/runtime/insertStyleElement.js");
|
|
14900
14904
|
var insertStyleElement_default = /*#__PURE__*/ __webpack_require__.n(insertStyleElement);
|
|
14901
|
-
var styleTagTransform = __webpack_require__("./node_modules/@rsbuild/core/compiled/style-loader/runtime/styleTagTransform.js");
|
|
14905
|
+
var styleTagTransform = __webpack_require__("./node_modules/@rslib/core/node_modules/@rsbuild/core/compiled/style-loader/runtime/styleTagTransform.js");
|
|
14902
14906
|
var styleTagTransform_default = /*#__PURE__*/ __webpack_require__.n(styleTagTransform);
|
|
14903
|
-
var main = __webpack_require__("./node_modules/@rsbuild/core/compiled/css-loader/index.js??ruleSet[1].rules[12].use[1]!builtin:lightningcss-loader??ruleSet[1].rules[12].use[2]!./node_modules/stylus-loader/dist/cjs.js??ruleSet[1].rules[12].use[3]!./src/styles/main.styl");
|
|
14907
|
+
var main = __webpack_require__("./node_modules/@rslib/core/node_modules/@rsbuild/core/compiled/css-loader/index.js??ruleSet[1].rules[12].use[1]!builtin:lightningcss-loader??ruleSet[1].rules[12].use[2]!./node_modules/stylus-loader/dist/cjs.js??ruleSet[1].rules[12].use[3]!./src/styles/main.styl");
|
|
14904
14908
|
var main_options = {};
|
|
14905
14909
|
main_options.styleTagTransform = styleTagTransform_default();
|
|
14906
14910
|
main_options.setAttributes = setAttributesWithoutAttributes_default();
|
|
@@ -17683,10 +17687,10 @@
|
|
|
17683
17687
|
}
|
|
17684
17688
|
}
|
|
17685
17689
|
setMp4Source(src, bustCache) {
|
|
17686
|
-
this.setVideoSource(
|
|
17690
|
+
this.setVideoSource(VideoType.MP4, src, bustCache);
|
|
17687
17691
|
}
|
|
17688
17692
|
setWebMSource(src, bustCache) {
|
|
17689
|
-
this.setVideoSource(
|
|
17693
|
+
this.setVideoSource(VideoType.WebM, src, bustCache);
|
|
17690
17694
|
}
|
|
17691
17695
|
getVideoType() {
|
|
17692
17696
|
if (!this.replayElement) return;
|
|
@@ -18026,7 +18030,8 @@
|
|
|
18026
18030
|
this.resource = new src_resource(options);
|
|
18027
18031
|
}
|
|
18028
18032
|
buildChildren(playerOnly = false, parentElement) {
|
|
18029
|
-
|
|
18033
|
+
const parentElementInfo = parentElement ? `, parentElement="${util_pretty(parentElement)}"` : "";
|
|
18034
|
+
this.options.logger.debug(`Container: buildChildren (playerOnly = ${playerOnly}${parentElementInfo})`);
|
|
18030
18035
|
if (this.containerElement) this.containerElement.classList.add(this.options.selectors.containerClass);
|
|
18031
18036
|
if (!playerOnly) this.buttons.build();
|
|
18032
18037
|
this.visuals.build(playerOnly, parentElement);
|
|
@@ -18166,13 +18171,13 @@
|
|
|
18166
18171
|
async submitVideomail(formInputs, method) {
|
|
18167
18172
|
const videomailFormData = this.form?.transformFormData(formInputs);
|
|
18168
18173
|
if (!videomailFormData) throw new Error("No videomail form data defined");
|
|
18169
|
-
if (
|
|
18174
|
+
if (method === FormMethod.POST) {
|
|
18170
18175
|
videomailFormData.recordingStats = this.visuals.getRecordingStats();
|
|
18171
18176
|
videomailFormData.width = this.visuals.getRecorderWidth(true);
|
|
18172
18177
|
videomailFormData.height = this.visuals.getRecorderHeight(true);
|
|
18173
18178
|
return await this.resource.post(videomailFormData);
|
|
18174
18179
|
}
|
|
18175
|
-
if (
|
|
18180
|
+
if (method === FormMethod.PUT) return await this.resource.put(videomailFormData);
|
|
18176
18181
|
throw error_createError({
|
|
18177
18182
|
message: `Unsupported form method ${method}, unable to submit videomail.`,
|
|
18178
18183
|
options: this.options
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "videomail-client",
|
|
3
|
-
"version": "11.4.
|
|
3
|
+
"version": "11.4.4",
|
|
4
4
|
"description": "A wicked npm package to record videos directly in the browser, wohooo!",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"webcam",
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
"types": "tsc --noEmit",
|
|
56
56
|
"types:config": "tsc --showConfig"
|
|
57
57
|
},
|
|
58
|
-
"prettier": "./prettier.config.
|
|
58
|
+
"prettier": "./prettier.config.js",
|
|
59
59
|
"dependencies": {
|
|
60
60
|
"animitter": "3.0.0",
|
|
61
61
|
"audio-sample": "5.0.0",
|
|
@@ -75,26 +75,26 @@
|
|
|
75
75
|
"devDependencies": {
|
|
76
76
|
"@chromatic-com/storybook": "4.1.1",
|
|
77
77
|
"@eslint/config-inspector": "1.3.0",
|
|
78
|
-
"@eslint/js": "9.
|
|
78
|
+
"@eslint/js": "9.36.0",
|
|
79
79
|
"@rsbuild/plugin-node-polyfill": "1.4.2",
|
|
80
80
|
"@rsbuild/plugin-stylus": "1.2.0",
|
|
81
81
|
"@rsdoctor/rspack-plugin": "1.2.3",
|
|
82
82
|
"@rslib/core": "0.13.2",
|
|
83
|
-
"@storybook/addon-a11y": "9.1.
|
|
84
|
-
"@storybook/addon-docs": "9.1.
|
|
85
|
-
"@storybook/addon-links": "9.1.
|
|
86
|
-
"@storybook/html": "9.1.
|
|
83
|
+
"@storybook/addon-a11y": "9.1.8",
|
|
84
|
+
"@storybook/addon-docs": "9.1.8",
|
|
85
|
+
"@storybook/addon-links": "9.1.8",
|
|
86
|
+
"@storybook/html": "9.1.8",
|
|
87
87
|
"@tsconfig/node22": "22.0.2",
|
|
88
88
|
"@tsconfig/strictest": "2.0.6",
|
|
89
89
|
"@types/defined": "1.0.2",
|
|
90
90
|
"@types/node": "22.15.30",
|
|
91
91
|
"@types/superagent": "8.1.9",
|
|
92
92
|
"@types/ua-parser-js": "0.7.39",
|
|
93
|
-
"@vitest/eslint-plugin": "1.3.
|
|
93
|
+
"@vitest/eslint-plugin": "1.3.13",
|
|
94
94
|
"audit-ci": "7.1.0",
|
|
95
|
-
"chromatic": "13.
|
|
95
|
+
"chromatic": "13.2.0",
|
|
96
96
|
"cross-env": "10.0.0",
|
|
97
|
-
"eslint": "9.
|
|
97
|
+
"eslint": "9.36.0",
|
|
98
98
|
"eslint-import-resolver-typescript": "4.4.4",
|
|
99
99
|
"eslint-plugin-de-morgan": "1.3.1",
|
|
100
100
|
"eslint-plugin-depend": "1.3.1",
|
|
@@ -104,18 +104,18 @@
|
|
|
104
104
|
"eslint-plugin-regexp": "2.10.0",
|
|
105
105
|
"eslint-plugin-security": "3.0.1",
|
|
106
106
|
"eslint-plugin-simple-import-sort": "12.1.1",
|
|
107
|
-
"eslint-plugin-storybook": "9.1.
|
|
107
|
+
"eslint-plugin-storybook": "9.1.8",
|
|
108
108
|
"globals": "16.4.0",
|
|
109
109
|
"jsdom": "27.0.0",
|
|
110
|
-
"msw": "2.11.
|
|
110
|
+
"msw": "2.11.3",
|
|
111
111
|
"msw-storybook-addon": "2.0.5",
|
|
112
112
|
"prettier": "3.6.2",
|
|
113
113
|
"prettier-plugin-curly": "0.3.2",
|
|
114
114
|
"prettier-plugin-packagejson": "2.5.19",
|
|
115
115
|
"prettier-plugin-sh": "0.18.0",
|
|
116
116
|
"release-it": "19.0.5",
|
|
117
|
-
"storybook": "9.1.
|
|
118
|
-
"storybook-html-rsbuild": "2.
|
|
117
|
+
"storybook": "9.1.8",
|
|
118
|
+
"storybook-html-rsbuild": "2.1.1",
|
|
119
119
|
"type-fest": "5.0.1",
|
|
120
120
|
"typescript": "5.9.2",
|
|
121
121
|
"typescript-eslint": "8.41.0",
|