videomail-client 11.5.2 → 11.5.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 +9 -12
- package/dist/esm/client.d.ts +1 -1
- package/dist/esm/index.d.ts +10 -11
- package/dist/esm/index.js +6 -6
- package/dist/esm/resource.d.ts +1 -1
- package/dist/esm/types/{DeliveryRecord.d.ts → Delivery.d.ts} +1 -1
- package/dist/esm/types/Videomail.d.ts +2 -3
- package/dist/esm/types/events/index.d.ts +2 -3
- package/dist/esm/util/Despot.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/esm/wrappers/visuals.d.ts +1 -1
- package/dist/umd/index.js +6 -7
- package/package.json +5 -5
package/dist/cjs/index.cjs
CHANGED
|
@@ -10496,8 +10496,7 @@ var __webpack_exports__ = {};
|
|
|
10496
10496
|
"use strict";
|
|
10497
10497
|
__webpack_require__.r(__webpack_exports__);
|
|
10498
10498
|
__webpack_require__.d(__webpack_exports__, {
|
|
10499
|
-
VideomailClient: ()=>src_client
|
|
10500
|
-
VideoType: ()=>VideoType
|
|
10499
|
+
VideomailClient: ()=>src_client
|
|
10501
10500
|
});
|
|
10502
10501
|
const constants = {
|
|
10503
10502
|
SITE_NAME_LABEL: "x-videomail-site-name",
|
|
@@ -10660,7 +10659,7 @@ var __webpack_exports__ = {};
|
|
|
10660
10659
|
var client = __webpack_require__("./node_modules/superagent/lib/client.js");
|
|
10661
10660
|
var client_default = /*#__PURE__*/ __webpack_require__.n(client);
|
|
10662
10661
|
var package_namespaceObject = {
|
|
10663
|
-
rE: "11.5.
|
|
10662
|
+
rE: "11.5.4"
|
|
10664
10663
|
};
|
|
10665
10664
|
var defined = __webpack_require__("./node_modules/defined/index.js");
|
|
10666
10665
|
var defined_default = /*#__PURE__*/ __webpack_require__.n(defined);
|
|
@@ -13841,7 +13840,7 @@ var __webpack_exports__ = {};
|
|
|
13841
13840
|
return obj;
|
|
13842
13841
|
}
|
|
13843
13842
|
const FALLBACK_VIDEO_TYPE = VideoType.MP4;
|
|
13844
|
-
class
|
|
13843
|
+
class Browser {
|
|
13845
13844
|
isIOS() {
|
|
13846
13845
|
return "iOS" === this.result.os.name;
|
|
13847
13846
|
}
|
|
@@ -13874,7 +13873,7 @@ var __webpack_exports__ = {};
|
|
|
13874
13873
|
isOkSafari() {
|
|
13875
13874
|
const version = this.getBrowserVersion();
|
|
13876
13875
|
if (!version) return false;
|
|
13877
|
-
return this.isSafari() && parseFloat(version) >= 11;
|
|
13876
|
+
return this.isSafari() && Number.parseFloat(version) >= 11;
|
|
13878
13877
|
}
|
|
13879
13878
|
getVideoType(video) {
|
|
13880
13879
|
if (!this.videoType) {
|
|
@@ -13915,10 +13914,10 @@ var __webpack_exports__ = {};
|
|
|
13915
13914
|
this.result = userAgentParser.getResult();
|
|
13916
13915
|
}
|
|
13917
13916
|
}
|
|
13918
|
-
const
|
|
13917
|
+
const util_Browser = Browser;
|
|
13919
13918
|
let getBrowser_browser;
|
|
13920
13919
|
function getBrowser(localOptions) {
|
|
13921
|
-
if (!getBrowser_browser) getBrowser_browser = new
|
|
13920
|
+
if (!getBrowser_browser) getBrowser_browser = new util_Browser(localOptions);
|
|
13922
13921
|
return getBrowser_browser;
|
|
13923
13922
|
}
|
|
13924
13923
|
const util_getBrowser = getBrowser;
|
|
@@ -15529,7 +15528,7 @@ var __webpack_exports__ = {};
|
|
|
15529
15528
|
}
|
|
15530
15529
|
start(cb) {
|
|
15531
15530
|
if (!this.countdownElement) throw new Error("Unable to start countdown without an element");
|
|
15532
|
-
if ("number" != typeof this.options.video.countdown) throw new
|
|
15531
|
+
if ("number" != typeof this.options.video.countdown) throw new TypeError(`The defined countdown is not a valid number: ${this.options.video.countdown}`);
|
|
15533
15532
|
this.countdown = this.options.video.countdown;
|
|
15534
15533
|
this.countdownElement.innerHTML = this.countdown.toString();
|
|
15535
15534
|
this.show();
|
|
@@ -17917,7 +17916,7 @@ var __webpack_exports__ = {};
|
|
|
17917
17916
|
const tracks = this.replayElement.getElementsByTagName("track");
|
|
17918
17917
|
const firstTrack = tracks[0];
|
|
17919
17918
|
if (firstTrack) if (src) firstTrack.setAttribute("src", src);
|
|
17920
|
-
else
|
|
17919
|
+
else firstTrack.remove();
|
|
17921
17920
|
else {
|
|
17922
17921
|
const track = document.createElement("track");
|
|
17923
17922
|
track.setAttribute("src", src);
|
|
@@ -17934,7 +17933,7 @@ var __webpack_exports__ = {};
|
|
|
17934
17933
|
let url = src;
|
|
17935
17934
|
if (url && bustCache) url += `?${Date.now()}`;
|
|
17936
17935
|
if (source) if (src) source.setAttribute("src", src);
|
|
17937
|
-
else
|
|
17936
|
+
else source.remove();
|
|
17938
17937
|
else if (src) {
|
|
17939
17938
|
const { fps } = this.options.video;
|
|
17940
17939
|
const t = 1 / fps * 2;
|
|
@@ -18885,10 +18884,8 @@ var __webpack_exports__ = {};
|
|
|
18885
18884
|
client_define_property(VideomailClient, "ENC_TYPE_FORM", constants["public"].ENC_TYPE_FORM);
|
|
18886
18885
|
const src_client = VideomailClient;
|
|
18887
18886
|
})();
|
|
18888
|
-
exports.VideoType = __webpack_exports__.VideoType;
|
|
18889
18887
|
exports.VideomailClient = __webpack_exports__.VideomailClient;
|
|
18890
18888
|
for(var __webpack_i__ in __webpack_exports__)if (-1 === [
|
|
18891
|
-
"VideoType",
|
|
18892
18889
|
"VideomailClient"
|
|
18893
18890
|
].indexOf(__webpack_i__)) exports[__webpack_i__] = __webpack_exports__[__webpack_i__];
|
|
18894
18891
|
Object.defineProperty(exports, '__esModule', {
|
package/dist/esm/client.d.ts
CHANGED
package/dist/esm/index.d.ts
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import VideomailClient from "./client";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
export
|
|
12
|
-
export { VideomailClient, VideoType };
|
|
2
|
+
export type { Command } from "./types/command";
|
|
3
|
+
export type DeliveryRecord = "./types/DeliveryRecord";
|
|
4
|
+
export type { VideomailCommandArgs } from "./types/command";
|
|
5
|
+
export type { EmailAddress, EmailAddresses } from "./types/EmailAddress";
|
|
6
|
+
export type { FullVideomailErrorData, VideomailErrorData } from "./types/error";
|
|
7
|
+
export type { VideomailEvents, VideomailPreviewParams } from "./types/events";
|
|
8
|
+
export type { VideomailClientOptions } from "./types/options";
|
|
9
|
+
export type RecordingStats = "./types/RecordingStats";
|
|
10
|
+
export type { PartialVideomail, Videomail } from "./types/Videomail";
|
|
11
|
+
export { VideomailClient };
|
package/dist/esm/index.js
CHANGED
|
@@ -3602,7 +3602,7 @@ const constants = {
|
|
|
3602
3602
|
}
|
|
3603
3603
|
};
|
|
3604
3604
|
var package_namespaceObject = {
|
|
3605
|
-
rE: "11.5.
|
|
3605
|
+
rE: "11.5.4"
|
|
3606
3606
|
};
|
|
3607
3607
|
const VideoType = {
|
|
3608
3608
|
WebM: "webm",
|
|
@@ -3657,7 +3657,7 @@ class Browser {
|
|
|
3657
3657
|
isOkSafari() {
|
|
3658
3658
|
const version = this.getBrowserVersion();
|
|
3659
3659
|
if (!version) return false;
|
|
3660
|
-
return this.isSafari() && parseFloat(version) >= 11;
|
|
3660
|
+
return this.isSafari() && Number.parseFloat(version) >= 11;
|
|
3661
3661
|
}
|
|
3662
3662
|
getVideoType(video) {
|
|
3663
3663
|
if (!this.videoType) {
|
|
@@ -5110,7 +5110,7 @@ class Countdown {
|
|
|
5110
5110
|
}
|
|
5111
5111
|
start(cb) {
|
|
5112
5112
|
if (!this.countdownElement) throw new Error("Unable to start countdown without an element");
|
|
5113
|
-
if ("number" != typeof this.options.video.countdown) throw new
|
|
5113
|
+
if ("number" != typeof this.options.video.countdown) throw new TypeError(`The defined countdown is not a valid number: ${this.options.video.countdown}`);
|
|
5114
5114
|
this.countdown = this.options.video.countdown;
|
|
5115
5115
|
this.countdownElement.innerHTML = this.countdown.toString();
|
|
5116
5116
|
this.show();
|
|
@@ -7289,7 +7289,7 @@ class Replay extends util_Despot {
|
|
|
7289
7289
|
const tracks = this.replayElement.getElementsByTagName("track");
|
|
7290
7290
|
const firstTrack = tracks[0];
|
|
7291
7291
|
if (firstTrack) if (src) firstTrack.setAttribute("src", src);
|
|
7292
|
-
else
|
|
7292
|
+
else firstTrack.remove();
|
|
7293
7293
|
else {
|
|
7294
7294
|
const track = document.createElement("track");
|
|
7295
7295
|
track.setAttribute("src", src);
|
|
@@ -7306,7 +7306,7 @@ class Replay extends util_Despot {
|
|
|
7306
7306
|
let url = src;
|
|
7307
7307
|
if (url && bustCache) url += `?${Date.now()}`;
|
|
7308
7308
|
if (source) if (src) source.setAttribute("src", src);
|
|
7309
|
-
else
|
|
7309
|
+
else source.remove();
|
|
7310
7310
|
else if (src) {
|
|
7311
7311
|
const { fps } = this.options.video;
|
|
7312
7312
|
const t = 1 / fps * 2;
|
|
@@ -8215,4 +8215,4 @@ class VideomailClient extends util_Despot {
|
|
|
8215
8215
|
}
|
|
8216
8216
|
}
|
|
8217
8217
|
const client = VideomailClient;
|
|
8218
|
-
export {
|
|
8218
|
+
export { 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 { PartialVideomail, Videomail } from "./types/Videomail";
|
|
4
4
|
import VideomailError from "./util/error/VideomailError";
|
|
5
5
|
import { FormInputs } from "./wrappers/form";
|
|
6
6
|
declare class Resource {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { PartialDeep } from "type-fest";
|
|
2
|
-
import DeliveryRecord from "./
|
|
2
|
+
import { DeliveryRecord } from "./Delivery";
|
|
3
3
|
import { EmailAddress, EmailAddresses } from "./EmailAddress";
|
|
4
4
|
import RecordingStats from "./RecordingStats";
|
|
5
5
|
import VideoFormat from "./VideoFormat";
|
|
6
|
-
interface Videomail {
|
|
6
|
+
export interface Videomail {
|
|
7
7
|
subject?: string;
|
|
8
8
|
body?: string;
|
|
9
9
|
from: EmailAddress;
|
|
@@ -54,4 +54,3 @@ interface Videomail {
|
|
|
54
54
|
rejectedBcc?: DeliveryRecord;
|
|
55
55
|
}
|
|
56
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 Videomail from "../Videomail";
|
|
5
|
+
import { Videomail } from "../Videomail";
|
|
6
6
|
export interface UserMediaReadyParams {
|
|
7
7
|
switchingFacingMode?: ConstrainDOMString | undefined;
|
|
8
8
|
recordWhenReady?: boolean | undefined;
|
|
@@ -44,7 +44,7 @@ export interface InvalidParams {
|
|
|
44
44
|
whyInvalid?: string | undefined;
|
|
45
45
|
invalidData?: Record<string, string>;
|
|
46
46
|
}
|
|
47
|
-
interface VideomailEvents {
|
|
47
|
+
export interface VideomailEvents {
|
|
48
48
|
ASKING_WEBCAM_PERMISSION: () => void;
|
|
49
49
|
BEGIN_AUDIO_ENCODING: () => void;
|
|
50
50
|
BEGIN_VIDEO_ENCODING: () => void;
|
|
@@ -89,4 +89,3 @@ interface VideomailEvents {
|
|
|
89
89
|
VALIDATING: (params?: ValidatingParams) => void;
|
|
90
90
|
VISIBLE: () => void;
|
|
91
91
|
}
|
|
92
|
-
export default VideomailEvents;
|
|
@@ -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 Videomail from "../types/Videomail";
|
|
4
|
+
import { Videomail } from "../types/Videomail";
|
|
5
5
|
import Despot from "../util/Despot";
|
|
6
6
|
import { FormInputs, FormMethodType } from "./form";
|
|
7
7
|
interface BuildOptions {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { VideomailClientOptions } from "../types/options";
|
|
2
|
-
import Videomail from "../types/Videomail";
|
|
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 Videomail from "../../types/Videomail";
|
|
2
|
+
import { Videomail } from "../../types/Videomail";
|
|
3
3
|
import Despot from "../../util/Despot";
|
|
4
4
|
import { UnloadParams } from "../container";
|
|
5
5
|
import Visuals from "../visuals";
|
|
@@ -41,7 +41,7 @@ declare class Visuals extends Despot {
|
|
|
41
41
|
recordOrStop(): void;
|
|
42
42
|
getRecorder(): Recorder;
|
|
43
43
|
validate(): boolean;
|
|
44
|
-
getRecordingStats(): import("
|
|
44
|
+
getRecordingStats(): import("../types/RecordingStats").default | undefined;
|
|
45
45
|
getAudioSampleRate(): number | undefined;
|
|
46
46
|
isPaused(): boolean | undefined;
|
|
47
47
|
error(err: VideomailError): void;
|
package/dist/umd/index.js
CHANGED
|
@@ -10502,8 +10502,7 @@
|
|
|
10502
10502
|
"use strict";
|
|
10503
10503
|
__webpack_require__.r(__webpack_exports__);
|
|
10504
10504
|
__webpack_require__.d(__webpack_exports__, {
|
|
10505
|
-
VideomailClient: ()=>src_client
|
|
10506
|
-
VideoType: ()=>VideoType
|
|
10505
|
+
VideomailClient: ()=>src_client
|
|
10507
10506
|
});
|
|
10508
10507
|
const constants = {
|
|
10509
10508
|
SITE_NAME_LABEL: "x-videomail-site-name",
|
|
@@ -10666,7 +10665,7 @@
|
|
|
10666
10665
|
var client = __webpack_require__("./node_modules/superagent/lib/client.js");
|
|
10667
10666
|
var client_default = /*#__PURE__*/ __webpack_require__.n(client);
|
|
10668
10667
|
var package_namespaceObject = {
|
|
10669
|
-
rE: "11.5.
|
|
10668
|
+
rE: "11.5.4"
|
|
10670
10669
|
};
|
|
10671
10670
|
var defined = __webpack_require__("./node_modules/defined/index.js");
|
|
10672
10671
|
var defined_default = /*#__PURE__*/ __webpack_require__.n(defined);
|
|
@@ -13879,7 +13878,7 @@
|
|
|
13879
13878
|
isOkSafari() {
|
|
13880
13879
|
const version = this.getBrowserVersion();
|
|
13881
13880
|
if (!version) return false;
|
|
13882
|
-
return this.isSafari() && parseFloat(version) >= 11;
|
|
13881
|
+
return this.isSafari() && Number.parseFloat(version) >= 11;
|
|
13883
13882
|
}
|
|
13884
13883
|
getVideoType(video) {
|
|
13885
13884
|
if (!this.videoType) {
|
|
@@ -15449,7 +15448,7 @@
|
|
|
15449
15448
|
}
|
|
15450
15449
|
start(cb) {
|
|
15451
15450
|
if (!this.countdownElement) throw new Error("Unable to start countdown without an element");
|
|
15452
|
-
if ("number" != typeof this.options.video.countdown) throw new
|
|
15451
|
+
if ("number" != typeof this.options.video.countdown) throw new TypeError(`The defined countdown is not a valid number: ${this.options.video.countdown}`);
|
|
15453
15452
|
this.countdown = this.options.video.countdown;
|
|
15454
15453
|
this.countdownElement.innerHTML = this.countdown.toString();
|
|
15455
15454
|
this.show();
|
|
@@ -17704,7 +17703,7 @@
|
|
|
17704
17703
|
const tracks = this.replayElement.getElementsByTagName("track");
|
|
17705
17704
|
const firstTrack = tracks[0];
|
|
17706
17705
|
if (firstTrack) if (src) firstTrack.setAttribute("src", src);
|
|
17707
|
-
else
|
|
17706
|
+
else firstTrack.remove();
|
|
17708
17707
|
else {
|
|
17709
17708
|
const track = document.createElement("track");
|
|
17710
17709
|
track.setAttribute("src", src);
|
|
@@ -17721,7 +17720,7 @@
|
|
|
17721
17720
|
let url = src;
|
|
17722
17721
|
if (url && bustCache) url += `?${Date.now()}`;
|
|
17723
17722
|
if (source) if (src) source.setAttribute("src", src);
|
|
17724
|
-
else
|
|
17723
|
+
else source.remove();
|
|
17725
17724
|
else if (src) {
|
|
17726
17725
|
const { fps } = this.options.video;
|
|
17727
17726
|
const t = 1 / fps * 2;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "videomail-client",
|
|
3
|
-
"version": "11.5.
|
|
3
|
+
"version": "11.5.4",
|
|
4
4
|
"description": "A wicked npm package to record videos directly in the browser, wohooo!",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"webcam",
|
|
@@ -76,7 +76,7 @@
|
|
|
76
76
|
"devDependencies": {
|
|
77
77
|
"@chromatic-com/storybook": "4.1.1",
|
|
78
78
|
"@eslint/config-inspector": "1.3.0",
|
|
79
|
-
"@eslint/js": "9.
|
|
79
|
+
"@eslint/js": "9.38.0",
|
|
80
80
|
"@rsbuild/plugin-node-polyfill": "1.4.2",
|
|
81
81
|
"@rsbuild/plugin-stylus": "1.2.0",
|
|
82
82
|
"@rsdoctor/rspack-plugin": "1.3.3",
|
|
@@ -91,11 +91,11 @@
|
|
|
91
91
|
"@types/node": "22.18.6",
|
|
92
92
|
"@types/superagent": "8.1.9",
|
|
93
93
|
"@types/ua-parser-js": "0.7.39",
|
|
94
|
-
"@vitest/eslint-plugin": "1.3.
|
|
94
|
+
"@vitest/eslint-plugin": "1.3.23",
|
|
95
95
|
"audit-ci": "7.1.0",
|
|
96
96
|
"chromatic": "13.3.0",
|
|
97
97
|
"cross-env": "10.1.0",
|
|
98
|
-
"eslint": "9.
|
|
98
|
+
"eslint": "9.38.0",
|
|
99
99
|
"eslint-import-resolver-typescript": "4.4.4",
|
|
100
100
|
"eslint-plugin-de-morgan": "2.0.0",
|
|
101
101
|
"eslint-plugin-depend": "1.3.1",
|
|
@@ -107,7 +107,7 @@
|
|
|
107
107
|
"eslint-plugin-simple-import-sort": "12.1.1",
|
|
108
108
|
"eslint-plugin-storybook": "9.1.12",
|
|
109
109
|
"globals": "16.4.0",
|
|
110
|
-
"jsdom": "27.0.
|
|
110
|
+
"jsdom": "27.0.1",
|
|
111
111
|
"msw": "2.11.5",
|
|
112
112
|
"msw-storybook-addon": "2.0.6",
|
|
113
113
|
"prettier": "3.6.2",
|