videomail-client 11.4.5 → 11.4.7
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
CHANGED
|
@@ -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.7"
|
|
10646
10646
|
};
|
|
10647
10647
|
var defined = __webpack_require__("./node_modules/defined/index.js");
|
|
10648
10648
|
var defined_default = /*#__PURE__*/ __webpack_require__.n(defined);
|
|
@@ -15743,7 +15743,7 @@ var __webpack_exports__ = {};
|
|
|
15743
15743
|
if (newCountdown !== this.countdown) {
|
|
15744
15744
|
this.countdown = newCountdown;
|
|
15745
15745
|
this.update();
|
|
15746
|
-
if (this.countdown < 1) this.visuals.stop(
|
|
15746
|
+
if (this.countdown < 1) this.visuals.stop();
|
|
15747
15747
|
}
|
|
15748
15748
|
}
|
|
15749
15749
|
update() {
|
|
@@ -18033,7 +18033,8 @@ var __webpack_exports__ = {};
|
|
|
18033
18033
|
}
|
|
18034
18034
|
build() {
|
|
18035
18035
|
let playerOnly = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : false, parentElement = arguments.length > 1 ? arguments[1] : void 0;
|
|
18036
|
-
|
|
18036
|
+
const parentElementInfo = parentElement ? `, parentElement="${util_pretty(parentElement)}"` : "";
|
|
18037
|
+
this.options.logger.debug(`Visuals: build (playerOnly = ${playerOnly}${parentElementInfo})`);
|
|
18037
18038
|
if (parentElement) this.visualsElement = parentElement.querySelector(`.${this.options.selectors.visualsClass}`);
|
|
18038
18039
|
else this.visualsElement = this.container.querySelector(`.${this.options.selectors.visualsClass}`);
|
|
18039
18040
|
if (!this.visualsElement) if (playerOnly && parentElement) this.visualsElement = parentElement;
|
|
@@ -18131,7 +18132,8 @@ var __webpack_exports__ = {};
|
|
|
18131
18132
|
return this.recorder;
|
|
18132
18133
|
}
|
|
18133
18134
|
validate() {
|
|
18134
|
-
|
|
18135
|
+
if (this.isReplayShown()) return true;
|
|
18136
|
+
return this.recorder.validate();
|
|
18135
18137
|
}
|
|
18136
18138
|
getRecordingStats() {
|
|
18137
18139
|
return this.recorder.getRecordingStats();
|
|
@@ -18551,8 +18553,9 @@ var __webpack_exports__ = {};
|
|
|
18551
18553
|
event
|
|
18552
18554
|
});
|
|
18553
18555
|
else this.emit("VALIDATING");
|
|
18554
|
-
const visualsValid = this.visuals.validate() && this.buttons.isRecordAgainButtonEnabled();
|
|
18555
18556
|
let whyInvalid;
|
|
18557
|
+
const isRecordAgainButtonEnabled = this.buttons.isRecordAgainButtonEnabled();
|
|
18558
|
+
const visualsValid = this.visuals.validate() && isRecordAgainButtonEnabled;
|
|
18556
18559
|
let invalidData;
|
|
18557
18560
|
if (this.form) {
|
|
18558
18561
|
const invalidInput = this.form.getInvalidElement();
|
|
@@ -18597,7 +18600,10 @@ var __webpack_exports__ = {};
|
|
|
18597
18600
|
}
|
|
18598
18601
|
if (!valid) whyInvalid = "At least one recipient is required";
|
|
18599
18602
|
}
|
|
18600
|
-
} else
|
|
18603
|
+
} else {
|
|
18604
|
+
valid = visualsValid;
|
|
18605
|
+
whyInvalid = "Because visuals aren't valid";
|
|
18606
|
+
}
|
|
18601
18607
|
if (valid) this.emit("VALID");
|
|
18602
18608
|
else if (invalidData) this.emit("INVALID", {
|
|
18603
18609
|
whyInvalid,
|
|
@@ -18687,10 +18693,9 @@ var __webpack_exports__ = {};
|
|
|
18687
18693
|
return element.parentNode !== this.containerElement && element !== this.containerElement;
|
|
18688
18694
|
}
|
|
18689
18695
|
loadForm(videomail) {
|
|
18690
|
-
if (this.form)
|
|
18691
|
-
|
|
18692
|
-
|
|
18693
|
-
}
|
|
18696
|
+
if (!this.form) return;
|
|
18697
|
+
this.form.loadVideomail(videomail);
|
|
18698
|
+
this.validate();
|
|
18694
18699
|
}
|
|
18695
18700
|
enableAudio() {
|
|
18696
18701
|
this.options = setAudioEnabled(true, this.options);
|
|
@@ -18784,9 +18789,9 @@ var __webpack_exports__ = {};
|
|
|
18784
18789
|
replayParentElementId
|
|
18785
18790
|
});
|
|
18786
18791
|
this.container.buildForm();
|
|
18787
|
-
this.container.loadForm(videomail);
|
|
18788
18792
|
this.once("REPLAY_SHOWN", ()=>{
|
|
18789
18793
|
this.container.showReplayOnly();
|
|
18794
|
+
this.container.loadForm(videomail);
|
|
18790
18795
|
});
|
|
18791
18796
|
const replay = this.container.getReplay();
|
|
18792
18797
|
replay.setVideomail(videomail, true);
|
package/dist/esm/index.js
CHANGED
|
@@ -3607,7 +3607,7 @@ const constants = {
|
|
|
3607
3607
|
}
|
|
3608
3608
|
};
|
|
3609
3609
|
var package_namespaceObject = {
|
|
3610
|
-
rE: "11.4.
|
|
3610
|
+
rE: "11.4.7"
|
|
3611
3611
|
};
|
|
3612
3612
|
const VideoType = {
|
|
3613
3613
|
WebM: "webm",
|
|
@@ -5326,7 +5326,7 @@ class RecordTimer {
|
|
|
5326
5326
|
if (newCountdown !== this.countdown) {
|
|
5327
5327
|
this.countdown = newCountdown;
|
|
5328
5328
|
this.update();
|
|
5329
|
-
if (this.countdown < 1) this.visuals.stop(
|
|
5329
|
+
if (this.countdown < 1) this.visuals.stop();
|
|
5330
5330
|
}
|
|
5331
5331
|
}
|
|
5332
5332
|
update() {
|
|
@@ -7449,7 +7449,8 @@ class Visuals extends util_Despot {
|
|
|
7449
7449
|
return this.recorderInsides.isCountingDown();
|
|
7450
7450
|
}
|
|
7451
7451
|
build(playerOnly = false, parentElement) {
|
|
7452
|
-
|
|
7452
|
+
const parentElementInfo = parentElement ? `, parentElement="${util_pretty(parentElement)}"` : "";
|
|
7453
|
+
this.options.logger.debug(`Visuals: build (playerOnly = ${playerOnly}${parentElementInfo})`);
|
|
7453
7454
|
if (parentElement) this.visualsElement = parentElement.querySelector(`.${this.options.selectors.visualsClass}`);
|
|
7454
7455
|
else this.visualsElement = this.container.querySelector(`.${this.options.selectors.visualsClass}`);
|
|
7455
7456
|
if (!this.visualsElement) if (playerOnly && parentElement) this.visualsElement = parentElement;
|
|
@@ -7544,7 +7545,8 @@ class Visuals extends util_Despot {
|
|
|
7544
7545
|
return this.recorder;
|
|
7545
7546
|
}
|
|
7546
7547
|
validate() {
|
|
7547
|
-
|
|
7548
|
+
if (this.isReplayShown()) return true;
|
|
7549
|
+
return this.recorder.validate();
|
|
7548
7550
|
}
|
|
7549
7551
|
getRecordingStats() {
|
|
7550
7552
|
return this.recorder.getRecordingStats();
|
|
@@ -7950,8 +7952,9 @@ class Container extends util_Despot {
|
|
|
7950
7952
|
event
|
|
7951
7953
|
});
|
|
7952
7954
|
else this.emit("VALIDATING");
|
|
7953
|
-
const visualsValid = this.visuals.validate() && this.buttons.isRecordAgainButtonEnabled();
|
|
7954
7955
|
let whyInvalid;
|
|
7956
|
+
const isRecordAgainButtonEnabled = this.buttons.isRecordAgainButtonEnabled();
|
|
7957
|
+
const visualsValid = this.visuals.validate() && isRecordAgainButtonEnabled;
|
|
7955
7958
|
let invalidData;
|
|
7956
7959
|
if (this.form) {
|
|
7957
7960
|
const invalidInput = this.form.getInvalidElement();
|
|
@@ -7996,7 +7999,10 @@ class Container extends util_Despot {
|
|
|
7996
7999
|
}
|
|
7997
8000
|
if (!valid) whyInvalid = "At least one recipient is required";
|
|
7998
8001
|
}
|
|
7999
|
-
} else
|
|
8002
|
+
} else {
|
|
8003
|
+
valid = visualsValid;
|
|
8004
|
+
whyInvalid = "Because visuals aren't valid";
|
|
8005
|
+
}
|
|
8000
8006
|
if (valid) this.emit("VALID");
|
|
8001
8007
|
else if (invalidData) this.emit("INVALID", {
|
|
8002
8008
|
whyInvalid,
|
|
@@ -8084,10 +8090,9 @@ class Container extends util_Despot {
|
|
|
8084
8090
|
return element.parentNode !== this.containerElement && element !== this.containerElement;
|
|
8085
8091
|
}
|
|
8086
8092
|
loadForm(videomail) {
|
|
8087
|
-
if (this.form)
|
|
8088
|
-
|
|
8089
|
-
|
|
8090
|
-
}
|
|
8093
|
+
if (!this.form) return;
|
|
8094
|
+
this.form.loadVideomail(videomail);
|
|
8095
|
+
this.validate();
|
|
8091
8096
|
}
|
|
8092
8097
|
enableAudio() {
|
|
8093
8098
|
this.options = setAudioEnabled(true, this.options);
|
|
@@ -8170,9 +8175,9 @@ class VideomailClient extends util_Despot {
|
|
|
8170
8175
|
replayParentElementId
|
|
8171
8176
|
});
|
|
8172
8177
|
this.container.buildForm();
|
|
8173
|
-
this.container.loadForm(videomail);
|
|
8174
8178
|
this.once("REPLAY_SHOWN", ()=>{
|
|
8175
8179
|
this.container.showReplayOnly();
|
|
8180
|
+
this.container.loadForm(videomail);
|
|
8176
8181
|
});
|
|
8177
8182
|
const replay = this.container.getReplay();
|
|
8178
8183
|
replay.setVideomail(videomail, true);
|
|
@@ -4,7 +4,7 @@ import Despot from "../../util/Despot";
|
|
|
4
4
|
import { UnloadParams } from "../container";
|
|
5
5
|
import Visuals from "../visuals";
|
|
6
6
|
import Replay from "./replay";
|
|
7
|
-
interface StopParams {
|
|
7
|
+
export interface StopParams {
|
|
8
8
|
limitReached?: boolean;
|
|
9
9
|
}
|
|
10
10
|
interface PauseParams {
|
|
@@ -2,8 +2,8 @@ import { ShowParams } from "../client";
|
|
|
2
2
|
import { VideomailClientOptions } from "../types/options";
|
|
3
3
|
import Despot from "../util/Despot";
|
|
4
4
|
import VideomailError from "../util/error/VideomailError";
|
|
5
|
-
import { UnloadParams } from "./container";
|
|
6
|
-
import Recorder from "./visuals/recorder";
|
|
5
|
+
import Container, { UnloadParams } from "./container";
|
|
6
|
+
import Recorder, { StopParams } from "./visuals/recorder";
|
|
7
7
|
import Replay from "./visuals/replay";
|
|
8
8
|
declare class Visuals extends Despot {
|
|
9
9
|
private readonly container;
|
|
@@ -13,7 +13,7 @@ declare class Visuals extends Despot {
|
|
|
13
13
|
private readonly notifier;
|
|
14
14
|
private visualsElement?;
|
|
15
15
|
private built;
|
|
16
|
-
constructor(container:
|
|
16
|
+
constructor(container: Container, options: VideomailClientOptions);
|
|
17
17
|
private buildNoScriptTag;
|
|
18
18
|
private buildChildren;
|
|
19
19
|
private initEvents;
|
|
@@ -28,7 +28,7 @@ declare class Visuals extends Despot {
|
|
|
28
28
|
reset(): void;
|
|
29
29
|
beginWaiting(): void;
|
|
30
30
|
endWaiting(): void;
|
|
31
|
-
stop(params?:
|
|
31
|
+
stop(params?: StopParams): void;
|
|
32
32
|
back(keepHidden?: boolean, cb?: any): void;
|
|
33
33
|
recordAgain(): void;
|
|
34
34
|
unload(params?: UnloadParams): void;
|
package/dist/umd/index.js
CHANGED
|
@@ -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.7"
|
|
10652
10652
|
};
|
|
10653
10653
|
var defined = __webpack_require__("./node_modules/defined/index.js");
|
|
10654
10654
|
var defined_default = /*#__PURE__*/ __webpack_require__.n(defined);
|
|
@@ -15618,7 +15618,7 @@
|
|
|
15618
15618
|
if (newCountdown !== this.countdown) {
|
|
15619
15619
|
this.countdown = newCountdown;
|
|
15620
15620
|
this.update();
|
|
15621
|
-
if (this.countdown < 1) this.visuals.stop(
|
|
15621
|
+
if (this.countdown < 1) this.visuals.stop();
|
|
15622
15622
|
}
|
|
15623
15623
|
}
|
|
15624
15624
|
update() {
|
|
@@ -17817,7 +17817,8 @@
|
|
|
17817
17817
|
return this.recorderInsides.isCountingDown();
|
|
17818
17818
|
}
|
|
17819
17819
|
build(playerOnly = false, parentElement) {
|
|
17820
|
-
|
|
17820
|
+
const parentElementInfo = parentElement ? `, parentElement="${util_pretty(parentElement)}"` : "";
|
|
17821
|
+
this.options.logger.debug(`Visuals: build (playerOnly = ${playerOnly}${parentElementInfo})`);
|
|
17821
17822
|
if (parentElement) this.visualsElement = parentElement.querySelector(`.${this.options.selectors.visualsClass}`);
|
|
17822
17823
|
else this.visualsElement = this.container.querySelector(`.${this.options.selectors.visualsClass}`);
|
|
17823
17824
|
if (!this.visualsElement) if (playerOnly && parentElement) this.visualsElement = parentElement;
|
|
@@ -17912,7 +17913,8 @@
|
|
|
17912
17913
|
return this.recorder;
|
|
17913
17914
|
}
|
|
17914
17915
|
validate() {
|
|
17915
|
-
|
|
17916
|
+
if (this.isReplayShown()) return true;
|
|
17917
|
+
return this.recorder.validate();
|
|
17916
17918
|
}
|
|
17917
17919
|
getRecordingStats() {
|
|
17918
17920
|
return this.recorder.getRecordingStats();
|
|
@@ -18318,8 +18320,9 @@
|
|
|
18318
18320
|
event
|
|
18319
18321
|
});
|
|
18320
18322
|
else this.emit("VALIDATING");
|
|
18321
|
-
const visualsValid = this.visuals.validate() && this.buttons.isRecordAgainButtonEnabled();
|
|
18322
18323
|
let whyInvalid;
|
|
18324
|
+
const isRecordAgainButtonEnabled = this.buttons.isRecordAgainButtonEnabled();
|
|
18325
|
+
const visualsValid = this.visuals.validate() && isRecordAgainButtonEnabled;
|
|
18323
18326
|
let invalidData;
|
|
18324
18327
|
if (this.form) {
|
|
18325
18328
|
const invalidInput = this.form.getInvalidElement();
|
|
@@ -18364,7 +18367,10 @@
|
|
|
18364
18367
|
}
|
|
18365
18368
|
if (!valid) whyInvalid = "At least one recipient is required";
|
|
18366
18369
|
}
|
|
18367
|
-
} else
|
|
18370
|
+
} else {
|
|
18371
|
+
valid = visualsValid;
|
|
18372
|
+
whyInvalid = "Because visuals aren't valid";
|
|
18373
|
+
}
|
|
18368
18374
|
if (valid) this.emit("VALID");
|
|
18369
18375
|
else if (invalidData) this.emit("INVALID", {
|
|
18370
18376
|
whyInvalid,
|
|
@@ -18452,10 +18458,9 @@
|
|
|
18452
18458
|
return element.parentNode !== this.containerElement && element !== this.containerElement;
|
|
18453
18459
|
}
|
|
18454
18460
|
loadForm(videomail) {
|
|
18455
|
-
if (this.form)
|
|
18456
|
-
|
|
18457
|
-
|
|
18458
|
-
}
|
|
18461
|
+
if (!this.form) return;
|
|
18462
|
+
this.form.loadVideomail(videomail);
|
|
18463
|
+
this.validate();
|
|
18459
18464
|
}
|
|
18460
18465
|
enableAudio() {
|
|
18461
18466
|
this.options = setAudioEnabled(true, this.options);
|
|
@@ -18538,9 +18543,9 @@
|
|
|
18538
18543
|
replayParentElementId
|
|
18539
18544
|
});
|
|
18540
18545
|
this.container.buildForm();
|
|
18541
|
-
this.container.loadForm(videomail);
|
|
18542
18546
|
this.once("REPLAY_SHOWN", ()=>{
|
|
18543
18547
|
this.container.showReplayOnly();
|
|
18548
|
+
this.container.loadForm(videomail);
|
|
18544
18549
|
});
|
|
18545
18550
|
const replay = this.container.getReplay();
|
|
18546
18551
|
replay.setVideomail(videomail, true);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "videomail-client",
|
|
3
|
-
"version": "11.4.
|
|
3
|
+
"version": "11.4.7",
|
|
4
4
|
"description": "A wicked npm package to record videos directly in the browser, wohooo!",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"webcam",
|
|
@@ -79,7 +79,7 @@
|
|
|
79
79
|
"@eslint/js": "9.36.0",
|
|
80
80
|
"@rsbuild/plugin-node-polyfill": "1.4.2",
|
|
81
81
|
"@rsbuild/plugin-stylus": "1.2.0",
|
|
82
|
-
"@rsdoctor/rspack-plugin": "1.
|
|
82
|
+
"@rsdoctor/rspack-plugin": "1.3.1",
|
|
83
83
|
"@rslib/core": "0.13.2",
|
|
84
84
|
"@storybook/addon-a11y": "9.1.8",
|
|
85
85
|
"@storybook/addon-docs": "9.1.8",
|
|
@@ -88,16 +88,16 @@
|
|
|
88
88
|
"@tsconfig/node22": "22.0.2",
|
|
89
89
|
"@tsconfig/strictest": "2.0.6",
|
|
90
90
|
"@types/defined": "1.0.2",
|
|
91
|
-
"@types/node": "22.
|
|
91
|
+
"@types/node": "22.18.6",
|
|
92
92
|
"@types/superagent": "8.1.9",
|
|
93
93
|
"@types/ua-parser-js": "0.7.39",
|
|
94
94
|
"@vitest/eslint-plugin": "1.3.13",
|
|
95
95
|
"audit-ci": "7.1.0",
|
|
96
|
-
"chromatic": "13.
|
|
97
|
-
"cross-env": "10.
|
|
96
|
+
"chromatic": "13.3.0",
|
|
97
|
+
"cross-env": "10.1.0",
|
|
98
98
|
"eslint": "9.36.0",
|
|
99
99
|
"eslint-import-resolver-typescript": "4.4.4",
|
|
100
|
-
"eslint-plugin-de-morgan": "
|
|
100
|
+
"eslint-plugin-de-morgan": "2.0.0",
|
|
101
101
|
"eslint-plugin-depend": "1.3.1",
|
|
102
102
|
"eslint-plugin-import-x": "4.16.1",
|
|
103
103
|
"eslint-plugin-package-json": "0.56.3",
|
|
@@ -118,7 +118,7 @@
|
|
|
118
118
|
"storybook": "9.1.8",
|
|
119
119
|
"storybook-html-rsbuild": "2.1.1",
|
|
120
120
|
"type-fest": "5.0.1",
|
|
121
|
-
"typescript": "5.9.
|
|
121
|
+
"typescript": "5.9.3",
|
|
122
122
|
"typescript-eslint": "8.41.0",
|
|
123
123
|
"vitest": "3.2.4"
|
|
124
124
|
},
|