videomail-client 11.1.1 → 11.1.2
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 +20 -12
- package/dist/esm/index.d.ts +2 -2
- package/dist/esm/index.js +13 -8
- package/dist/umd/index.js +21 -15
- package/package.json +1 -1
package/dist/cjs/index.cjs
CHANGED
|
@@ -10324,7 +10324,8 @@ var __webpack_exports__ = {};
|
|
|
10324
10324
|
"use strict";
|
|
10325
10325
|
__webpack_require__.r(__webpack_exports__);
|
|
10326
10326
|
__webpack_require__.d(__webpack_exports__, {
|
|
10327
|
-
VideomailClient: ()=>src_client
|
|
10327
|
+
VideomailClient: ()=>src_client,
|
|
10328
|
+
VideoType: ()=>VideoType_VideoType
|
|
10328
10329
|
});
|
|
10329
10330
|
const constants = {
|
|
10330
10331
|
SITE_NAME_LABEL: "x-videomail-site-name",
|
|
@@ -10487,7 +10488,7 @@ var __webpack_exports__ = {};
|
|
|
10487
10488
|
var client = __webpack_require__("./node_modules/superagent/lib/client.js");
|
|
10488
10489
|
var client_default = /*#__PURE__*/ __webpack_require__.n(client);
|
|
10489
10490
|
var package_namespaceObject = {
|
|
10490
|
-
rE: "11.1.
|
|
10491
|
+
rE: "11.1.2"
|
|
10491
10492
|
};
|
|
10492
10493
|
var defined = __webpack_require__("./node_modules/defined/index.js");
|
|
10493
10494
|
var defined_default = /*#__PURE__*/ __webpack_require__.n(defined);
|
|
@@ -13623,6 +13624,11 @@ var __webpack_exports__ = {};
|
|
|
13623
13624
|
NAME,
|
|
13624
13625
|
VERSION
|
|
13625
13626
|
]);
|
|
13627
|
+
var VideoType_VideoType = /*#__PURE__*/ function(VideoType) {
|
|
13628
|
+
VideoType["WebM"] = "webm";
|
|
13629
|
+
VideoType["MP4"] = "mp4";
|
|
13630
|
+
return VideoType;
|
|
13631
|
+
}({});
|
|
13626
13632
|
function canPlayType_canPlayType(video, type) {
|
|
13627
13633
|
const canPlayType = video.canPlayType(`video/${type}`);
|
|
13628
13634
|
if ("" === canPlayType) return false;
|
|
@@ -13639,7 +13645,7 @@ var __webpack_exports__ = {};
|
|
|
13639
13645
|
else obj[key] = value;
|
|
13640
13646
|
return obj;
|
|
13641
13647
|
}
|
|
13642
|
-
const FALLBACK_VIDEO_TYPE =
|
|
13648
|
+
const FALLBACK_VIDEO_TYPE = VideoType_VideoType.MP4;
|
|
13643
13649
|
class Browser_Browser {
|
|
13644
13650
|
isIOS() {
|
|
13645
13651
|
return "iOS" === this.result.os.name;
|
|
@@ -13677,10 +13683,10 @@ var __webpack_exports__ = {};
|
|
|
13677
13683
|
}
|
|
13678
13684
|
getVideoType(video) {
|
|
13679
13685
|
if (!this.videoType) {
|
|
13680
|
-
if (media_canPlayType(video,
|
|
13681
|
-
else if (media_canPlayType(video,
|
|
13686
|
+
if (media_canPlayType(video, VideoType_VideoType.MP4)) this.videoType = VideoType_VideoType.MP4;
|
|
13687
|
+
else if (media_canPlayType(video, VideoType_VideoType.WebM)) this.videoType = VideoType_VideoType.WebM;
|
|
13682
13688
|
}
|
|
13683
|
-
if (
|
|
13689
|
+
if (this.videoType !== VideoType_VideoType.WebM && this.videoType !== VideoType_VideoType.MP4) this.videoType = FALLBACK_VIDEO_TYPE;
|
|
13684
13690
|
if ("" === this.videoType.trim()) this.videoType = FALLBACK_VIDEO_TYPE;
|
|
13685
13691
|
return this.videoType;
|
|
13686
13692
|
}
|
|
@@ -14978,7 +14984,7 @@ var __webpack_exports__ = {};
|
|
|
14978
14984
|
return outerWidth;
|
|
14979
14985
|
}
|
|
14980
14986
|
const getOuterWidth = getOuterWidth_getOuterWidth;
|
|
14981
|
-
function
|
|
14987
|
+
function limitWidth_limitWidth(element, options, width) {
|
|
14982
14988
|
let limitedWidth;
|
|
14983
14989
|
const outerWidth = getOuterWidth(element);
|
|
14984
14990
|
limitedWidth = width && "number" == typeof width ? outerWidth > 0 && outerWidth < width ? outerWidth : width : outerWidth;
|
|
@@ -14988,7 +14994,7 @@ var __webpack_exports__ = {};
|
|
|
14988
14994
|
});
|
|
14989
14995
|
return limitedWidth;
|
|
14990
14996
|
}
|
|
14991
|
-
const
|
|
14997
|
+
const limitWidth = limitWidth_limitWidth;
|
|
14992
14998
|
var contains = __webpack_require__("./node_modules/contains/index.js");
|
|
14993
14999
|
var contains_default = /*#__PURE__*/ __webpack_require__.n(contains);
|
|
14994
15000
|
function disableElement(element) {
|
|
@@ -16260,7 +16266,7 @@ var __webpack_exports__ = {};
|
|
|
16260
16266
|
message: `Unable to calculate height for target ${target} when width is less than 1 (= ${width}) and responsive mode is set to ${responsive}`,
|
|
16261
16267
|
options
|
|
16262
16268
|
});
|
|
16263
|
-
if (responsive && element) width =
|
|
16269
|
+
if (responsive && element) width = limitWidth(element, options, width);
|
|
16264
16270
|
const chosenRatio = null != ratio ? ratio : getRatio(options, void 0, videoWidth);
|
|
16265
16271
|
const height = Math.round(width * chosenRatio);
|
|
16266
16272
|
if (Number.isInteger(height) && height < 1) throw error_createError({
|
|
@@ -17881,10 +17887,10 @@ var __webpack_exports__ = {};
|
|
|
17881
17887
|
}
|
|
17882
17888
|
}
|
|
17883
17889
|
setMp4Source(src, bustCache) {
|
|
17884
|
-
this.setVideoSource(
|
|
17890
|
+
this.setVideoSource(VideoType_VideoType.MP4, src, bustCache);
|
|
17885
17891
|
}
|
|
17886
17892
|
setWebMSource(src, bustCache) {
|
|
17887
|
-
this.setVideoSource(
|
|
17893
|
+
this.setVideoSource(VideoType_VideoType.WebM, src, bustCache);
|
|
17888
17894
|
}
|
|
17889
17895
|
getVideoType() {
|
|
17890
17896
|
if (!this.replayElement) return;
|
|
@@ -18393,7 +18399,7 @@ var __webpack_exports__ = {};
|
|
|
18393
18399
|
}
|
|
18394
18400
|
limitWidth(width) {
|
|
18395
18401
|
if (!this.containerElement) return;
|
|
18396
|
-
return
|
|
18402
|
+
return limitWidth(this.containerElement, this.options, width);
|
|
18397
18403
|
}
|
|
18398
18404
|
limitHeight(height) {
|
|
18399
18405
|
return dimensions_limitHeight(height, this.options, "containers limitHeight fn");
|
|
@@ -18815,8 +18821,10 @@ var __webpack_exports__ = {};
|
|
|
18815
18821
|
client_define_property(VideomailClient, "ENC_TYPE_FORM", constants["public"].ENC_TYPE_FORM);
|
|
18816
18822
|
const src_client = VideomailClient;
|
|
18817
18823
|
})();
|
|
18824
|
+
exports.VideoType = __webpack_exports__.VideoType;
|
|
18818
18825
|
exports.VideomailClient = __webpack_exports__.VideomailClient;
|
|
18819
18826
|
for(var __webpack_i__ in __webpack_exports__)if (-1 === [
|
|
18827
|
+
"VideoType",
|
|
18820
18828
|
"VideomailClient"
|
|
18821
18829
|
].indexOf(__webpack_i__)) exports[__webpack_i__] = __webpack_exports__[__webpack_i__];
|
|
18822
18830
|
Object.defineProperty(exports, '__esModule', {
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -8,5 +8,5 @@ import type { VideomailClientOptions } from "./types/options";
|
|
|
8
8
|
import type RecordingStats from "./types/RecordingStats";
|
|
9
9
|
import type { PartialVideomail, Videomail } from "./types/Videomail";
|
|
10
10
|
import { VideoType } from "./types/VideoType";
|
|
11
|
-
export type { Command, CommandArgs, DeliveryRecord, EmailAddress, EmailAddresses, FullVideomailErrorData, PartialVideomail, RecordingStats, Videomail, VideomailClientOptions, VideomailErrorData, VideomailEvents,
|
|
12
|
-
export { VideomailClient };
|
|
11
|
+
export type { Command, CommandArgs, DeliveryRecord, EmailAddress, EmailAddresses, FullVideomailErrorData, PartialVideomail, RecordingStats, Videomail, VideomailClientOptions, VideomailErrorData, VideomailEvents, };
|
|
12
|
+
export { VideomailClient, VideoType };
|
package/dist/esm/index.js
CHANGED
|
@@ -3454,15 +3454,20 @@ const constants = {
|
|
|
3454
3454
|
}
|
|
3455
3455
|
};
|
|
3456
3456
|
var package_namespaceObject = {
|
|
3457
|
-
rE: "11.1.
|
|
3457
|
+
rE: "11.1.2"
|
|
3458
3458
|
};
|
|
3459
|
+
var VideoType_VideoType = /*#__PURE__*/ function(VideoType) {
|
|
3460
|
+
VideoType["WebM"] = "webm";
|
|
3461
|
+
VideoType["MP4"] = "mp4";
|
|
3462
|
+
return VideoType;
|
|
3463
|
+
}({});
|
|
3459
3464
|
function canPlayType_canPlayType(video, type) {
|
|
3460
3465
|
const canPlayType = video.canPlayType(`video/${type}`);
|
|
3461
3466
|
if ("" === canPlayType) return false;
|
|
3462
3467
|
return canPlayType;
|
|
3463
3468
|
}
|
|
3464
3469
|
const media_canPlayType = canPlayType_canPlayType;
|
|
3465
|
-
const FALLBACK_VIDEO_TYPE =
|
|
3470
|
+
const FALLBACK_VIDEO_TYPE = VideoType_VideoType.MP4;
|
|
3466
3471
|
class Browser {
|
|
3467
3472
|
options;
|
|
3468
3473
|
result;
|
|
@@ -3509,10 +3514,10 @@ class Browser {
|
|
|
3509
3514
|
}
|
|
3510
3515
|
getVideoType(video) {
|
|
3511
3516
|
if (!this.videoType) {
|
|
3512
|
-
if (media_canPlayType(video,
|
|
3513
|
-
else if (media_canPlayType(video,
|
|
3517
|
+
if (media_canPlayType(video, VideoType_VideoType.MP4)) this.videoType = VideoType_VideoType.MP4;
|
|
3518
|
+
else if (media_canPlayType(video, VideoType_VideoType.WebM)) this.videoType = VideoType_VideoType.WebM;
|
|
3514
3519
|
}
|
|
3515
|
-
if (
|
|
3520
|
+
if (this.videoType !== VideoType_VideoType.WebM && this.videoType !== VideoType_VideoType.MP4) this.videoType = FALLBACK_VIDEO_TYPE;
|
|
3516
3521
|
if ("" === this.videoType.trim()) this.videoType = FALLBACK_VIDEO_TYPE;
|
|
3517
3522
|
return this.videoType;
|
|
3518
3523
|
}
|
|
@@ -7303,10 +7308,10 @@ class Replay extends util_Despot {
|
|
|
7303
7308
|
}
|
|
7304
7309
|
}
|
|
7305
7310
|
setMp4Source(src, bustCache) {
|
|
7306
|
-
this.setVideoSource(
|
|
7311
|
+
this.setVideoSource(VideoType_VideoType.MP4, src, bustCache);
|
|
7307
7312
|
}
|
|
7308
7313
|
setWebMSource(src, bustCache) {
|
|
7309
|
-
this.setVideoSource(
|
|
7314
|
+
this.setVideoSource(VideoType_VideoType.WebM, src, bustCache);
|
|
7310
7315
|
}
|
|
7311
7316
|
getVideoType() {
|
|
7312
7317
|
if (!this.replayElement) return;
|
|
@@ -8194,4 +8199,4 @@ class VideomailClient extends util_Despot {
|
|
|
8194
8199
|
}
|
|
8195
8200
|
}
|
|
8196
8201
|
const client = VideomailClient;
|
|
8197
|
-
export { client as VideomailClient };
|
|
8202
|
+
export { VideoType_VideoType as VideoType, client as VideomailClient };
|
package/dist/umd/index.js
CHANGED
|
@@ -10330,7 +10330,8 @@
|
|
|
10330
10330
|
"use strict";
|
|
10331
10331
|
__webpack_require__.r(__webpack_exports__);
|
|
10332
10332
|
__webpack_require__.d(__webpack_exports__, {
|
|
10333
|
-
VideomailClient: ()=>src_client
|
|
10333
|
+
VideomailClient: ()=>src_client,
|
|
10334
|
+
VideoType: ()=>VideoType_VideoType
|
|
10334
10335
|
});
|
|
10335
10336
|
const constants = {
|
|
10336
10337
|
SITE_NAME_LABEL: "x-videomail-site-name",
|
|
@@ -10493,7 +10494,7 @@
|
|
|
10493
10494
|
var client = __webpack_require__("./node_modules/superagent/lib/client.js");
|
|
10494
10495
|
var client_default = /*#__PURE__*/ __webpack_require__.n(client);
|
|
10495
10496
|
var package_namespaceObject = {
|
|
10496
|
-
rE: "11.1.
|
|
10497
|
+
rE: "11.1.2"
|
|
10497
10498
|
};
|
|
10498
10499
|
var defined = __webpack_require__("./node_modules/defined/index.js");
|
|
10499
10500
|
var defined_default = /*#__PURE__*/ __webpack_require__.n(defined);
|
|
@@ -13629,13 +13630,18 @@
|
|
|
13629
13630
|
NAME,
|
|
13630
13631
|
VERSION
|
|
13631
13632
|
]);
|
|
13633
|
+
var VideoType_VideoType = /*#__PURE__*/ function(VideoType) {
|
|
13634
|
+
VideoType["WebM"] = "webm";
|
|
13635
|
+
VideoType["MP4"] = "mp4";
|
|
13636
|
+
return VideoType;
|
|
13637
|
+
}({});
|
|
13632
13638
|
function canPlayType_canPlayType(video, type) {
|
|
13633
13639
|
const canPlayType = video.canPlayType(`video/${type}`);
|
|
13634
13640
|
if ("" === canPlayType) return false;
|
|
13635
13641
|
return canPlayType;
|
|
13636
13642
|
}
|
|
13637
13643
|
const media_canPlayType = canPlayType_canPlayType;
|
|
13638
|
-
const FALLBACK_VIDEO_TYPE =
|
|
13644
|
+
const FALLBACK_VIDEO_TYPE = VideoType_VideoType.MP4;
|
|
13639
13645
|
class Browser {
|
|
13640
13646
|
options;
|
|
13641
13647
|
result;
|
|
@@ -13682,10 +13688,10 @@
|
|
|
13682
13688
|
}
|
|
13683
13689
|
getVideoType(video) {
|
|
13684
13690
|
if (!this.videoType) {
|
|
13685
|
-
if (media_canPlayType(video,
|
|
13686
|
-
else if (media_canPlayType(video,
|
|
13691
|
+
if (media_canPlayType(video, VideoType_VideoType.MP4)) this.videoType = VideoType_VideoType.MP4;
|
|
13692
|
+
else if (media_canPlayType(video, VideoType_VideoType.WebM)) this.videoType = VideoType_VideoType.WebM;
|
|
13687
13693
|
}
|
|
13688
|
-
if (
|
|
13694
|
+
if (this.videoType !== VideoType_VideoType.WebM && this.videoType !== VideoType_VideoType.MP4) this.videoType = FALLBACK_VIDEO_TYPE;
|
|
13689
13695
|
if ("" === this.videoType.trim()) this.videoType = FALLBACK_VIDEO_TYPE;
|
|
13690
13696
|
return this.videoType;
|
|
13691
13697
|
}
|
|
@@ -14671,7 +14677,7 @@
|
|
|
14671
14677
|
}
|
|
14672
14678
|
};
|
|
14673
14679
|
const src_options = options_options;
|
|
14674
|
-
class
|
|
14680
|
+
class CollectLogger {
|
|
14675
14681
|
browser;
|
|
14676
14682
|
logger;
|
|
14677
14683
|
stack = [];
|
|
@@ -14710,7 +14716,7 @@
|
|
|
14710
14716
|
return this.stack;
|
|
14711
14717
|
}
|
|
14712
14718
|
}
|
|
14713
|
-
const
|
|
14719
|
+
const util_CollectLogger = CollectLogger;
|
|
14714
14720
|
var process = __webpack_require__("./node_modules/process/browser.js");
|
|
14715
14721
|
function isTest() {
|
|
14716
14722
|
return "test" === process.env.ENVIRON;
|
|
@@ -14722,7 +14728,7 @@
|
|
|
14722
14728
|
return source;
|
|
14723
14729
|
}
|
|
14724
14730
|
});
|
|
14725
|
-
const collectLogger = new
|
|
14731
|
+
const collectLogger = new util_CollectLogger(newOptions);
|
|
14726
14732
|
newOptions.logger = collectLogger;
|
|
14727
14733
|
if (util_isTest()) newOptions.verbose = false;
|
|
14728
14734
|
return newOptions;
|
|
@@ -14917,7 +14923,7 @@
|
|
|
14917
14923
|
return outerWidth;
|
|
14918
14924
|
}
|
|
14919
14925
|
const getOuterWidth = getOuterWidth_getOuterWidth;
|
|
14920
|
-
function
|
|
14926
|
+
function limitWidth_limitWidth(element, options, width) {
|
|
14921
14927
|
let limitedWidth;
|
|
14922
14928
|
const outerWidth = getOuterWidth(element);
|
|
14923
14929
|
limitedWidth = width && "number" == typeof width ? outerWidth > 0 && outerWidth < width ? outerWidth : width : outerWidth;
|
|
@@ -14927,7 +14933,7 @@
|
|
|
14927
14933
|
});
|
|
14928
14934
|
return limitedWidth;
|
|
14929
14935
|
}
|
|
14930
|
-
const
|
|
14936
|
+
const limitWidth = limitWidth_limitWidth;
|
|
14931
14937
|
var contains = __webpack_require__("./node_modules/contains/index.js");
|
|
14932
14938
|
var contains_default = /*#__PURE__*/ __webpack_require__.n(contains);
|
|
14933
14939
|
function disableElement(element) {
|
|
@@ -16091,7 +16097,7 @@
|
|
|
16091
16097
|
message: `Unable to calculate height for target ${target} when width is less than 1 (= ${width}) and responsive mode is set to ${responsive}`,
|
|
16092
16098
|
options
|
|
16093
16099
|
});
|
|
16094
|
-
if (responsive && element) width =
|
|
16100
|
+
if (responsive && element) width = limitWidth(element, options, width);
|
|
16095
16101
|
const chosenRatio = ratio ?? getRatio(options, void 0, videoWidth);
|
|
16096
16102
|
const height = Math.round(width * chosenRatio);
|
|
16097
16103
|
if (Number.isInteger(height) && height < 1) throw error_createError({
|
|
@@ -17669,10 +17675,10 @@
|
|
|
17669
17675
|
}
|
|
17670
17676
|
}
|
|
17671
17677
|
setMp4Source(src, bustCache) {
|
|
17672
|
-
this.setVideoSource(
|
|
17678
|
+
this.setVideoSource(VideoType_VideoType.MP4, src, bustCache);
|
|
17673
17679
|
}
|
|
17674
17680
|
setWebMSource(src, bustCache) {
|
|
17675
|
-
this.setVideoSource(
|
|
17681
|
+
this.setVideoSource(VideoType_VideoType.WebM, src, bustCache);
|
|
17676
17682
|
}
|
|
17677
17683
|
getVideoType() {
|
|
17678
17684
|
if (!this.replayElement) return;
|
|
@@ -18166,7 +18172,7 @@
|
|
|
18166
18172
|
}
|
|
18167
18173
|
limitWidth(width) {
|
|
18168
18174
|
if (!this.containerElement) return;
|
|
18169
|
-
return
|
|
18175
|
+
return limitWidth(this.containerElement, this.options, width);
|
|
18170
18176
|
}
|
|
18171
18177
|
limitHeight(height) {
|
|
18172
18178
|
return dimensions_limitHeight(height, this.options, "containers limitHeight fn");
|