@signalwire/js 4.0.0-rc.1 → 4.0.0-rc.3
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/browser.mjs +1905 -586
- package/dist/browser.mjs.map +1 -1
- package/dist/browser.umd.js +1910 -585
- package/dist/browser.umd.js.map +1 -1
- package/dist/index.cjs +1714 -642
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2360 -1817
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +2360 -1817
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +1637 -571
- package/dist/index.mjs.map +1 -1
- package/dist/operators/index.cjs +1 -1
- package/dist/operators/index.mjs +1 -1
- package/dist/operators-BJ6QW1VP.cjs +1466 -0
- package/dist/operators-BJ6QW1VP.cjs.map +1 -0
- package/dist/operators-BVxi3KpN.mjs +731 -0
- package/dist/operators-BVxi3KpN.mjs.map +1 -0
- package/package.json +1 -1
- package/dist/operators-CX_lCCJm.mjs +0 -478
- package/dist/operators-CX_lCCJm.mjs.map +0 -1
- package/dist/operators-D6a2J1KA.cjs +0 -763
- package/dist/operators-D6a2J1KA.cjs.map +0 -1
|
@@ -0,0 +1,731 @@
|
|
|
1
|
+
import { filter, map, pipe } from "rxjs";
|
|
2
|
+
import log from "loglevel";
|
|
3
|
+
import { filter as filter$1, map as map$1 } from "rxjs/operators";
|
|
4
|
+
|
|
5
|
+
//#region src/core/constants.ts
|
|
6
|
+
const INVITE_VERSION = 1e3;
|
|
7
|
+
const DEFAULT_ICE_CANDIDATE_TIMEOUT_MS = 600;
|
|
8
|
+
const DEFAULT_ICE_GATHERING_TIMEOUT_MS = 6e3;
|
|
9
|
+
const DEFAULT_RECONNECT_CALLS_TIMEOUT_MS = 300 * 1e3;
|
|
10
|
+
const DEFAULT_CONNECTION_TIMEOUT_MS = 1e4;
|
|
11
|
+
/**
|
|
12
|
+
* How long call setup may wait for the network, measured from local media
|
|
13
|
+
* settling until the member id arrives.
|
|
14
|
+
*
|
|
15
|
+
* Local media acquisition is deliberately NOT inside this: a permission prompt
|
|
16
|
+
* or a device picker is human time, and a human may take as long as they like
|
|
17
|
+
* without spending the server's budget. The clock starts when acquisition ends.
|
|
18
|
+
*
|
|
19
|
+
* Must exceed `iceGatheringTimeout + the RPC timeout`, which both run inside it.
|
|
20
|
+
*/
|
|
21
|
+
const DEFAULT_CALL_SIGNALING_TIMEOUT_MS = 12e3;
|
|
22
|
+
/**
|
|
23
|
+
* How long an auxiliary leg (screen share, additional device) may take to
|
|
24
|
+
* connect once its media is in hand.
|
|
25
|
+
*
|
|
26
|
+
* One bound for both: the picker is human time and sits outside it. What remains
|
|
27
|
+
* — offer, ICE, invite, answer, DTLS — is the same work for either leg kind.
|
|
28
|
+
*/
|
|
29
|
+
const DEFAULT_AUX_LEG_CONNECT_TIMEOUT_MS = 15e3;
|
|
30
|
+
const DEFAULT_RECONNECT_DELAY_MIN_MS = 100;
|
|
31
|
+
const DEFAULT_RECONNECT_DELAY_MAX_MS = 3e3;
|
|
32
|
+
const DEFAULT_DEVICE_DEBOUNCE_TIME_MS = 1500;
|
|
33
|
+
const DEFAULT_DEVICE_POLLING_INTERVAL_MS = 0;
|
|
34
|
+
const PREFERENCES_STORAGE_KEY = "sw:preferences";
|
|
35
|
+
/** Scope value that enables automatic token refresh. */
|
|
36
|
+
const SAT_REFRESH_SCOPE = "sat:refresh";
|
|
37
|
+
/** API endpoints for device token operations. */
|
|
38
|
+
const DEVICE_TOKEN_ENDPOINT = "/api/fabric/subscriber/devices/token";
|
|
39
|
+
const DEVICE_REFRESH_ENDPOINT = "/api/fabric/subscriber/devices/refresh";
|
|
40
|
+
/** Default device token TTL in seconds (15 minutes). */
|
|
41
|
+
const DEVICE_TOKEN_DEFAULT_EXPIRE_IN = 900;
|
|
42
|
+
/** Buffer time in milliseconds before expiry to trigger refresh. */
|
|
43
|
+
const DEVICE_TOKEN_REFRESH_BUFFER_MS = 3e4;
|
|
44
|
+
/** Maximum retry attempts for device token refresh on transient failure. */
|
|
45
|
+
const DEVICE_TOKEN_REFRESH_MAX_RETRIES = 3;
|
|
46
|
+
/** Base delay in milliseconds for exponential backoff on refresh retry. */
|
|
47
|
+
const DEVICE_TOKEN_REFRESH_RETRY_BASE_MS = 1e3;
|
|
48
|
+
/** Maximum retry attempts for developer credential refresh on transient failure. */
|
|
49
|
+
const CREDENTIAL_REFRESH_MAX_RETRIES = 5;
|
|
50
|
+
/** Base delay in milliseconds for exponential backoff on credential refresh retry. */
|
|
51
|
+
const CREDENTIAL_REFRESH_RETRY_BASE_MS = 1e3;
|
|
52
|
+
/** Maximum delay in milliseconds for credential refresh backoff. */
|
|
53
|
+
const CREDENTIAL_REFRESH_MAX_DELAY_MS = 3e4;
|
|
54
|
+
/** Buffer in milliseconds before token expiry to trigger refresh. */
|
|
55
|
+
const CREDENTIAL_REFRESH_BUFFER_MS = 5e3;
|
|
56
|
+
/**
|
|
57
|
+
* Clock-skew allowance (ms) for treating an in-memory credential as expired
|
|
58
|
+
* when deciding whether a fresh (re)connect must re-mint the token before
|
|
59
|
+
* authenticating. A token within this window of its `expiry_at` is treated as
|
|
60
|
+
* stale so the reconnect re-mints via the credential provider instead of
|
|
61
|
+
* replaying a dead token (which the server rejects with -32003).
|
|
62
|
+
*/
|
|
63
|
+
const CREDENTIAL_EXPIRY_SKEW_MS = 3e4;
|
|
64
|
+
/**
|
|
65
|
+
* Maximum time the coordinator will wait for `DeviceTokenManager.activate()`
|
|
66
|
+
* to resolve before treating the activation as failed and falling back to
|
|
67
|
+
* the developer-provided refresh path. Prevents a wedged HTTP layer from
|
|
68
|
+
* leaving the session with no active refresh mechanism.
|
|
69
|
+
*/
|
|
70
|
+
const CREDENTIAL_ACTIVATE_TIMEOUT_MS = 3e4;
|
|
71
|
+
/** JSON-RPC error code for requester validation failure (corrupted auth state). */
|
|
72
|
+
const RPC_ERROR_REQUESTER_VALIDATION_FAILED = -32003;
|
|
73
|
+
/** JSON-RPC error code for invalid params (e.g., missing authentication block). */
|
|
74
|
+
const RPC_ERROR_INVALID_PARAMS = -32602;
|
|
75
|
+
/** JSON-RPC error code for authentication failure (invalid token, missing DPoP, etc.). */
|
|
76
|
+
const RPC_ERROR_AUTHENTICATION_FAILED = -32002;
|
|
77
|
+
/** Error names browsers use for a media permission denial (user or policy). */
|
|
78
|
+
const MEDIA_ACCESS_DENIAL_NAMES = [
|
|
79
|
+
"NotAllowedError",
|
|
80
|
+
"SecurityError",
|
|
81
|
+
"PermissionDeniedError"
|
|
82
|
+
];
|
|
83
|
+
/** Error names browsers use when the capture hardware is already held exclusively. */
|
|
84
|
+
const MEDIA_DEVICE_IN_USE_NAMES = ["NotReadableError", "TrackStartError"];
|
|
85
|
+
/** Default polling interval for RTCPeerConnection.getStats() in milliseconds. */
|
|
86
|
+
const DEFAULT_STATS_POLLING_INTERVAL_MS = 1e3;
|
|
87
|
+
/** Number of initial samples used to build a baseline for spike detection. */
|
|
88
|
+
const DEFAULT_STATS_BASELINE_SAMPLES = 10;
|
|
89
|
+
/** Duration in ms with no inbound audio packets before emitting a critical issue. */
|
|
90
|
+
const DEFAULT_STATS_NO_PACKET_THRESHOLD_MS = 2e3;
|
|
91
|
+
/** Multiplier applied to baseline RTT to detect a warning-level RTT spike. */
|
|
92
|
+
const DEFAULT_STATS_RTT_SPIKE_MULTIPLIER = 3;
|
|
93
|
+
/** Packet loss fraction (0-1) above which a warning is emitted. */
|
|
94
|
+
const DEFAULT_STATS_PACKET_LOSS_THRESHOLD = .05;
|
|
95
|
+
/** Multiplier applied to baseline jitter to detect a jitter spike. */
|
|
96
|
+
const DEFAULT_STATS_JITTER_SPIKE_MULTIPLIER = 4;
|
|
97
|
+
/** Number of seconds of metrics history to retain. */
|
|
98
|
+
const DEFAULT_STATS_HISTORY_SIZE = 30;
|
|
99
|
+
/** Maximum keyframe requests allowed within a single burst window. */
|
|
100
|
+
const DEFAULT_KEYFRAME_MAX_BURST = 3;
|
|
101
|
+
/** Duration of the keyframe burst window in milliseconds. */
|
|
102
|
+
const DEFAULT_KEYFRAME_BURST_WINDOW_MS = 3e3;
|
|
103
|
+
/** Cooldown period in ms after burst limit is reached before allowing more keyframes. */
|
|
104
|
+
const DEFAULT_KEYFRAME_COOLDOWN_MS = 1e4;
|
|
105
|
+
/** Minimum time between re-INVITE attempts in milliseconds. */
|
|
106
|
+
const DEFAULT_REINVITE_DEBOUNCE_TIME_MS = 1e4;
|
|
107
|
+
/** Maximum number of re-INVITE attempts per call. */
|
|
108
|
+
const DEFAULT_REINVITE_MAX_ATTEMPTS = 3;
|
|
109
|
+
/** Timeout for a single re-INVITE attempt in milliseconds. */
|
|
110
|
+
const DEFAULT_REINVITE_TIMEOUT_MS = 5e3;
|
|
111
|
+
/** Debounce window in ms to collapse multiple detection signals into one trigger. */
|
|
112
|
+
const DEFAULT_RECOVERY_DEBOUNCE_TIME_MS = 2e3;
|
|
113
|
+
/** Cooldown period in ms between recovery attempts. */
|
|
114
|
+
const DEFAULT_RECOVERY_COOLDOWN_MS = 1e4;
|
|
115
|
+
/** Grace period in ms before treating ICE 'disconnected' as a failure. */
|
|
116
|
+
const DEFAULT_ICE_DISCONNECTED_GRACE_PERIOD_MS = 3e3;
|
|
117
|
+
/** Timeout for a single ICE restart attempt in milliseconds. */
|
|
118
|
+
const DEFAULT_ICE_RESTART_TIMEOUT_MS = 5e3;
|
|
119
|
+
/** Maximum recovery attempts before emitting 'max_attempts_reached'. */
|
|
120
|
+
const DEFAULT_MAX_RECOVERY_ATTEMPTS = 3;
|
|
121
|
+
/** Upper bound in ms for waiting on iceGatheringState === 'complete' after an ICE restart. */
|
|
122
|
+
const ICE_GATHERING_COMPLETE_TIMEOUT_MS = 1e4;
|
|
123
|
+
/** Upper bound in ms for waiting on RTCPeerConnection.connectionState === 'connected' after a recovery ICE restart. */
|
|
124
|
+
const PEER_CONNECTION_RECOVERY_WAIT_MS = 5e3;
|
|
125
|
+
/** Polling interval in ms while waiting for RTCPeerConnection.connectionState to transition. */
|
|
126
|
+
const PEER_CONNECTION_RECOVERY_POLL_MS = 100;
|
|
127
|
+
/** Polling interval for LocalAudioPipeline.level$ (ms). ~30fps is smooth for meters. */
|
|
128
|
+
const AUDIO_LEVEL_POLL_INTERVAL_MS = 33;
|
|
129
|
+
/** RMS level threshold (0..1) above which the local participant is considered speaking. */
|
|
130
|
+
const VAD_THRESHOLD = .03;
|
|
131
|
+
/** Hold window in ms below the threshold before speaking$ flips back to false. */
|
|
132
|
+
const VAD_HOLD_MS = 250;
|
|
133
|
+
/** Whether to persist device selections to storage by default. */
|
|
134
|
+
const DEFAULT_PERSIST_DEVICE_SELECTION = true;
|
|
135
|
+
/** Whether to auto-apply device changes to active calls by default. */
|
|
136
|
+
const DEFAULT_SYNC_DEVICES_TO_ACTIVE_CALLS = true;
|
|
137
|
+
/** Storage keys for persisted device selections. */
|
|
138
|
+
const DEVICE_STORAGE_KEY_AUDIO_INPUT = "sw:device:audioinput";
|
|
139
|
+
const DEVICE_STORAGE_KEY_AUDIO_OUTPUT = "sw:device:audiooutput";
|
|
140
|
+
const DEVICE_STORAGE_KEY_VIDEO_INPUT = "sw:device:videoinput";
|
|
141
|
+
/** Whether to auto-mute video when the tab becomes hidden. */
|
|
142
|
+
const DEFAULT_AUTO_MUTE_VIDEO_ON_HIDDEN = false;
|
|
143
|
+
/** Whether to re-enumerate devices when the page becomes visible. */
|
|
144
|
+
const DEFAULT_REFRESH_DEVICES_ON_VISIBLE = true;
|
|
145
|
+
/** Whether to check peer connection health when the page becomes visible. */
|
|
146
|
+
const DEFAULT_CHECK_CONNECTION_ON_VISIBLE = true;
|
|
147
|
+
/** Whether automatic video degradation on low bandwidth is enabled. */
|
|
148
|
+
const DEFAULT_ENABLE_AUTO_DEGRADATION = true;
|
|
149
|
+
/** Bitrate in kbps below which video is automatically disabled. */
|
|
150
|
+
const DEFAULT_DEGRADATION_BITRATE_THRESHOLD_KBPS = 150;
|
|
151
|
+
/** Bitrate in kbps above which video is automatically re-enabled (hysteresis). */
|
|
152
|
+
const DEFAULT_DEGRADATION_RECOVERY_THRESHOLD_KBPS = 300;
|
|
153
|
+
/** Whether relay-only escalation is enabled as a last-resort recovery tier. */
|
|
154
|
+
const DEFAULT_ENABLE_RELAY_FALLBACK = true;
|
|
155
|
+
/** Whether to listen for browser online/offline/connection events. */
|
|
156
|
+
const DEFAULT_ENABLE_NETWORK_CHANGE_DETECTION = true;
|
|
157
|
+
/** Whether to intercept server-sent media-timeout hangups and attempt recovery. */
|
|
158
|
+
const DEFAULT_ENABLE_SERVER_HANGUP_INTERCEPTION = true;
|
|
159
|
+
/** Default video track constraints applied when video is enabled without explicit constraints. */
|
|
160
|
+
const DEFAULT_VIDEO_CONSTRAINTS = {
|
|
161
|
+
width: { ideal: 1280 },
|
|
162
|
+
height: { ideal: 720 },
|
|
163
|
+
aspectRatio: 16 / 9
|
|
164
|
+
};
|
|
165
|
+
/** Whether stereo Opus is enabled by default. */
|
|
166
|
+
const DEFAULT_STEREO_AUDIO = false;
|
|
167
|
+
/** Max average bitrate for stereo Opus in bits per second. */
|
|
168
|
+
const DEFAULT_STEREO_MAX_AVERAGE_BITRATE = 51e4;
|
|
169
|
+
|
|
170
|
+
//#endregion
|
|
171
|
+
//#region src/core/errors.ts
|
|
172
|
+
var UnexpectedError = class extends Error {
|
|
173
|
+
constructor(at, options) {
|
|
174
|
+
super(`Unexpected Error${at ? ` at ${at}` : ""}`, options);
|
|
175
|
+
this.at = at;
|
|
176
|
+
this.name = "UnexpectedError";
|
|
177
|
+
}
|
|
178
|
+
};
|
|
179
|
+
var UnimplementedError = class extends Error {
|
|
180
|
+
constructor(reason = "Not Implemented", options) {
|
|
181
|
+
super(reason, options);
|
|
182
|
+
this.reason = reason;
|
|
183
|
+
this.name = "UnimplementedError";
|
|
184
|
+
}
|
|
185
|
+
};
|
|
186
|
+
var InvalidCredentialsError = class extends Error {
|
|
187
|
+
constructor(reason = "Invalid Credentials", options) {
|
|
188
|
+
super(reason, options);
|
|
189
|
+
this.reason = reason;
|
|
190
|
+
this.name = "InvalidCredentialsError";
|
|
191
|
+
}
|
|
192
|
+
};
|
|
193
|
+
var WebSocketConnectionError = class extends Error {
|
|
194
|
+
constructor(message, options) {
|
|
195
|
+
super(message, options);
|
|
196
|
+
this.name = "WebSocketConnectionError";
|
|
197
|
+
}
|
|
198
|
+
};
|
|
199
|
+
var TransportConnectionError = class extends Error {
|
|
200
|
+
constructor(message, options) {
|
|
201
|
+
super(message, options);
|
|
202
|
+
this.name = "TransportConnectionError";
|
|
203
|
+
}
|
|
204
|
+
};
|
|
205
|
+
var WebSocketTimeoutError = class extends Error {
|
|
206
|
+
constructor(message, options) {
|
|
207
|
+
super(message, options);
|
|
208
|
+
this.name = "WebSocketTimeoutError";
|
|
209
|
+
}
|
|
210
|
+
};
|
|
211
|
+
var RequestTimeoutError = class extends Error {
|
|
212
|
+
constructor(message, options) {
|
|
213
|
+
super(message, options);
|
|
214
|
+
this.name = "RequestTimeoutError";
|
|
215
|
+
}
|
|
216
|
+
};
|
|
217
|
+
var RequestError = class extends Error {
|
|
218
|
+
constructor(message, options) {
|
|
219
|
+
super(message, options);
|
|
220
|
+
this.name = "RequestError";
|
|
221
|
+
}
|
|
222
|
+
};
|
|
223
|
+
var RPCTimeoutError = class extends Error {
|
|
224
|
+
constructor(requestId, timeoutMs, options) {
|
|
225
|
+
super(`RPC request ${requestId} timed out after ${timeoutMs}ms`, options);
|
|
226
|
+
this.requestId = requestId;
|
|
227
|
+
this.timeoutMs = timeoutMs;
|
|
228
|
+
this.name = "RPCTimeoutError";
|
|
229
|
+
}
|
|
230
|
+
};
|
|
231
|
+
var AuthStateHandlerError = class extends Error {
|
|
232
|
+
constructor(error = null, options) {
|
|
233
|
+
super("Error handling authorization state update", {
|
|
234
|
+
...options,
|
|
235
|
+
cause: options?.cause ?? (error instanceof Error ? error : void 0)
|
|
236
|
+
});
|
|
237
|
+
this.error = error;
|
|
238
|
+
this.name = "AuthStateHandlerError";
|
|
239
|
+
}
|
|
240
|
+
};
|
|
241
|
+
var StorageNotAvailableError = class extends Error {
|
|
242
|
+
constructor(storageType = "localStorage", options) {
|
|
243
|
+
super(`${storageType} is not available in this environment`, options);
|
|
244
|
+
this.storageType = storageType;
|
|
245
|
+
this.name = "StorageNotAvailableError";
|
|
246
|
+
}
|
|
247
|
+
};
|
|
248
|
+
var SerializationError = class extends Error {
|
|
249
|
+
constructor(key, originalError) {
|
|
250
|
+
super(`Failed to serialize value for key "${key}": ${originalError.message}`, { cause: originalError });
|
|
251
|
+
this.key = key;
|
|
252
|
+
this.originalError = originalError;
|
|
253
|
+
this.name = "SerializationError";
|
|
254
|
+
}
|
|
255
|
+
};
|
|
256
|
+
var DeserializationError = class extends Error {
|
|
257
|
+
constructor(key, originalError) {
|
|
258
|
+
super(`Failed to deserialize value for key "${key}": ${originalError.message}`, { cause: originalError });
|
|
259
|
+
this.key = key;
|
|
260
|
+
this.originalError = originalError;
|
|
261
|
+
this.name = "DeserializationError";
|
|
262
|
+
}
|
|
263
|
+
};
|
|
264
|
+
var StorageWriteError = class extends Error {
|
|
265
|
+
constructor(key, originalError) {
|
|
266
|
+
super(`Failed to write to storage for key "${key}": ${originalError.message}`, { cause: originalError });
|
|
267
|
+
this.key = key;
|
|
268
|
+
this.originalError = originalError;
|
|
269
|
+
this.name = "StorageWriteError";
|
|
270
|
+
}
|
|
271
|
+
};
|
|
272
|
+
var StorageReadError = class extends Error {
|
|
273
|
+
constructor(key, originalError) {
|
|
274
|
+
super(`Failed to read from storage "${key}": ${originalError.message}`, { cause: originalError });
|
|
275
|
+
this.key = key;
|
|
276
|
+
this.originalError = originalError;
|
|
277
|
+
this.name = "StorageReadError";
|
|
278
|
+
}
|
|
279
|
+
};
|
|
280
|
+
var DependencyError = class extends Error {
|
|
281
|
+
constructor(description, options) {
|
|
282
|
+
super(`Dependency ${description} is not set or available.`, options);
|
|
283
|
+
this.description = description;
|
|
284
|
+
this.name = "DependencyError";
|
|
285
|
+
}
|
|
286
|
+
};
|
|
287
|
+
var CallCreateError = class extends Error {
|
|
288
|
+
constructor(message, error = null, direction = "outbound", options) {
|
|
289
|
+
super(message, {
|
|
290
|
+
...options,
|
|
291
|
+
cause: options?.cause ?? (error instanceof Error ? error : void 0)
|
|
292
|
+
});
|
|
293
|
+
this.message = message;
|
|
294
|
+
this.error = error;
|
|
295
|
+
this.direction = direction;
|
|
296
|
+
this.name = "CallCreateError";
|
|
297
|
+
}
|
|
298
|
+
};
|
|
299
|
+
var CallNotReadyError = class extends Error {
|
|
300
|
+
constructor(callId, options) {
|
|
301
|
+
super(`Call "${callId}" has no self member context yet: selfId/nodeId have not been received from the server`, options);
|
|
302
|
+
this.callId = callId;
|
|
303
|
+
this.name = "CallNotReadyError";
|
|
304
|
+
}
|
|
305
|
+
};
|
|
306
|
+
var ParticipantNotReadyError = class extends Error {
|
|
307
|
+
constructor(memberId, options) {
|
|
308
|
+
super(`Participant "${memberId}" has no call context yet: its member state (call_id/node_id) has not been received from the server`, options);
|
|
309
|
+
this.memberId = memberId;
|
|
310
|
+
this.name = "ParticipantNotReadyError";
|
|
311
|
+
}
|
|
312
|
+
};
|
|
313
|
+
var JSONRPCError = class extends Error {
|
|
314
|
+
constructor(code, message, data, options, requestId) {
|
|
315
|
+
super(message, options);
|
|
316
|
+
this.code = code;
|
|
317
|
+
this.data = data;
|
|
318
|
+
this.requestId = requestId;
|
|
319
|
+
this.name = "JSONRPCError";
|
|
320
|
+
}
|
|
321
|
+
};
|
|
322
|
+
var InvalidParams = class extends Error {
|
|
323
|
+
constructor(message, options) {
|
|
324
|
+
super(message, options);
|
|
325
|
+
this.message = message;
|
|
326
|
+
this.name = "InvalidParams";
|
|
327
|
+
}
|
|
328
|
+
};
|
|
329
|
+
var ConversationError = class extends Error {
|
|
330
|
+
constructor(message, options) {
|
|
331
|
+
super(message, options);
|
|
332
|
+
this.message = message;
|
|
333
|
+
this.name = "ConversationError";
|
|
334
|
+
}
|
|
335
|
+
};
|
|
336
|
+
var VertoInviteHandlerError = class extends Error {
|
|
337
|
+
constructor(error = null, options) {
|
|
338
|
+
super("Error handling Verto invite", {
|
|
339
|
+
...options,
|
|
340
|
+
cause: options?.cause ?? (error instanceof Error ? error : void 0)
|
|
341
|
+
});
|
|
342
|
+
this.error = error;
|
|
343
|
+
this.name = "VertoInviteHandlerError";
|
|
344
|
+
}
|
|
345
|
+
};
|
|
346
|
+
var VertoAttachHandlerError = class extends Error {
|
|
347
|
+
constructor(error = null, options) {
|
|
348
|
+
super("Error handling Verto attach", {
|
|
349
|
+
...options,
|
|
350
|
+
cause: options?.cause ?? (error instanceof Error ? error : void 0)
|
|
351
|
+
});
|
|
352
|
+
this.error = error;
|
|
353
|
+
this.name = "VertoAttachHandlerError";
|
|
354
|
+
}
|
|
355
|
+
};
|
|
356
|
+
var ValidationError = class extends Error {
|
|
357
|
+
constructor(message, options) {
|
|
358
|
+
super(message, options);
|
|
359
|
+
this.name = "ValidationError";
|
|
360
|
+
}
|
|
361
|
+
};
|
|
362
|
+
var VertoPongError = class extends Error {
|
|
363
|
+
constructor(originalError) {
|
|
364
|
+
super("Failed to send Verto pong - call may disconnect", { cause: originalError instanceof Error ? originalError : void 0 });
|
|
365
|
+
this.originalError = originalError;
|
|
366
|
+
this.name = "VertoPongError";
|
|
367
|
+
}
|
|
368
|
+
};
|
|
369
|
+
var MessageParseError = class extends Error {
|
|
370
|
+
constructor(originalError) {
|
|
371
|
+
super("Failed to parse incoming WebSocket message", { cause: originalError instanceof Error ? originalError : void 0 });
|
|
372
|
+
this.originalError = originalError;
|
|
373
|
+
this.name = "MessageParseError";
|
|
374
|
+
}
|
|
375
|
+
};
|
|
376
|
+
var CollectionFetchError = class extends Error {
|
|
377
|
+
constructor(operation, originalError) {
|
|
378
|
+
super(`Collection fetch failed during ${operation}`, { cause: originalError instanceof Error ? originalError : void 0 });
|
|
379
|
+
this.operation = operation;
|
|
380
|
+
this.originalError = originalError;
|
|
381
|
+
this.name = "CollectionFetchError";
|
|
382
|
+
}
|
|
383
|
+
};
|
|
384
|
+
/**
|
|
385
|
+
* An auxiliary leg did not connect within its budget. Typed rather than a bare
|
|
386
|
+
* RxJS `TimeoutError` so the leg and cause survive.
|
|
387
|
+
*/
|
|
388
|
+
var AuxiliaryLegTimeoutError = class extends Error {
|
|
389
|
+
constructor(leg, originalError) {
|
|
390
|
+
super(`Timed out waiting for the ${leg} connection to be established`, { cause: originalError });
|
|
391
|
+
this.leg = leg;
|
|
392
|
+
this.originalError = originalError;
|
|
393
|
+
this.name = "AuxiliaryLegTimeoutError";
|
|
394
|
+
}
|
|
395
|
+
};
|
|
396
|
+
/**
|
|
397
|
+
* An auxiliary leg was removed before it finished connecting.
|
|
398
|
+
*
|
|
399
|
+
* Typed rather than a bare resolve so a caller awaiting the start can tell a
|
|
400
|
+
* cancel apart from a share that actually came up — the public methods return
|
|
401
|
+
* `void`, so the promise is the only signal they have.
|
|
402
|
+
*/
|
|
403
|
+
var AuxiliaryLegCancelledError = class extends Error {
|
|
404
|
+
constructor(leg) {
|
|
405
|
+
super(`The ${leg} leg was removed before it finished connecting`);
|
|
406
|
+
this.leg = leg;
|
|
407
|
+
this.name = "AuxiliaryLegCancelledError";
|
|
408
|
+
}
|
|
409
|
+
};
|
|
410
|
+
var MediaTrackError = class extends Error {
|
|
411
|
+
constructor(operation, kind, originalError) {
|
|
412
|
+
super(`Media track ${operation} failed for ${kind}`, { cause: originalError instanceof Error ? originalError : void 0 });
|
|
413
|
+
this.operation = operation;
|
|
414
|
+
this.kind = kind;
|
|
415
|
+
this.originalError = originalError;
|
|
416
|
+
this.name = "MediaTrackError";
|
|
417
|
+
}
|
|
418
|
+
};
|
|
419
|
+
/** True when a `getUserMedia`/`getDisplayMedia` rejection is a permission denial. */
|
|
420
|
+
function isMediaAccessDenial(originalError) {
|
|
421
|
+
return originalError instanceof Error && MEDIA_ACCESS_DENIAL_NAMES.includes(originalError.name);
|
|
422
|
+
}
|
|
423
|
+
/** True when a `getUserMedia` rejection means the hardware is already held exclusively. */
|
|
424
|
+
function isMediaDeviceInUse(originalError) {
|
|
425
|
+
return originalError instanceof Error && MEDIA_DEVICE_IN_USE_NAMES.includes(originalError.name);
|
|
426
|
+
}
|
|
427
|
+
/**
|
|
428
|
+
* Failure to acquire local media (camera, microphone, or screen capture)
|
|
429
|
+
* via `getUserMedia`/`getDisplayMedia`.
|
|
430
|
+
*
|
|
431
|
+
* Non-fatal by default: screenshare and additional-device failures never
|
|
432
|
+
* end the call, and main-connection failures degrade to receive-only when
|
|
433
|
+
* possible. The wrapping site sets `fatal` to `true` only when the call
|
|
434
|
+
* cannot continue (receive-only fallback disabled or no receive intent).
|
|
435
|
+
*/
|
|
436
|
+
var MediaAccessError = class extends Error {
|
|
437
|
+
constructor(operation, media, originalError, fatal = false) {
|
|
438
|
+
super(`Media access ${isMediaAccessDenial(originalError) ? "denied" : "failed"} for ${operation} (${media})`, { cause: originalError instanceof Error ? originalError : void 0 });
|
|
439
|
+
this.operation = operation;
|
|
440
|
+
this.media = media;
|
|
441
|
+
this.originalError = originalError;
|
|
442
|
+
this.fatal = fatal;
|
|
443
|
+
this.name = "MediaAccessError";
|
|
444
|
+
}
|
|
445
|
+
/** True when the underlying failure is a permission denial (user or policy). */
|
|
446
|
+
get denied() {
|
|
447
|
+
return isMediaAccessDenial(this.originalError);
|
|
448
|
+
}
|
|
449
|
+
};
|
|
450
|
+
/**
|
|
451
|
+
* Thrown by `startScreenShare()` when the call is already sharing a screen.
|
|
452
|
+
*
|
|
453
|
+
* A call carries at most one screen share. Accepting a second one would
|
|
454
|
+
* overwrite the only reference the SDK holds to the first, leaving it
|
|
455
|
+
* capturing and sending with no way to stop it — so the second request is
|
|
456
|
+
* rejected and the live share is left untouched. Call `stopScreenShare()`
|
|
457
|
+
* first to replace it.
|
|
458
|
+
*/
|
|
459
|
+
var ScreenShareAlreadyActiveError = class extends Error {
|
|
460
|
+
constructor(screenShareId, options) {
|
|
461
|
+
super(`A screen share is already active on this call (${screenShareId}). Call stopScreenShare() before starting another one.`, options);
|
|
462
|
+
this.screenShareId = screenShareId;
|
|
463
|
+
this.name = "ScreenShareAlreadyActiveError";
|
|
464
|
+
}
|
|
465
|
+
};
|
|
466
|
+
var DPoPInitError = class extends Error {
|
|
467
|
+
constructor(originalError, message = "Failed to initialize DPoP key pair") {
|
|
468
|
+
super(message, { cause: originalError instanceof Error ? originalError : void 0 });
|
|
469
|
+
this.originalError = originalError;
|
|
470
|
+
this.name = "DPoPInitError";
|
|
471
|
+
}
|
|
472
|
+
};
|
|
473
|
+
/**
|
|
474
|
+
* Error thrown when a recovery attempt fails.
|
|
475
|
+
*
|
|
476
|
+
* Carries the recovery action and attempt number for diagnostic purposes.
|
|
477
|
+
*/
|
|
478
|
+
var RecoveryError = class extends Error {
|
|
479
|
+
constructor(action, attempt, originalError) {
|
|
480
|
+
super(`Recovery failed: ${action} (attempt ${attempt})`, { cause: originalError instanceof Error ? originalError : void 0 });
|
|
481
|
+
this.action = action;
|
|
482
|
+
this.attempt = attempt;
|
|
483
|
+
this.originalError = originalError;
|
|
484
|
+
this.name = "RecoveryError";
|
|
485
|
+
}
|
|
486
|
+
};
|
|
487
|
+
/**
|
|
488
|
+
* Error thrown when getUserMedia fails with OverconstrainedError
|
|
489
|
+
* and all fallback levels have been exhausted.
|
|
490
|
+
*/
|
|
491
|
+
var OverconstrainedFallbackError = class extends Error {
|
|
492
|
+
constructor(deviceKind, originalError) {
|
|
493
|
+
super(`All constraint fallback levels exhausted for ${deviceKind}`, { cause: originalError instanceof Error ? originalError : void 0 });
|
|
494
|
+
this.deviceKind = deviceKind;
|
|
495
|
+
this.originalError = originalError;
|
|
496
|
+
this.name = "OverconstrainedFallbackError";
|
|
497
|
+
}
|
|
498
|
+
};
|
|
499
|
+
/**
|
|
500
|
+
* Error thrown when the preflight connectivity test fails.
|
|
501
|
+
*/
|
|
502
|
+
var PreflightError = class extends Error {
|
|
503
|
+
constructor(phase, originalError) {
|
|
504
|
+
super(`Preflight test failed during ${phase}`, { cause: originalError instanceof Error ? originalError : void 0 });
|
|
505
|
+
this.phase = phase;
|
|
506
|
+
this.originalError = originalError;
|
|
507
|
+
this.name = "PreflightError";
|
|
508
|
+
}
|
|
509
|
+
};
|
|
510
|
+
var DeviceTokenError = class extends Error {
|
|
511
|
+
constructor(message, originalError) {
|
|
512
|
+
super(message, { cause: originalError instanceof Error ? originalError : void 0 });
|
|
513
|
+
this.originalError = originalError;
|
|
514
|
+
this.name = "DeviceTokenError";
|
|
515
|
+
}
|
|
516
|
+
};
|
|
517
|
+
var TokenRefreshError = class extends Error {
|
|
518
|
+
constructor(message, originalError) {
|
|
519
|
+
super(message, { cause: originalError instanceof Error ? originalError : void 0 });
|
|
520
|
+
this.originalError = originalError;
|
|
521
|
+
this.name = "TokenRefreshError";
|
|
522
|
+
}
|
|
523
|
+
};
|
|
524
|
+
|
|
525
|
+
//#endregion
|
|
526
|
+
//#region src/utils/logger.ts
|
|
527
|
+
const datetime = () => (/* @__PURE__ */ new Date()).toISOString();
|
|
528
|
+
const defaultLogger = log.getLogger("signalwire");
|
|
529
|
+
const originalFactory = defaultLogger.methodFactory;
|
|
530
|
+
defaultLogger.methodFactory = (methodName, logLevel, loggerName) => {
|
|
531
|
+
const rawMethod = originalFactory(methodName, logLevel, loggerName);
|
|
532
|
+
return function(...args) {
|
|
533
|
+
const prefixed = [
|
|
534
|
+
datetime(),
|
|
535
|
+
"-",
|
|
536
|
+
...args
|
|
537
|
+
];
|
|
538
|
+
rawMethod.apply(void 0, prefixed);
|
|
539
|
+
};
|
|
540
|
+
};
|
|
541
|
+
const defaultLoggerLevel = defaultLogger.levels.WARN;
|
|
542
|
+
defaultLogger.setLevel(defaultLoggerLevel);
|
|
543
|
+
let userLogger = null;
|
|
544
|
+
/** Replace the built-in logger with a custom implementation. Pass `null` to restore defaults. */
|
|
545
|
+
const setLogger = (logger$1) => {
|
|
546
|
+
userLogger = logger$1;
|
|
547
|
+
};
|
|
548
|
+
let debugOptions = {};
|
|
549
|
+
/** Configure debug options (e.g., `{ logWsTraffic: true }`). */
|
|
550
|
+
const setDebugOptions = (options) => {
|
|
551
|
+
if (options == null) {
|
|
552
|
+
debugOptions = {};
|
|
553
|
+
return;
|
|
554
|
+
}
|
|
555
|
+
debugOptions = {
|
|
556
|
+
...debugOptions,
|
|
557
|
+
...options
|
|
558
|
+
};
|
|
559
|
+
};
|
|
560
|
+
/**
|
|
561
|
+
* Set the log level for the built-in logger.
|
|
562
|
+
* Has no effect when a custom logger is set via `setLogger()`.
|
|
563
|
+
*/
|
|
564
|
+
const setLogLevel = (level) => {
|
|
565
|
+
defaultLogger.setLevel(level);
|
|
566
|
+
};
|
|
567
|
+
const getLoggerInstance = () => {
|
|
568
|
+
return userLogger ?? defaultLogger;
|
|
569
|
+
};
|
|
570
|
+
const shouldStringify = (payload) => {
|
|
571
|
+
if (payload != null && typeof payload === "object" && "method" in payload) return payload.method !== "signalwire.ping";
|
|
572
|
+
return true;
|
|
573
|
+
};
|
|
574
|
+
const wsTraffic = (options) => {
|
|
575
|
+
const { logWsTraffic } = debugOptions;
|
|
576
|
+
if (!logWsTraffic) return;
|
|
577
|
+
const loggerInstance = getLoggerInstance();
|
|
578
|
+
let payload;
|
|
579
|
+
if ("raw" in options) try {
|
|
580
|
+
payload = JSON.parse(options.raw);
|
|
581
|
+
} catch {
|
|
582
|
+
loggerInstance.debug(`[WebSocket] ${options.type.toUpperCase()}: non-JSON message`);
|
|
583
|
+
return;
|
|
584
|
+
}
|
|
585
|
+
else ({payload} = options);
|
|
586
|
+
const msg = shouldStringify(payload) ? JSON.stringify(payload, null, 2) : payload;
|
|
587
|
+
loggerInstance.debug(`${options.type.toUpperCase()}: \n`, msg, "\n");
|
|
588
|
+
};
|
|
589
|
+
const getLogger = () => {
|
|
590
|
+
const logger$1 = getLoggerInstance();
|
|
591
|
+
return new Proxy(logger$1, { get(_target, prop, _receiver) {
|
|
592
|
+
if (prop === "wsTraffic") return wsTraffic;
|
|
593
|
+
const instance = getLoggerInstance();
|
|
594
|
+
const value = Reflect.get(instance, prop);
|
|
595
|
+
if (typeof value === "function") return value.bind(instance);
|
|
596
|
+
return value;
|
|
597
|
+
} });
|
|
598
|
+
};
|
|
599
|
+
|
|
600
|
+
//#endregion
|
|
601
|
+
//#region src/operators/filterNull.ts
|
|
602
|
+
/**
|
|
603
|
+
* RxJS operator that filters out `null` and `undefined` values with type narrowing.
|
|
604
|
+
*
|
|
605
|
+
* @example
|
|
606
|
+
* ```ts
|
|
607
|
+
* source$.pipe(filterNull()).subscribe(value => {
|
|
608
|
+
* // value is guaranteed non-null
|
|
609
|
+
* });
|
|
610
|
+
* ```
|
|
611
|
+
*/
|
|
612
|
+
function filterNull() {
|
|
613
|
+
return filter((value) => value != null);
|
|
614
|
+
}
|
|
615
|
+
|
|
616
|
+
//#endregion
|
|
617
|
+
//#region src/utils/getValueFrom.ts
|
|
618
|
+
const getValueFrom = (obj, path, defaultValue) => {
|
|
619
|
+
const keys = path.split(".");
|
|
620
|
+
let result = obj;
|
|
621
|
+
for (const key of keys) if (result && typeof result === "object" && key in result) result = result[key];
|
|
622
|
+
else return defaultValue;
|
|
623
|
+
return result === void 0 ? defaultValue : result;
|
|
624
|
+
};
|
|
625
|
+
|
|
626
|
+
//#endregion
|
|
627
|
+
//#region src/operators/filterEventAs.ts
|
|
628
|
+
/**
|
|
629
|
+
* RxJS operator that filters events based on a predicate and maps matching events.
|
|
630
|
+
*
|
|
631
|
+
* This operator combines filter and map operations:
|
|
632
|
+
* 1. Only events that match the predicate are emitted
|
|
633
|
+
* 2. Matching events are transformed using the map function
|
|
634
|
+
*
|
|
635
|
+
* @template TInput - The type of input events
|
|
636
|
+
* @template TOutput - The type of output after mapping
|
|
637
|
+
* @param predicate - Function to test each event. Returns true to include the event.
|
|
638
|
+
* @param mapFn - Function to transform matching events
|
|
639
|
+
* @returns An operator function that filters and maps events
|
|
640
|
+
*
|
|
641
|
+
* @example
|
|
642
|
+
* ```typescript
|
|
643
|
+
* interface CallEvent {
|
|
644
|
+
* type: 'call.started' | 'call.ended';
|
|
645
|
+
* id: string;
|
|
646
|
+
* timestamp: number;
|
|
647
|
+
* }
|
|
648
|
+
*
|
|
649
|
+
* events$.pipe(
|
|
650
|
+
* isEvent(
|
|
651
|
+
* (event: CallEvent) => event.type === 'call.started',
|
|
652
|
+
* (event: CallEvent) => ({ id: event.id, timestamp: event.timestamp })
|
|
653
|
+
* )
|
|
654
|
+
* ).subscribe(startEvent => {
|
|
655
|
+
* console.log('Call started:', startEvent);
|
|
656
|
+
* });
|
|
657
|
+
* ```
|
|
658
|
+
*/
|
|
659
|
+
function ifIsMap(predicate, mapFn) {
|
|
660
|
+
return pipe(filter$1(predicate), map$1(mapFn));
|
|
661
|
+
}
|
|
662
|
+
/**
|
|
663
|
+
* Generic RxJS operator that filters events using a type guard and extracts a property.
|
|
664
|
+
*
|
|
665
|
+
* This is the generic version that works with any type, not just JSONRPCRequest.
|
|
666
|
+
* Use this when you need to filter and extract properties from already-narrowed types.
|
|
667
|
+
*
|
|
668
|
+
* **Type inference**: The output type is automatically inferred from the input type and path!
|
|
669
|
+
*
|
|
670
|
+
* @template TInput - The type to narrow to (via type guard)
|
|
671
|
+
* @template TPath - The dot-notation path to extract (inferred from parameter)
|
|
672
|
+
* @param predicate - Type guard function to filter events
|
|
673
|
+
* @param resultPath - Dot-notation path to extract (e.g., 'params', 'params.data')
|
|
674
|
+
* @returns An operator function that filters and extracts
|
|
675
|
+
*
|
|
676
|
+
* @example
|
|
677
|
+
* ```typescript
|
|
678
|
+
* interface EventParams {
|
|
679
|
+
* event_type: string;
|
|
680
|
+
* data: { value: number };
|
|
681
|
+
* }
|
|
682
|
+
*
|
|
683
|
+
* const isAuthEvent = (e: unknown): e is EventParams =>
|
|
684
|
+
* typeof e === 'object' && e !== null && 'event_type' in e;
|
|
685
|
+
*
|
|
686
|
+
* // Type of 'data' is automatically inferred as { value: number }
|
|
687
|
+
* params$.pipe(
|
|
688
|
+
* filterAs(isAuthEvent, 'data')
|
|
689
|
+
* ).subscribe(data => {
|
|
690
|
+
* console.log('Event data:', data.value); // TypeScript knows about .value!
|
|
691
|
+
* });
|
|
692
|
+
*
|
|
693
|
+
* // Deeply nested properties are also inferred
|
|
694
|
+
* params$.pipe(
|
|
695
|
+
* filterAs(isAuthEvent, 'data.value')
|
|
696
|
+
* ).subscribe(value => {
|
|
697
|
+
* console.log(value); // Type is 'number'
|
|
698
|
+
* });
|
|
699
|
+
* ```
|
|
700
|
+
*/
|
|
701
|
+
function filterAs(predicate, resultPath) {
|
|
702
|
+
return pipe(ifIsMap(predicate, (event) => {
|
|
703
|
+
return getValueFrom(event, resultPath);
|
|
704
|
+
}), filter$1((value) => value !== void 0));
|
|
705
|
+
}
|
|
706
|
+
|
|
707
|
+
//#endregion
|
|
708
|
+
//#region src/operators/throwOnRPCError.ts
|
|
709
|
+
const logger = getLogger();
|
|
710
|
+
/**
|
|
711
|
+
* RxJS operator that throws a {@link JSONRPCError} when the RPC response contains an error.
|
|
712
|
+
* Passes successful responses through unchanged.
|
|
713
|
+
*/
|
|
714
|
+
function throwOnRPCError() {
|
|
715
|
+
return map((response) => {
|
|
716
|
+
if (response.error) {
|
|
717
|
+
logger.error("[throwOnRPCError] RPC error response:", {
|
|
718
|
+
code: response.error.code,
|
|
719
|
+
message: response.error.message,
|
|
720
|
+
data: response.error.data
|
|
721
|
+
});
|
|
722
|
+
throw new JSONRPCError(response.error.code, response.error.message, response.error.data);
|
|
723
|
+
}
|
|
724
|
+
logger.debug("[throwOnRPCError] RPC successful response:", response);
|
|
725
|
+
return response;
|
|
726
|
+
});
|
|
727
|
+
}
|
|
728
|
+
|
|
729
|
+
//#endregion
|
|
730
|
+
export { CREDENTIAL_REFRESH_BUFFER_MS as $, ICE_GATHERING_COMPLETE_TIMEOUT_MS as $t, RPCTimeoutError as A, DEFAULT_REFRESH_DEVICES_ON_VISIBLE as At, TransportConnectionError as B, DEFAULT_STATS_RTT_SPIKE_MULTIPLIER as Bt, JSONRPCError as C, DEFAULT_MAX_RECOVERY_ATTEMPTS as Ct, OverconstrainedFallbackError as D, DEFAULT_RECONNECT_DELAY_MIN_MS as Dt, MessageParseError as E, DEFAULT_RECONNECT_DELAY_MAX_MS as Et, SerializationError as F, DEFAULT_STATS_HISTORY_SIZE as Ft, VertoInviteHandlerError as G, DEVICE_STORAGE_KEY_AUDIO_INPUT as Gt, UnimplementedError as H, DEFAULT_STEREO_MAX_AVERAGE_BITRATE as Ht, StorageNotAvailableError as I, DEFAULT_STATS_JITTER_SPIKE_MULTIPLIER as It, WebSocketTimeoutError as J, DEVICE_TOKEN_DEFAULT_EXPIRE_IN as Jt, VertoPongError as K, DEVICE_STORAGE_KEY_AUDIO_OUTPUT as Kt, StorageReadError as L, DEFAULT_STATS_NO_PACKET_THRESHOLD_MS as Lt, RequestError as M, DEFAULT_REINVITE_MAX_ATTEMPTS as Mt, RequestTimeoutError as N, DEFAULT_REINVITE_TIMEOUT_MS as Nt, ParticipantNotReadyError as O, DEFAULT_RECOVERY_COOLDOWN_MS as Ot, ScreenShareAlreadyActiveError as P, DEFAULT_STATS_BASELINE_SAMPLES as Pt, CREDENTIAL_EXPIRY_SKEW_MS as Q, DEVICE_TOKEN_REFRESH_RETRY_BASE_MS as Qt, StorageWriteError as R, DEFAULT_STATS_PACKET_LOSS_THRESHOLD as Rt, InvalidParams as S, DEFAULT_KEYFRAME_MAX_BURST as St, MediaTrackError as T, DEFAULT_RECONNECT_CALLS_TIMEOUT_MS as Tt, ValidationError as U, DEFAULT_SYNC_DEVICES_TO_ACTIVE_CALLS as Ut, UnexpectedError as V, DEFAULT_STEREO_AUDIO as Vt, VertoAttachHandlerError as W, DEVICE_REFRESH_ENDPOINT as Wt, AUDIO_LEVEL_POLL_INTERVAL_MS as X, DEVICE_TOKEN_REFRESH_BUFFER_MS as Xt, isMediaDeviceInUse as Y, DEVICE_TOKEN_ENDPOINT as Yt, CREDENTIAL_ACTIVATE_TIMEOUT_MS as Z, DEVICE_TOKEN_REFRESH_MAX_RETRIES as Zt, DPoPInitError as _, DEFAULT_ICE_DISCONNECTED_GRACE_PERIOD_MS as _t, filterNull as a, RPC_ERROR_INVALID_PARAMS as an, DEFAULT_CALL_SIGNALING_TIMEOUT_MS as at, DeviceTokenError as b, DEFAULT_KEYFRAME_BURST_WINDOW_MS as bt, setLogLevel as c, VAD_HOLD_MS as cn, DEFAULT_DEGRADATION_BITRATE_THRESHOLD_KBPS as ct, AuxiliaryLegCancelledError as d, DEFAULT_DEVICE_POLLING_INTERVAL_MS as dt, INVITE_VERSION as en, CREDENTIAL_REFRESH_MAX_DELAY_MS as et, AuxiliaryLegTimeoutError as f, DEFAULT_ENABLE_AUTO_DEGRADATION as ft, ConversationError as g, DEFAULT_ICE_CANDIDATE_TIMEOUT_MS as gt, CollectionFetchError as h, DEFAULT_ENABLE_SERVER_HANGUP_INTERCEPTION as ht, getValueFrom as i, RPC_ERROR_AUTHENTICATION_FAILED as in, DEFAULT_AUX_LEG_CONNECT_TIMEOUT_MS as it, RecoveryError as j, DEFAULT_REINVITE_DEBOUNCE_TIME_MS as jt, PreflightError as k, DEFAULT_RECOVERY_DEBOUNCE_TIME_MS as kt, setLogger as l, VAD_THRESHOLD as ln, DEFAULT_DEGRADATION_RECOVERY_THRESHOLD_KBPS as lt, CallNotReadyError as m, DEFAULT_ENABLE_RELAY_FALLBACK as mt, filterAs as n, PEER_CONNECTION_RECOVERY_WAIT_MS as nn, CREDENTIAL_REFRESH_RETRY_BASE_MS as nt, getLogger as o, RPC_ERROR_REQUESTER_VALIDATION_FAILED as on, DEFAULT_CHECK_CONNECTION_ON_VISIBLE as ot, CallCreateError as p, DEFAULT_ENABLE_NETWORK_CHANGE_DETECTION as pt, WebSocketConnectionError as q, DEVICE_STORAGE_KEY_VIDEO_INPUT as qt, ifIsMap as r, PREFERENCES_STORAGE_KEY as rn, DEFAULT_AUTO_MUTE_VIDEO_ON_HIDDEN as rt, setDebugOptions as s, SAT_REFRESH_SCOPE as sn, DEFAULT_CONNECTION_TIMEOUT_MS as st, throwOnRPCError as t, PEER_CONNECTION_RECOVERY_POLL_MS as tn, CREDENTIAL_REFRESH_MAX_RETRIES as tt, AuthStateHandlerError as u, DEFAULT_DEVICE_DEBOUNCE_TIME_MS as ut, DependencyError as v, DEFAULT_ICE_GATHERING_TIMEOUT_MS as vt, MediaAccessError as w, DEFAULT_PERSIST_DEVICE_SELECTION as wt, InvalidCredentialsError as x, DEFAULT_KEYFRAME_COOLDOWN_MS as xt, DeserializationError as y, DEFAULT_ICE_RESTART_TIMEOUT_MS as yt, TokenRefreshError as z, DEFAULT_STATS_POLLING_INTERVAL_MS as zt };
|
|
731
|
+
//# sourceMappingURL=operators-BVxi3KpN.mjs.map
|