@decartai/sdk 0.0.52 → 0.0.53

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.
@@ -226,11 +226,6 @@ var WebRTCConnection = class {
226
226
  });
227
227
  }
228
228
  break;
229
- case "ice-restart": {
230
- const turnConfig = msg.turn_config;
231
- if (turnConfig) await this.setupNewPeerConnection(turnConfig);
232
- break;
233
- }
234
229
  }
235
230
  } catch (error) {
236
231
  this.logger.error("Signaling handler error", { error: String(error) });
@@ -307,20 +302,14 @@ var WebRTCConnection = class {
307
302
  this.callbacks.onStateChange?.(state);
308
303
  }
309
304
  }
310
- async setupNewPeerConnection(turnConfig) {
305
+ async setupNewPeerConnection() {
311
306
  if (this.pc) {
312
307
  this.pc.getSenders().forEach((sender) => {
313
308
  if (sender.track && this.pc) this.pc.removeTrack(sender);
314
309
  });
315
310
  this.pc.close();
316
311
  }
317
- const iceServers = [...ICE_SERVERS];
318
- if (turnConfig) iceServers.push({
319
- urls: turnConfig.server_url,
320
- credential: turnConfig.credential,
321
- username: turnConfig.username
322
- });
323
- this.pc = new RTCPeerConnection({ iceServers });
312
+ this.pc = new RTCPeerConnection({ iceServers: ICE_SERVERS });
324
313
  this.setState("connecting");
325
314
  if (this.localStream) {
326
315
  if (this.callbacks.modelName === "live_avatar") this.pc.addTransceiver("video", { direction: "recvonly" });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@decartai/sdk",
3
- "version": "0.0.52",
3
+ "version": "0.0.53",
4
4
  "description": "Decart's JavaScript SDK",
5
5
  "type": "module",
6
6
  "license": "MIT",