videomail-client 15.11.1 → 16.0.0
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/README.md +6 -0
- package/dist/cjs/index.cjs +5 -5
- package/dist/esm/index.js +3 -4
- package/dist/umd/index.js +5 -5
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -75,6 +75,12 @@ The defaults suit most integrations. Set `whitelistKey` when deploying on your o
|
|
|
75
75
|
|
|
76
76
|
The examples in [src/stories](https://github.com/binarykitchen/videomail-client/tree/master/src/stories) show common configurations.
|
|
77
77
|
|
|
78
|
+
### Audio
|
|
79
|
+
|
|
80
|
+
Audio recording is experimental and disabled by default. Set `audio.enabled` to `true` to enable it.
|
|
81
|
+
|
|
82
|
+
`audio.volume` controls recording gain from `0` (silence) to `1` (unchanged microphone level, the default). It does not control playback volume or enable audible microphone monitoring.
|
|
83
|
+
|
|
78
84
|
## API
|
|
79
85
|
|
|
80
86
|
- [`new VideomailClient()`](#new-videomailclientoptions)
|
package/dist/cjs/index.cjs
CHANGED
|
@@ -10972,7 +10972,7 @@ var __webpack_exports__ = {};
|
|
|
10972
10972
|
var client = __webpack_require__("Q");
|
|
10973
10973
|
var client_default = /*#__PURE__*/ __webpack_require__.n(client);
|
|
10974
10974
|
var package_namespaceObject = {
|
|
10975
|
-
rE: "
|
|
10975
|
+
rE: "16.0.0"
|
|
10976
10976
|
};
|
|
10977
10977
|
function isAudioEnabled(options) {
|
|
10978
10978
|
return Boolean(options.audio.enabled);
|
|
@@ -15462,7 +15462,7 @@ var __webpack_exports__ = {};
|
|
|
15462
15462
|
audio: {
|
|
15463
15463
|
enabled: false,
|
|
15464
15464
|
switch: false,
|
|
15465
|
-
volume:
|
|
15465
|
+
volume: 1,
|
|
15466
15466
|
bufferSize: "auto"
|
|
15467
15467
|
},
|
|
15468
15468
|
video: {
|
|
@@ -19258,7 +19258,8 @@ var __webpack_exports__ = {};
|
|
|
19258
19258
|
const l = this.float32Array.length;
|
|
19259
19259
|
const arr = new Int16Array(l);
|
|
19260
19260
|
this.float32Array.forEach((sample, i)=>{
|
|
19261
|
-
|
|
19261
|
+
const clampedSample = Number.isFinite(sample) ? Math.max(-1, sample) : sample;
|
|
19262
|
+
arr[i] = 0x7fff * Math.min(1, clampedSample);
|
|
19262
19263
|
});
|
|
19263
19264
|
return typedarray_to_buffer(arr);
|
|
19264
19265
|
}
|
|
@@ -19325,10 +19326,9 @@ var __webpack_exports__ = {};
|
|
|
19325
19326
|
});
|
|
19326
19327
|
volume.gain.value = this.options.audio.volume;
|
|
19327
19328
|
this.scriptProcessor = this.getAudioContext().createScriptProcessor(bufferSize, CHANNELS, CHANNELS);
|
|
19328
|
-
this.audioInput.connect(this.scriptProcessor);
|
|
19329
|
-
this.scriptProcessor.connect(this.getAudioContext().destination);
|
|
19330
19329
|
this.audioInput.connect(volume);
|
|
19331
19330
|
volume.connect(this.scriptProcessor);
|
|
19331
|
+
this.scriptProcessor.connect(this.getAudioContext().destination);
|
|
19332
19332
|
}
|
|
19333
19333
|
record(cb) {
|
|
19334
19334
|
this.options.logger.debug("AudioRecorder: record()");
|
package/dist/esm/index.js
CHANGED
|
@@ -3620,7 +3620,7 @@ const constants = {
|
|
|
3620
3620
|
}
|
|
3621
3621
|
};
|
|
3622
3622
|
var package_namespaceObject = {
|
|
3623
|
-
rE: "
|
|
3623
|
+
rE: "16.0.0"
|
|
3624
3624
|
};
|
|
3625
3625
|
function isAudioEnabled(options) {
|
|
3626
3626
|
return Boolean(options.audio.enabled);
|
|
@@ -4641,7 +4641,7 @@ const options_options = {
|
|
|
4641
4641
|
audio: {
|
|
4642
4642
|
enabled: false,
|
|
4643
4643
|
switch: false,
|
|
4644
|
-
volume:
|
|
4644
|
+
volume: 1,
|
|
4645
4645
|
bufferSize: "auto"
|
|
4646
4646
|
},
|
|
4647
4647
|
video: {
|
|
@@ -6283,10 +6283,9 @@ class AudioRecorder {
|
|
|
6283
6283
|
});
|
|
6284
6284
|
volume.gain.value = this.options.audio.volume;
|
|
6285
6285
|
this.scriptProcessor = this.getAudioContext().createScriptProcessor(bufferSize, CHANNELS, CHANNELS);
|
|
6286
|
-
this.audioInput.connect(this.scriptProcessor);
|
|
6287
|
-
this.scriptProcessor.connect(this.getAudioContext().destination);
|
|
6288
6286
|
this.audioInput.connect(volume);
|
|
6289
6287
|
volume.connect(this.scriptProcessor);
|
|
6288
|
+
this.scriptProcessor.connect(this.getAudioContext().destination);
|
|
6290
6289
|
}
|
|
6291
6290
|
record(cb) {
|
|
6292
6291
|
this.options.logger.debug("AudioRecorder: record()");
|
package/dist/umd/index.js
CHANGED
|
@@ -10978,7 +10978,7 @@
|
|
|
10978
10978
|
var client = __webpack_require__("Q");
|
|
10979
10979
|
var client_default = /*#__PURE__*/ __webpack_require__.n(client);
|
|
10980
10980
|
var package_namespaceObject = {
|
|
10981
|
-
rE: "
|
|
10981
|
+
rE: "16.0.0"
|
|
10982
10982
|
};
|
|
10983
10983
|
function isAudioEnabled(options) {
|
|
10984
10984
|
return Boolean(options.audio.enabled);
|
|
@@ -15338,7 +15338,7 @@
|
|
|
15338
15338
|
audio: {
|
|
15339
15339
|
enabled: false,
|
|
15340
15340
|
switch: false,
|
|
15341
|
-
volume:
|
|
15341
|
+
volume: 1,
|
|
15342
15342
|
bufferSize: "auto"
|
|
15343
15343
|
},
|
|
15344
15344
|
video: {
|
|
@@ -19012,7 +19012,8 @@
|
|
|
19012
19012
|
const l = this.float32Array.length;
|
|
19013
19013
|
const arr = new Int16Array(l);
|
|
19014
19014
|
this.float32Array.forEach((sample, i)=>{
|
|
19015
|
-
|
|
19015
|
+
const clampedSample = Number.isFinite(sample) ? Math.max(-1, sample) : sample;
|
|
19016
|
+
arr[i] = 0x7fff * Math.min(1, clampedSample);
|
|
19016
19017
|
});
|
|
19017
19018
|
return typedarray_to_buffer(arr);
|
|
19018
19019
|
}
|
|
@@ -19078,10 +19079,9 @@
|
|
|
19078
19079
|
});
|
|
19079
19080
|
volume.gain.value = this.options.audio.volume;
|
|
19080
19081
|
this.scriptProcessor = this.getAudioContext().createScriptProcessor(bufferSize, CHANNELS, CHANNELS);
|
|
19081
|
-
this.audioInput.connect(this.scriptProcessor);
|
|
19082
|
-
this.scriptProcessor.connect(this.getAudioContext().destination);
|
|
19083
19082
|
this.audioInput.connect(volume);
|
|
19084
19083
|
volume.connect(this.scriptProcessor);
|
|
19084
|
+
this.scriptProcessor.connect(this.getAudioContext().destination);
|
|
19085
19085
|
}
|
|
19086
19086
|
record(cb) {
|
|
19087
19087
|
this.options.logger.debug("AudioRecorder: record()");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "videomail-client",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "16.0.0",
|
|
4
4
|
"description": "A wicked npm package to record videos directly in the browser, for Deaf and Sign Language!",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"webcam",
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
},
|
|
67
67
|
"dependencies": {
|
|
68
68
|
"animitter": "3.0.0",
|
|
69
|
-
"audio-sample": "
|
|
69
|
+
"audio-sample": "8.0.1",
|
|
70
70
|
"canvas-to-buffer": "4.1.2",
|
|
71
71
|
"contains": "0.1.1",
|
|
72
72
|
"deepmerge": "4.3.1",
|
|
@@ -101,7 +101,7 @@
|
|
|
101
101
|
"@types/ua-parser-js": "0.7.39",
|
|
102
102
|
"@vitest/eslint-plugin": "1.6.27",
|
|
103
103
|
"audit-ci": "7.1.0",
|
|
104
|
-
"chromatic": "18.12.
|
|
104
|
+
"chromatic": "18.12.1",
|
|
105
105
|
"cross-env": "10.1.0",
|
|
106
106
|
"eslint": "10.12.0",
|
|
107
107
|
"eslint-import-resolver-typescript": "4.4.5",
|