@estuary-ai/sdk 0.1.30 → 0.1.31

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/index.js CHANGED
@@ -5170,7 +5170,19 @@ var init_livekit_voice = __esm({
5170
5170
  err
5171
5171
  );
5172
5172
  }
5173
- this.socketManager.emitEvent("livekit_join", { room: tokenData.room });
5173
+ await new Promise((resolve) => {
5174
+ const timeout = setTimeout(() => {
5175
+ this.socketManager.off("livekitConnected", onReady);
5176
+ this.logger.warn("Timed out waiting for livekit_ready, proceeding");
5177
+ resolve();
5178
+ }, 5e3);
5179
+ const onReady = () => {
5180
+ clearTimeout(timeout);
5181
+ resolve();
5182
+ };
5183
+ this.socketManager.once("livekitConnected", onReady);
5184
+ this.socketManager.emitEvent("livekit_join", { room: tokenData.room });
5185
+ });
5174
5186
  this._isActive = true;
5175
5187
  this.logger.debug("LiveKit voice started");
5176
5188
  }