@layercode/js-sdk 1.0.18 → 1.0.21

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.
@@ -28,6 +28,8 @@ interface LayercodeClientOptions {
28
28
  onAgentAmplitudeChange?: (amplitude: number) => void;
29
29
  /** Callback when connection status changes */
30
30
  onStatusChange?: (status: string) => void;
31
+ /** Callback when user turn changes */
32
+ onUserIsSpeakingChange?: (isSpeaking: boolean) => void;
31
33
  }
32
34
  /**
33
35
  * @class LayercodeClient
@@ -45,6 +47,7 @@ declare class LayercodeClient {
45
47
  private canInterrupt;
46
48
  private vadPausedPlayer;
47
49
  private userIsSpeaking;
50
+ private endUserTurn;
48
51
  private recorderStarted;
49
52
  private readySent;
50
53
  _websocketUrl: string;
@@ -106,5 +109,10 @@ declare class LayercodeClient {
106
109
  * @returns {MediaStream|null} The microphone stream or null if not initialized
107
110
  */
108
111
  getStream(): MediaStream | null;
112
+ /**
113
+ * Switches the input device for the microphone and restarts recording
114
+ * @param {string} deviceId - The deviceId of the new microphone
115
+ */
116
+ setInputDevice(deviceId: string): Promise<void>;
109
117
  }
110
118
  export default LayercodeClient;
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "author": "Layercode",
3
3
  "license": "MIT",
4
4
  "name": "@layercode/js-sdk",
5
- "version": "1.0.18",
5
+ "version": "1.0.21",
6
6
  "description": "Layercode JavaScript SDK for browser usage",
7
7
  "type": "module",
8
8
  "main": "dist/layercode-js-sdk.esm.js",