@layercode/js-sdk 2.8.0 → 2.8.2

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.
@@ -137,11 +137,13 @@ declare class LayercodeClient implements ILayercodeClient {
137
137
  private audioInput;
138
138
  private audioOutput;
139
139
  private AMPLITUDE_MONITORING_SAMPLE_RATE;
140
+ private audioOutputReady;
140
141
  private pushToTalkActive;
141
142
  private pushToTalkEnabled;
142
143
  private canInterrupt;
143
144
  private userIsSpeaking;
144
145
  private agentIsSpeaking;
146
+ private agentIsPlayingAudio;
145
147
  private recorderStarted;
146
148
  private readySent;
147
149
  private currentTurnId;
@@ -181,6 +183,7 @@ declare class LayercodeClient implements ILayercodeClient {
181
183
  * @param {string} status - New status value
182
184
  */
183
185
  private _setStatus;
186
+ private _waitForAudioOutputReady;
184
187
  private _setAgentSpeaking;
185
188
  private _setUserSpeaking;
186
189
  /**
@@ -218,6 +221,11 @@ declare class LayercodeClient implements ILayercodeClient {
218
221
  audioInputDisconnect(): Promise<void>;
219
222
  setAudioInput(state: boolean): Promise<void>;
220
223
  setAudioOutput(state: boolean): Promise<void>;
224
+ /**
225
+ * Syncs the reported agentSpeaking state with the actual audio playback state.
226
+ * Called when audioOutput is enabled to ensure proper state synchronization.
227
+ */
228
+ private _syncAgentSpeakingState;
221
229
  /** Emitters for audio flags */
222
230
  private _emitAudioInput;
223
231
  private _emitAudioOutput;
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "author": "Layercode",
3
3
  "license": "MIT",
4
4
  "name": "@layercode/js-sdk",
5
- "version": "2.8.0",
5
+ "version": "2.8.2",
6
6
  "description": "Layercode JavaScript SDK for browser usage",
7
7
  "type": "module",
8
8
  "main": "dist/layercode-js-sdk.esm.js",