@bendyline/squisq-editor-react 2.11.16 → 2.11.18
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/{chunk-ZDWZRVAY.js → chunk-2XXBDECJ.js} +1 -1
- package/dist/{chunk-DNB32SU2.js → chunk-45NQUR62.js} +1105 -130
- package/dist/{chunk-34FRFDQ6.js → chunk-CGENKHWY.js} +58 -102
- package/dist/chunk-DNEVUOBZ.js +14 -0
- package/dist/chunk-DNJ6HOES.js +93 -0
- package/dist/{chunk-EN5BYZOE.js → chunk-DPAMJV6A.js} +3 -2
- package/dist/{chunk-5TYCTE33.js → chunk-GIXXD2O3.js} +2189 -1834
- package/dist/{chunk-ENDRPV6T.js → chunk-H7YTL6SL.js} +1 -1
- package/dist/chunk-LRZJD5YD.js +107 -0
- package/dist/{chunk-4D7QMRTZ.js → chunk-U6NVT3BY.js} +466 -540
- package/dist/{chunk-WDQFWD7Z.js → chunk-UBFNLWCN.js} +2 -2
- package/dist/{chunk-27WOOJXR.js → chunk-WKZLBGPX.js} +1 -1
- package/dist/dictationSession-PN3OT5LJ.js +521 -0
- package/dist/index.d.ts +36 -21
- package/dist/index.js +54 -22
- package/dist/json-editor/index.js +3 -3
- package/dist/recorder/index.d.ts +2 -2
- package/dist/recorder/index.js +17 -13
- package/dist/{recorder-C6ArYQBa.d.ts → recorder-CRsw0eC7.d.ts} +6 -5
- package/dist/review/index.js +3 -2
- package/dist/shell/index.d.ts +2 -1
- package/dist/shell/index.js +10 -7
- package/dist/{shell-X0EoQbbN.d.ts → shell-Cb0P_ln8.d.ts} +170 -5
- package/dist/speech/index.d.ts +126 -0
- package/dist/speech/index.js +10 -0
- package/dist/styles/index.css +162 -29
- package/dist/teleprompter/index.d.ts +13 -5
- package/dist/teleprompter/index.js +3 -2
- package/dist/{useNarrationStage-DopDr_P5.d.ts → useNarrationStage-vKtk6H-V.d.ts} +7 -1
- package/package.json +10 -6
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
// src/recorder/deviceSettings.ts
|
|
2
|
+
var DEFAULT_RECORDER_DEVICE_SETTINGS = {
|
|
3
|
+
constraintMode: "ideal",
|
|
4
|
+
audio: { deviceId: "" },
|
|
5
|
+
camera: { deviceId: "" },
|
|
6
|
+
screen: {},
|
|
7
|
+
screenAudio: {},
|
|
8
|
+
encoding: {
|
|
9
|
+
audioMimeType: "",
|
|
10
|
+
videoMimeType: ""
|
|
11
|
+
}
|
|
12
|
+
};
|
|
13
|
+
function preferredNumber(value, mode) {
|
|
14
|
+
if (value === void 0 || !Number.isFinite(value) || value <= 0) return void 0;
|
|
15
|
+
return { [mode]: value };
|
|
16
|
+
}
|
|
17
|
+
function preferredInteger(value, mode) {
|
|
18
|
+
if (value === void 0 || !Number.isFinite(value) || value <= 0) return void 0;
|
|
19
|
+
return { [mode]: Math.round(value) };
|
|
20
|
+
}
|
|
21
|
+
function preferredString(value, mode) {
|
|
22
|
+
const trimmed = value?.trim();
|
|
23
|
+
return trimmed ? { [mode]: trimmed } : void 0;
|
|
24
|
+
}
|
|
25
|
+
function buildRecorderAudioConstraints(settings) {
|
|
26
|
+
const { audio, constraintMode } = settings;
|
|
27
|
+
const result = {};
|
|
28
|
+
if (audio.deviceId) result.deviceId = { exact: audio.deviceId };
|
|
29
|
+
const groupId = preferredString(audio.groupId, constraintMode);
|
|
30
|
+
if (groupId) result.groupId = groupId;
|
|
31
|
+
if (audio.autoGainControl !== void 0) result.autoGainControl = audio.autoGainControl;
|
|
32
|
+
if (audio.echoCancellation !== void 0) result.echoCancellation = audio.echoCancellation;
|
|
33
|
+
if (audio.noiseSuppression !== void 0) result.noiseSuppression = audio.noiseSuppression;
|
|
34
|
+
const channelCount = preferredInteger(audio.channelCount, constraintMode);
|
|
35
|
+
const latency = preferredNumber(audio.latency, constraintMode);
|
|
36
|
+
const sampleRate = preferredInteger(audio.sampleRate, constraintMode);
|
|
37
|
+
const sampleSize = preferredInteger(audio.sampleSize, constraintMode);
|
|
38
|
+
if (channelCount) result.channelCount = channelCount;
|
|
39
|
+
if (latency) result.latency = latency;
|
|
40
|
+
if (sampleRate) result.sampleRate = sampleRate;
|
|
41
|
+
if (sampleSize) result.sampleSize = sampleSize;
|
|
42
|
+
return result;
|
|
43
|
+
}
|
|
44
|
+
function buildRecorderCameraConstraints(settings) {
|
|
45
|
+
const { camera, constraintMode } = settings;
|
|
46
|
+
const result = {};
|
|
47
|
+
if (camera.deviceId) result.deviceId = { exact: camera.deviceId };
|
|
48
|
+
const groupId = preferredString(camera.groupId, constraintMode);
|
|
49
|
+
if (groupId) result.groupId = groupId;
|
|
50
|
+
if (camera.backgroundBlur !== void 0) result.backgroundBlur = camera.backgroundBlur;
|
|
51
|
+
const aspectRatio = preferredNumber(camera.aspectRatio, constraintMode);
|
|
52
|
+
const facingMode = preferredString(camera.facingMode, constraintMode);
|
|
53
|
+
const frameRate = preferredNumber(camera.frameRate, constraintMode);
|
|
54
|
+
const height = preferredInteger(camera.height, constraintMode);
|
|
55
|
+
const resizeMode = preferredString(camera.resizeMode, constraintMode);
|
|
56
|
+
const width = preferredInteger(camera.width, constraintMode);
|
|
57
|
+
if (aspectRatio) result.aspectRatio = aspectRatio;
|
|
58
|
+
if (facingMode) result.facingMode = facingMode;
|
|
59
|
+
if (frameRate) result.frameRate = frameRate;
|
|
60
|
+
if (height) result.height = height;
|
|
61
|
+
if (resizeMode) result.resizeMode = resizeMode;
|
|
62
|
+
if (width) result.width = width;
|
|
63
|
+
return result;
|
|
64
|
+
}
|
|
65
|
+
function buildRecorderScreenConstraints(settings) {
|
|
66
|
+
const { screen } = settings;
|
|
67
|
+
const result = {};
|
|
68
|
+
const aspectRatio = preferredNumber(screen.aspectRatio, "ideal");
|
|
69
|
+
const cursor = preferredString(screen.cursor, "ideal");
|
|
70
|
+
const displaySurface = preferredString(screen.displaySurface, "ideal");
|
|
71
|
+
const frameRate = preferredNumber(screen.frameRate, "ideal");
|
|
72
|
+
const height = preferredInteger(screen.height, "ideal");
|
|
73
|
+
const resizeMode = preferredString(screen.resizeMode, "ideal");
|
|
74
|
+
const width = preferredInteger(screen.width, "ideal");
|
|
75
|
+
if (screen.logicalSurface !== void 0) result.logicalSurface = screen.logicalSurface;
|
|
76
|
+
if (aspectRatio) result.aspectRatio = aspectRatio;
|
|
77
|
+
if (cursor) result.cursor = cursor;
|
|
78
|
+
if (displaySurface) result.displaySurface = displaySurface;
|
|
79
|
+
if (frameRate) result.frameRate = frameRate;
|
|
80
|
+
if (height) result.height = height;
|
|
81
|
+
if (resizeMode) result.resizeMode = resizeMode;
|
|
82
|
+
if (width) result.width = width;
|
|
83
|
+
return result;
|
|
84
|
+
}
|
|
85
|
+
function buildRecorderScreenAudioConstraints(settings) {
|
|
86
|
+
const result = {};
|
|
87
|
+
if (settings.screenAudio.restrictOwnAudio !== void 0) {
|
|
88
|
+
result.restrictOwnAudio = settings.screenAudio.restrictOwnAudio;
|
|
89
|
+
}
|
|
90
|
+
if (settings.screenAudio.suppressLocalAudioPlayback !== void 0) {
|
|
91
|
+
result.suppressLocalAudioPlayback = settings.screenAudio.suppressLocalAudioPlayback;
|
|
92
|
+
}
|
|
93
|
+
return result;
|
|
94
|
+
}
|
|
95
|
+
function recorderBitsPerSecond(value) {
|
|
96
|
+
if (value === void 0 || !Number.isFinite(value) || value <= 0) return void 0;
|
|
97
|
+
return Math.round(value * 1e3);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
export {
|
|
101
|
+
DEFAULT_RECORDER_DEVICE_SETTINGS,
|
|
102
|
+
buildRecorderAudioConstraints,
|
|
103
|
+
buildRecorderCameraConstraints,
|
|
104
|
+
buildRecorderScreenConstraints,
|
|
105
|
+
buildRecorderScreenAudioConstraints,
|
|
106
|
+
recorderBitsPerSecond
|
|
107
|
+
};
|