@layercode/js-sdk 2.8.3 → 2.8.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/README.md +15 -5
- package/dist/layercode-js-sdk.esm.js +281 -247
- package/dist/layercode-js-sdk.esm.js.map +1 -1
- package/dist/layercode-js-sdk.min.js +281 -247
- package/dist/layercode-js-sdk.min.js.map +1 -1
- package/dist/types/index.d.ts +13 -3
- package/package.json +1 -1
package/dist/types/index.d.ts
CHANGED
|
@@ -55,7 +55,7 @@ interface ILayercodeClient {
|
|
|
55
55
|
default: boolean;
|
|
56
56
|
}>) => void;
|
|
57
57
|
mute(): void;
|
|
58
|
-
unmute(): void
|
|
58
|
+
unmute(): Promise<void>;
|
|
59
59
|
sendClientResponseText(text: string): Promise<void>;
|
|
60
60
|
sendClientResponseData(data: any): Promise<void>;
|
|
61
61
|
readonly status: string;
|
|
@@ -166,6 +166,7 @@ declare class LayercodeClient implements ILayercodeClient {
|
|
|
166
166
|
private stopRecorderAmplitude?;
|
|
167
167
|
private deviceChangeListener;
|
|
168
168
|
private recorderRestartChain;
|
|
169
|
+
private _skipFirstDeviceCallback;
|
|
169
170
|
private deviceListenerReady;
|
|
170
171
|
private resolveDeviceListenerReady;
|
|
171
172
|
_websocketUrl: string;
|
|
@@ -226,6 +227,12 @@ declare class LayercodeClient implements ILayercodeClient {
|
|
|
226
227
|
private _stopPlayerAmplitudeMonitoring;
|
|
227
228
|
private _stopRecorderAmplitudeMonitoring;
|
|
228
229
|
audioInputConnect(): Promise<void>;
|
|
230
|
+
/**
|
|
231
|
+
* Starts the recorder with a specific device (or default if undefined)
|
|
232
|
+
* This is the single point where getUserMedia is called during initial setup.
|
|
233
|
+
* Idempotent: returns early if recorder is already started or has a live stream.
|
|
234
|
+
*/
|
|
235
|
+
private _startRecorderWithDevice;
|
|
229
236
|
audioInputDisconnect(): Promise<void>;
|
|
230
237
|
setAudioInput(state: boolean): Promise<void>;
|
|
231
238
|
setAudioOutput(state: boolean): Promise<void>;
|
|
@@ -278,7 +285,6 @@ declare class LayercodeClient implements ILayercodeClient {
|
|
|
278
285
|
*/
|
|
279
286
|
private _restartAudioRecording;
|
|
280
287
|
private _queueRecorderRestart;
|
|
281
|
-
private _initializeRecorderWithDefaultDevice;
|
|
282
288
|
/**
|
|
283
289
|
* Disconnect VAD
|
|
284
290
|
*/
|
|
@@ -294,6 +300,10 @@ declare class LayercodeClient implements ILayercodeClient {
|
|
|
294
300
|
private _teardownDeviceListeners;
|
|
295
301
|
private _performDisconnectCleanup;
|
|
296
302
|
private _getDeviceComparisonKey;
|
|
303
|
+
private _getUserActivationState;
|
|
304
|
+
private _isMicrophonePermissionDenied;
|
|
305
|
+
private _microphonePermissionDeniedError;
|
|
306
|
+
private _shouldWarnAudioDevicesRequireUserGesture;
|
|
297
307
|
/**
|
|
298
308
|
* Mutes the microphone to stop sending audio to the server
|
|
299
309
|
* The connection and recording remain active for quick unmute
|
|
@@ -302,7 +312,7 @@ declare class LayercodeClient implements ILayercodeClient {
|
|
|
302
312
|
/**
|
|
303
313
|
* Unmutes the microphone to resume sending audio to the server
|
|
304
314
|
*/
|
|
305
|
-
unmute(): void
|
|
315
|
+
unmute(): Promise<void>;
|
|
306
316
|
}
|
|
307
317
|
export default LayercodeClient;
|
|
308
318
|
export type { ILayercodeClient, LayercodeClientOptions, AuthorizeSessionRequest, AuthorizeSessionRequestParams };
|
package/package.json
CHANGED