videomail-client 11.1.1 → 11.3.1
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 +16 -8
- package/dist/esm/client.d.ts +1 -1
- package/dist/esm/index.d.ts +17 -10
- package/dist/esm/index.js +13 -8
- package/dist/esm/resource.d.ts +1 -1
- package/dist/esm/types/Videomail.d.ts +2 -2
- package/dist/esm/types/events/index.d.ts +1 -1
- package/dist/esm/wrappers/container.d.ts +1 -1
- package/dist/esm/wrappers/form.d.ts +1 -1
- package/dist/esm/wrappers/visuals/replay.d.ts +1 -1
- package/dist/umd/index.js +14 -8
- package/package.json +9 -9
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.
|
|
10491
|
+
rE: "11.3.1"
|
|
10491
10492
|
};
|
|
10492
10493
|
var defined = __webpack_require__("./node_modules/defined/index.js");
|
|
10493
10494
|
var defined_default = /*#__PURE__*/ __webpack_require__.n(defined);
|
|
@@ -13639,7 +13640,7 @@ var __webpack_exports__ = {};
|
|
|
13639
13640
|
else obj[key] = value;
|
|
13640
13641
|
return obj;
|
|
13641
13642
|
}
|
|
13642
|
-
const FALLBACK_VIDEO_TYPE =
|
|
13643
|
+
const FALLBACK_VIDEO_TYPE = VideoType.MP4;
|
|
13643
13644
|
class Browser_Browser {
|
|
13644
13645
|
isIOS() {
|
|
13645
13646
|
return "iOS" === this.result.os.name;
|
|
@@ -13677,10 +13678,10 @@ var __webpack_exports__ = {};
|
|
|
13677
13678
|
}
|
|
13678
13679
|
getVideoType(video) {
|
|
13679
13680
|
if (!this.videoType) {
|
|
13680
|
-
if (media_canPlayType(video,
|
|
13681
|
-
else if (media_canPlayType(video,
|
|
13681
|
+
if (media_canPlayType(video, VideoType.MP4)) this.videoType = VideoType.MP4;
|
|
13682
|
+
else if (media_canPlayType(video, VideoType.WebM)) this.videoType = VideoType.WebM;
|
|
13682
13683
|
}
|
|
13683
|
-
if (
|
|
13684
|
+
if (this.videoType !== VideoType.WebM && this.videoType !== VideoType.MP4) this.videoType = FALLBACK_VIDEO_TYPE;
|
|
13684
13685
|
if ("" === this.videoType.trim()) this.videoType = FALLBACK_VIDEO_TYPE;
|
|
13685
13686
|
return this.videoType;
|
|
13686
13687
|
}
|
|
@@ -17881,10 +17882,10 @@ var __webpack_exports__ = {};
|
|
|
17881
17882
|
}
|
|
17882
17883
|
}
|
|
17883
17884
|
setMp4Source(src, bustCache) {
|
|
17884
|
-
this.setVideoSource(
|
|
17885
|
+
this.setVideoSource(VideoType.MP4, src, bustCache);
|
|
17885
17886
|
}
|
|
17886
17887
|
setWebMSource(src, bustCache) {
|
|
17887
|
-
this.setVideoSource(
|
|
17888
|
+
this.setVideoSource(VideoType.WebM, src, bustCache);
|
|
17888
17889
|
}
|
|
17889
17890
|
getVideoType() {
|
|
17890
17891
|
if (!this.replayElement) return;
|
|
@@ -18814,9 +18815,16 @@ var __webpack_exports__ = {};
|
|
|
18814
18815
|
client_define_property(VideomailClient, "ENC_TYPE_APP_JSON", constants["public"].ENC_TYPE_APP_JSON);
|
|
18815
18816
|
client_define_property(VideomailClient, "ENC_TYPE_FORM", constants["public"].ENC_TYPE_FORM);
|
|
18816
18817
|
const src_client = VideomailClient;
|
|
18818
|
+
var VideoType_VideoType = /*#__PURE__*/ function(VideoType1) {
|
|
18819
|
+
VideoType1["WebM"] = "webm";
|
|
18820
|
+
VideoType1["MP4"] = "mp4";
|
|
18821
|
+
return VideoType1;
|
|
18822
|
+
}({});
|
|
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/client.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { PartialVideomailClientOptions } from "./types/options";
|
|
2
|
-
import
|
|
2
|
+
import Videomail from "./types/Videomail";
|
|
3
3
|
import Despot from "./util/Despot";
|
|
4
4
|
export interface StartOverParams {
|
|
5
5
|
keepHidden?: boolean | undefined;
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -1,12 +1,19 @@
|
|
|
1
1
|
import VideomailClient from "./client";
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
2
|
+
import { Command, CommandArgs } from "./types/command";
|
|
3
|
+
import DeliveryRecord from "./types/DeliveryRecord";
|
|
4
|
+
import { EmailAddress, EmailAddresses } from "./types/EmailAddress";
|
|
5
|
+
import { FullVideomailErrorData, VideomailErrorData } from "./types/error";
|
|
6
|
+
import VideomailEvents from "./types/events";
|
|
7
|
+
import { VideomailClientOptions } from "./types/options";
|
|
8
|
+
import RecordingStats from "./types/RecordingStats";
|
|
9
|
+
import Videomail, { PartialVideomail } from "./types/Videomail";
|
|
10
10
|
import { VideoType } from "./types/VideoType";
|
|
11
|
-
export type {
|
|
12
|
-
export {
|
|
11
|
+
export type { Videomail };
|
|
12
|
+
export type { VideomailEvents };
|
|
13
|
+
export type { RecordingStats };
|
|
14
|
+
export type { VideomailClientOptions };
|
|
15
|
+
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
|
@@ -3454,15 +3454,20 @@ const constants = {
|
|
|
3454
3454
|
}
|
|
3455
3455
|
};
|
|
3456
3456
|
var package_namespaceObject = {
|
|
3457
|
-
rE: "11.
|
|
3457
|
+
rE: "11.3.1"
|
|
3458
3458
|
};
|
|
3459
|
+
var VideoType_VideoType = /*#__PURE__*/ function(VideoType1) {
|
|
3460
|
+
VideoType1["WebM"] = "webm";
|
|
3461
|
+
VideoType1["MP4"] = "mp4";
|
|
3462
|
+
return VideoType1;
|
|
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.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.MP4)) this.videoType = VideoType.MP4;
|
|
3518
|
+
else if (media_canPlayType(video, VideoType.WebM)) this.videoType = VideoType.WebM;
|
|
3514
3519
|
}
|
|
3515
|
-
if (
|
|
3520
|
+
if (this.videoType !== VideoType.WebM && this.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.MP4, src, bustCache);
|
|
7307
7312
|
}
|
|
7308
7313
|
setWebMSource(src, bustCache) {
|
|
7309
|
-
this.setVideoSource(
|
|
7314
|
+
this.setVideoSource(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/esm/resource.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import Response from "superagent/lib/node/response";
|
|
2
2
|
import { VideomailClientOptions } from "./types/options";
|
|
3
|
-
import
|
|
3
|
+
import Videomail, { PartialVideomail } from "./types/Videomail";
|
|
4
4
|
import VideomailError from "./util/error/VideomailError";
|
|
5
5
|
import { FormInputs } from "./wrappers/form";
|
|
6
6
|
declare class Resource {
|
|
@@ -53,5 +53,5 @@ interface Videomail {
|
|
|
53
53
|
rejectedCc?: DeliveryRecord;
|
|
54
54
|
rejectedBcc?: DeliveryRecord;
|
|
55
55
|
}
|
|
56
|
-
type PartialVideomail = PartialDeep<Videomail>;
|
|
57
|
-
export
|
|
56
|
+
export type PartialVideomail = PartialDeep<Videomail>;
|
|
57
|
+
export default Videomail;
|
|
@@ -2,7 +2,7 @@ import Response from "superagent/lib/node/response";
|
|
|
2
2
|
import VideomailError from "../../util/error/VideomailError";
|
|
3
3
|
import { FormReadyParams } from "../../wrappers/container";
|
|
4
4
|
import RecordingStats from "../RecordingStats";
|
|
5
|
-
import
|
|
5
|
+
import Videomail from "../Videomail";
|
|
6
6
|
export interface UserMediaReadyParams {
|
|
7
7
|
switchingFacingMode?: ConstrainDOMString | undefined;
|
|
8
8
|
recordWhenReady?: boolean | undefined;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "./../styles/main.styl";
|
|
2
2
|
import { ShowParams, StartOverParams } from "../client";
|
|
3
3
|
import { VideomailClientOptions } from "../types/options";
|
|
4
|
-
import
|
|
4
|
+
import Videomail from "../types/Videomail";
|
|
5
5
|
import Despot from "../util/Despot";
|
|
6
6
|
import { FormInputs, FormMethod } from "./form";
|
|
7
7
|
interface BuildOptions {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { VideomailClientOptions } from "../types/options";
|
|
2
|
-
import
|
|
2
|
+
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>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { VideomailClientOptions } from "../../types/options";
|
|
2
|
-
import
|
|
2
|
+
import Videomail from "../../types/Videomail";
|
|
3
3
|
import { VideoType } from "../../types/VideoType";
|
|
4
4
|
import Despot from "../../util/Despot";
|
|
5
5
|
import { UnloadParams } from "../container";
|
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.
|
|
10497
|
+
rE: "11.3.1"
|
|
10497
10498
|
};
|
|
10498
10499
|
var defined = __webpack_require__("./node_modules/defined/index.js");
|
|
10499
10500
|
var defined_default = /*#__PURE__*/ __webpack_require__.n(defined);
|
|
@@ -13635,7 +13636,7 @@
|
|
|
13635
13636
|
return canPlayType;
|
|
13636
13637
|
}
|
|
13637
13638
|
const media_canPlayType = canPlayType_canPlayType;
|
|
13638
|
-
const FALLBACK_VIDEO_TYPE =
|
|
13639
|
+
const FALLBACK_VIDEO_TYPE = VideoType.MP4;
|
|
13639
13640
|
class Browser {
|
|
13640
13641
|
options;
|
|
13641
13642
|
result;
|
|
@@ -13682,10 +13683,10 @@
|
|
|
13682
13683
|
}
|
|
13683
13684
|
getVideoType(video) {
|
|
13684
13685
|
if (!this.videoType) {
|
|
13685
|
-
if (media_canPlayType(video,
|
|
13686
|
-
else if (media_canPlayType(video,
|
|
13686
|
+
if (media_canPlayType(video, VideoType.MP4)) this.videoType = VideoType.MP4;
|
|
13687
|
+
else if (media_canPlayType(video, VideoType.WebM)) this.videoType = VideoType.WebM;
|
|
13687
13688
|
}
|
|
13688
|
-
if (
|
|
13689
|
+
if (this.videoType !== VideoType.WebM && this.videoType !== VideoType.MP4) this.videoType = FALLBACK_VIDEO_TYPE;
|
|
13689
13690
|
if ("" === this.videoType.trim()) this.videoType = FALLBACK_VIDEO_TYPE;
|
|
13690
13691
|
return this.videoType;
|
|
13691
13692
|
}
|
|
@@ -17669,10 +17670,10 @@
|
|
|
17669
17670
|
}
|
|
17670
17671
|
}
|
|
17671
17672
|
setMp4Source(src, bustCache) {
|
|
17672
|
-
this.setVideoSource(
|
|
17673
|
+
this.setVideoSource(VideoType.MP4, src, bustCache);
|
|
17673
17674
|
}
|
|
17674
17675
|
setWebMSource(src, bustCache) {
|
|
17675
|
-
this.setVideoSource(
|
|
17676
|
+
this.setVideoSource(VideoType.WebM, src, bustCache);
|
|
17676
17677
|
}
|
|
17677
17678
|
getVideoType() {
|
|
17678
17679
|
if (!this.replayElement) return;
|
|
@@ -18560,6 +18561,11 @@
|
|
|
18560
18561
|
}
|
|
18561
18562
|
}
|
|
18562
18563
|
const src_client = VideomailClient;
|
|
18564
|
+
var VideoType_VideoType = /*#__PURE__*/ function(VideoType1) {
|
|
18565
|
+
VideoType1["WebM"] = "webm";
|
|
18566
|
+
VideoType1["MP4"] = "mp4";
|
|
18567
|
+
return VideoType1;
|
|
18568
|
+
}({});
|
|
18563
18569
|
})();
|
|
18564
18570
|
return __webpack_exports__;
|
|
18565
18571
|
})());
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "videomail-client",
|
|
3
|
-
"version": "11.
|
|
3
|
+
"version": "11.3.1",
|
|
4
4
|
"description": "A wicked npm package to record videos directly in the browser, wohooo!",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"webcam",
|
|
@@ -80,10 +80,10 @@
|
|
|
80
80
|
"@rsbuild/plugin-stylus": "1.2.0",
|
|
81
81
|
"@rsdoctor/rspack-plugin": "1.2.3",
|
|
82
82
|
"@rslib/core": "0.13.3",
|
|
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.3",
|
|
84
|
+
"@storybook/addon-docs": "9.1.3",
|
|
85
|
+
"@storybook/addon-links": "9.1.3",
|
|
86
|
+
"@storybook/html": "9.1.3",
|
|
87
87
|
"@tsconfig/node22": "22.0.2",
|
|
88
88
|
"@tsconfig/strictest": "2.0.6",
|
|
89
89
|
"@types/defined": "1.0.2",
|
|
@@ -104,7 +104,7 @@
|
|
|
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.3",
|
|
108
108
|
"globals": "16.4.0",
|
|
109
109
|
"jsdom": "27.0.0",
|
|
110
110
|
"msw": "2.11.1",
|
|
@@ -114,7 +114,7 @@
|
|
|
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.
|
|
117
|
+
"storybook": "9.1.3",
|
|
118
118
|
"storybook-html-rsbuild": "2.0.4",
|
|
119
119
|
"type-fest": "5.0.1",
|
|
120
120
|
"typescript": "5.9.2",
|
|
@@ -122,8 +122,8 @@
|
|
|
122
122
|
"vitest": "3.2.4"
|
|
123
123
|
},
|
|
124
124
|
"engines": {
|
|
125
|
-
"node": "^22.
|
|
126
|
-
"npm": "^10.9.
|
|
125
|
+
"node": "^22.20.0",
|
|
126
|
+
"npm": "^10.9.3"
|
|
127
127
|
},
|
|
128
128
|
"msw": {
|
|
129
129
|
"workerDirectory": [
|