obi-sdk 0.12.0 → 0.12.1

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/react.es.js CHANGED
@@ -16582,10 +16582,10 @@ var O;
16582
16582
  A.READY = "ready", A.ERROR = "error", A.PAUSED = "paused", A.LOADING = "loading", A.THINKING = "thinking", A.RESEARCHING = "researching", A.AGENT_SPEAKING = "agent_speaking", A.USER_SPEAKING = "user_speaking", A.AWAITING_USER_INPUT = "awaiting_user_input";
16583
16583
  })(O || (O = {}));
16584
16584
  class KC {
16585
- constructor({ sessionId: e, apiBaseUrl: t }) {
16586
- this.currentState = O.READY, this.livekitState = "speaking", this.assistantAudioContext = null, this.userAudioContext = null, this._assistantAudioTimer = null, this._userAudioTimer = null, this.sessionId = e, this.apiBaseUrl = t || NC, this.client = new _g({
16585
+ constructor({ sessionId: e, apiBaseUrl: t, user: n }) {
16586
+ this.currentState = O.READY, this.livekitState = "speaking", this.assistantAudioContext = null, this.userAudioContext = null, this._assistantAudioTimer = null, this._userAudioTimer = null, this.user = void 0, this.sessionId = e, this.apiBaseUrl = t || NC, this.client = new _g({
16587
16587
  baseUrl: this.apiBaseUrl
16588
- }), this.emitter = new Om();
16588
+ }), this.emitter = new Om(), this.user = n;
16589
16589
  }
16590
16590
  emit(e, t) {
16591
16591
  this.emitter.emit(e, t);
@@ -16680,7 +16680,10 @@ class KC {
16680
16680
  adaptiveStream: !0,
16681
16681
  dynacast: !0
16682
16682
  }), this.setupRoomEventListeners();
16683
- const e = await this.client.getJoinToken(this.sessionId, { skipIntro: !0 });
16683
+ const e = await this.client.getJoinToken(this.sessionId, {
16684
+ skipIntro: !0,
16685
+ ...this.user && { user: JSON.stringify(this.user) }
16686
+ });
16684
16687
  if (await this.room.connect(e.data.url, e.data.token), this.microphoneStream) {
16685
16688
  const t = this.microphoneStream.getAudioTracks()[0];
16686
16689
  await this.room.localParticipant.publishTrack(t, {