videomail-client 11.1.2 → 11.3.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 +12 -13
- package/dist/esm/client.d.ts +1 -1
- package/dist/esm/index.d.ts +16 -9
- package/dist/esm/index.js +12 -13
- package/dist/esm/resource.d.ts +1 -1
- package/dist/esm/types/VideoType.d.ts +5 -4
- package/dist/esm/types/Videomail.d.ts +2 -2
- package/dist/esm/types/events/index.d.ts +1 -1
- 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 +1 -1
- package/dist/esm/wrappers/form.d.ts +1 -1
- package/dist/esm/wrappers/visuals/replay.d.ts +2 -3
- package/dist/umd/index.js +12 -13
- package/package.json +9 -9
package/dist/cjs/index.cjs
CHANGED
|
@@ -10325,7 +10325,7 @@ var __webpack_exports__ = {};
|
|
|
10325
10325
|
__webpack_require__.r(__webpack_exports__);
|
|
10326
10326
|
__webpack_require__.d(__webpack_exports__, {
|
|
10327
10327
|
VideomailClient: ()=>src_client,
|
|
10328
|
-
VideoType: ()=>
|
|
10328
|
+
VideoType: ()=>VideoType
|
|
10329
10329
|
});
|
|
10330
10330
|
const constants = {
|
|
10331
10331
|
SITE_NAME_LABEL: "x-videomail-site-name",
|
|
@@ -10488,7 +10488,7 @@ var __webpack_exports__ = {};
|
|
|
10488
10488
|
var client = __webpack_require__("./node_modules/superagent/lib/client.js");
|
|
10489
10489
|
var client_default = /*#__PURE__*/ __webpack_require__.n(client);
|
|
10490
10490
|
var package_namespaceObject = {
|
|
10491
|
-
rE: "11.
|
|
10491
|
+
rE: "11.3.2"
|
|
10492
10492
|
};
|
|
10493
10493
|
var defined = __webpack_require__("./node_modules/defined/index.js");
|
|
10494
10494
|
var defined_default = /*#__PURE__*/ __webpack_require__.n(defined);
|
|
@@ -13624,11 +13624,10 @@ var __webpack_exports__ = {};
|
|
|
13624
13624
|
NAME,
|
|
13625
13625
|
VERSION
|
|
13626
13626
|
]);
|
|
13627
|
-
|
|
13628
|
-
|
|
13629
|
-
|
|
13630
|
-
|
|
13631
|
-
}({});
|
|
13627
|
+
const VideoType = {
|
|
13628
|
+
WebM: "webm",
|
|
13629
|
+
MP4: "mp4"
|
|
13630
|
+
};
|
|
13632
13631
|
function canPlayType_canPlayType(video, type) {
|
|
13633
13632
|
const canPlayType = video.canPlayType(`video/${type}`);
|
|
13634
13633
|
if ("" === canPlayType) return false;
|
|
@@ -13645,7 +13644,7 @@ var __webpack_exports__ = {};
|
|
|
13645
13644
|
else obj[key] = value;
|
|
13646
13645
|
return obj;
|
|
13647
13646
|
}
|
|
13648
|
-
const FALLBACK_VIDEO_TYPE =
|
|
13647
|
+
const FALLBACK_VIDEO_TYPE = VideoType.MP4;
|
|
13649
13648
|
class Browser_Browser {
|
|
13650
13649
|
isIOS() {
|
|
13651
13650
|
return "iOS" === this.result.os.name;
|
|
@@ -13683,10 +13682,10 @@ var __webpack_exports__ = {};
|
|
|
13683
13682
|
}
|
|
13684
13683
|
getVideoType(video) {
|
|
13685
13684
|
if (!this.videoType) {
|
|
13686
|
-
if (media_canPlayType(video,
|
|
13687
|
-
else if (media_canPlayType(video,
|
|
13685
|
+
if (media_canPlayType(video, VideoType.MP4)) this.videoType = VideoType.MP4;
|
|
13686
|
+
else if (media_canPlayType(video, VideoType.WebM)) this.videoType = VideoType.WebM;
|
|
13688
13687
|
}
|
|
13689
|
-
if (this.videoType !==
|
|
13688
|
+
if (this.videoType !== VideoType.WebM && this.videoType !== VideoType.MP4) this.videoType = FALLBACK_VIDEO_TYPE;
|
|
13690
13689
|
if ("" === this.videoType.trim()) this.videoType = FALLBACK_VIDEO_TYPE;
|
|
13691
13690
|
return this.videoType;
|
|
13692
13691
|
}
|
|
@@ -17887,10 +17886,10 @@ var __webpack_exports__ = {};
|
|
|
17887
17886
|
}
|
|
17888
17887
|
}
|
|
17889
17888
|
setMp4Source(src, bustCache) {
|
|
17890
|
-
this.setVideoSource(
|
|
17889
|
+
this.setVideoSource(VideoType.MP4, src, bustCache);
|
|
17891
17890
|
}
|
|
17892
17891
|
setWebMSource(src, bustCache) {
|
|
17893
|
-
this.setVideoSource(
|
|
17892
|
+
this.setVideoSource(VideoType.WebM, src, bustCache);
|
|
17894
17893
|
}
|
|
17895
17894
|
getVideoType() {
|
|
17896
17895
|
if (!this.replayElement) return;
|
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 {
|
|
11
|
+
export type { Videomail };
|
|
12
|
+
export type { VideomailEvents };
|
|
13
|
+
export type { RecordingStats };
|
|
14
|
+
export type { VideomailClientOptions };
|
|
12
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,20 +3454,19 @@ const constants = {
|
|
|
3454
3454
|
}
|
|
3455
3455
|
};
|
|
3456
3456
|
var package_namespaceObject = {
|
|
3457
|
-
rE: "11.
|
|
3457
|
+
rE: "11.3.2"
|
|
3458
|
+
};
|
|
3459
|
+
const VideoType = {
|
|
3460
|
+
WebM: "webm",
|
|
3461
|
+
MP4: "mp4"
|
|
3458
3462
|
};
|
|
3459
|
-
var VideoType_VideoType = /*#__PURE__*/ function(VideoType) {
|
|
3460
|
-
VideoType["WebM"] = "webm";
|
|
3461
|
-
VideoType["MP4"] = "mp4";
|
|
3462
|
-
return VideoType;
|
|
3463
|
-
}({});
|
|
3464
3463
|
function canPlayType_canPlayType(video, type) {
|
|
3465
3464
|
const canPlayType = video.canPlayType(`video/${type}`);
|
|
3466
3465
|
if ("" === canPlayType) return false;
|
|
3467
3466
|
return canPlayType;
|
|
3468
3467
|
}
|
|
3469
3468
|
const media_canPlayType = canPlayType_canPlayType;
|
|
3470
|
-
const FALLBACK_VIDEO_TYPE =
|
|
3469
|
+
const FALLBACK_VIDEO_TYPE = VideoType.MP4;
|
|
3471
3470
|
class Browser {
|
|
3472
3471
|
options;
|
|
3473
3472
|
result;
|
|
@@ -3514,10 +3513,10 @@ class Browser {
|
|
|
3514
3513
|
}
|
|
3515
3514
|
getVideoType(video) {
|
|
3516
3515
|
if (!this.videoType) {
|
|
3517
|
-
if (media_canPlayType(video,
|
|
3518
|
-
else if (media_canPlayType(video,
|
|
3516
|
+
if (media_canPlayType(video, VideoType.MP4)) this.videoType = VideoType.MP4;
|
|
3517
|
+
else if (media_canPlayType(video, VideoType.WebM)) this.videoType = VideoType.WebM;
|
|
3519
3518
|
}
|
|
3520
|
-
if (this.videoType !==
|
|
3519
|
+
if (this.videoType !== VideoType.WebM && this.videoType !== VideoType.MP4) this.videoType = FALLBACK_VIDEO_TYPE;
|
|
3521
3520
|
if ("" === this.videoType.trim()) this.videoType = FALLBACK_VIDEO_TYPE;
|
|
3522
3521
|
return this.videoType;
|
|
3523
3522
|
}
|
|
@@ -7308,10 +7307,10 @@ class Replay extends util_Despot {
|
|
|
7308
7307
|
}
|
|
7309
7308
|
}
|
|
7310
7309
|
setMp4Source(src, bustCache) {
|
|
7311
|
-
this.setVideoSource(
|
|
7310
|
+
this.setVideoSource(VideoType.MP4, src, bustCache);
|
|
7312
7311
|
}
|
|
7313
7312
|
setWebMSource(src, bustCache) {
|
|
7314
|
-
this.setVideoSource(
|
|
7313
|
+
this.setVideoSource(VideoType.WebM, src, bustCache);
|
|
7315
7314
|
}
|
|
7316
7315
|
getVideoType() {
|
|
7317
7316
|
if (!this.replayElement) return;
|
|
@@ -8199,4 +8198,4 @@ class VideomailClient extends util_Despot {
|
|
|
8199
8198
|
}
|
|
8200
8199
|
}
|
|
8201
8200
|
const client = VideomailClient;
|
|
8202
|
-
export {
|
|
8201
|
+
export { 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 {
|
|
@@ -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 VideoTypeValue = (typeof VideoType)[keyof typeof VideoType];
|
|
@@ -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,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 { VideoTypeValue } from "../../../types/VideoType";
|
|
2
|
+
declare function canPlayType(video: HTMLVideoElement, type: VideoTypeValue): false | "maybe" | "probably";
|
|
3
3
|
export default canPlayType;
|
|
@@ -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,6 +1,5 @@
|
|
|
1
1
|
import { VideomailClientOptions } from "../../types/options";
|
|
2
|
-
import
|
|
3
|
-
import { VideoType } from "../../types/VideoType";
|
|
2
|
+
import Videomail from "../../types/Videomail";
|
|
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
|
@@ -10331,7 +10331,7 @@
|
|
|
10331
10331
|
__webpack_require__.r(__webpack_exports__);
|
|
10332
10332
|
__webpack_require__.d(__webpack_exports__, {
|
|
10333
10333
|
VideomailClient: ()=>src_client,
|
|
10334
|
-
VideoType: ()=>
|
|
10334
|
+
VideoType: ()=>VideoType
|
|
10335
10335
|
});
|
|
10336
10336
|
const constants = {
|
|
10337
10337
|
SITE_NAME_LABEL: "x-videomail-site-name",
|
|
@@ -10494,7 +10494,7 @@
|
|
|
10494
10494
|
var client = __webpack_require__("./node_modules/superagent/lib/client.js");
|
|
10495
10495
|
var client_default = /*#__PURE__*/ __webpack_require__.n(client);
|
|
10496
10496
|
var package_namespaceObject = {
|
|
10497
|
-
rE: "11.
|
|
10497
|
+
rE: "11.3.2"
|
|
10498
10498
|
};
|
|
10499
10499
|
var defined = __webpack_require__("./node_modules/defined/index.js");
|
|
10500
10500
|
var defined_default = /*#__PURE__*/ __webpack_require__.n(defined);
|
|
@@ -13630,18 +13630,17 @@
|
|
|
13630
13630
|
NAME,
|
|
13631
13631
|
VERSION
|
|
13632
13632
|
]);
|
|
13633
|
-
|
|
13634
|
-
|
|
13635
|
-
|
|
13636
|
-
|
|
13637
|
-
}({});
|
|
13633
|
+
const VideoType = {
|
|
13634
|
+
WebM: "webm",
|
|
13635
|
+
MP4: "mp4"
|
|
13636
|
+
};
|
|
13638
13637
|
function canPlayType_canPlayType(video, type) {
|
|
13639
13638
|
const canPlayType = video.canPlayType(`video/${type}`);
|
|
13640
13639
|
if ("" === canPlayType) return false;
|
|
13641
13640
|
return canPlayType;
|
|
13642
13641
|
}
|
|
13643
13642
|
const media_canPlayType = canPlayType_canPlayType;
|
|
13644
|
-
const FALLBACK_VIDEO_TYPE =
|
|
13643
|
+
const FALLBACK_VIDEO_TYPE = VideoType.MP4;
|
|
13645
13644
|
class Browser {
|
|
13646
13645
|
options;
|
|
13647
13646
|
result;
|
|
@@ -13688,10 +13687,10 @@
|
|
|
13688
13687
|
}
|
|
13689
13688
|
getVideoType(video) {
|
|
13690
13689
|
if (!this.videoType) {
|
|
13691
|
-
if (media_canPlayType(video,
|
|
13692
|
-
else if (media_canPlayType(video,
|
|
13690
|
+
if (media_canPlayType(video, VideoType.MP4)) this.videoType = VideoType.MP4;
|
|
13691
|
+
else if (media_canPlayType(video, VideoType.WebM)) this.videoType = VideoType.WebM;
|
|
13693
13692
|
}
|
|
13694
|
-
if (this.videoType !==
|
|
13693
|
+
if (this.videoType !== VideoType.WebM && this.videoType !== VideoType.MP4) this.videoType = FALLBACK_VIDEO_TYPE;
|
|
13695
13694
|
if ("" === this.videoType.trim()) this.videoType = FALLBACK_VIDEO_TYPE;
|
|
13696
13695
|
return this.videoType;
|
|
13697
13696
|
}
|
|
@@ -17675,10 +17674,10 @@
|
|
|
17675
17674
|
}
|
|
17676
17675
|
}
|
|
17677
17676
|
setMp4Source(src, bustCache) {
|
|
17678
|
-
this.setVideoSource(
|
|
17677
|
+
this.setVideoSource(VideoType.MP4, src, bustCache);
|
|
17679
17678
|
}
|
|
17680
17679
|
setWebMSource(src, bustCache) {
|
|
17681
|
-
this.setVideoSource(
|
|
17680
|
+
this.setVideoSource(VideoType.WebM, src, bustCache);
|
|
17682
17681
|
}
|
|
17683
17682
|
getVideoType() {
|
|
17684
17683
|
if (!this.replayElement) return;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "videomail-client",
|
|
3
|
-
"version": "11.
|
|
3
|
+
"version": "11.3.2",
|
|
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": [
|