@rqmii_immersive/agent-react-sdk 5.1.0 → 5.1.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.
@@ -3031,8 +3031,8 @@ class by {
3031
3031
  const lf = pg(null);
3032
3032
  function Sy({
3033
3033
  children: d,
3034
- wsUrl: r,
3035
- restUrl: s,
3034
+ wsUrl: r = "wss://ws.rqmii.com",
3035
+ restUrl: s = "https://api.rqmii.com",
3036
3036
  enableAudio: a = !0,
3037
3037
  pcmOptions: p,
3038
3038
  debug: _ = !1,
@@ -3095,7 +3095,6 @@ function Sy({
3095
3095
  ), tt = Ge(({ keepManualDisconnect: _e = !1 } = {}) => {
3096
3096
  W.current = !0, ce.current = !1, ne.current.clear(), qe.current.destroyPcmPlayer(), Ye.current.cleanupSocket(), _e || (W.current = !1), Y({ type: "HARD_RESET" });
3097
3097
  }, []), Ht = Ge(async ({ apiKey: _e, publicChatId: Ze, agentId: Ut, userId: ir, language: Mt = "en", clientTools: Cr, config: wt } = {}) => {
3098
- if (!r) throw new Error("Missing wsUrl in RqmiiAgentProvider");
3099
3098
  if (!_e && !Ze && !Ut) throw new Error("Provide one of apiKey, publicChatId, or agentId");
3100
3099
  tt(), de.current = Cr ?? {}, Y({ type: "SET_CONNECTION_STATE", payload: gt.INITIALIZING }), Y({ type: "SET_ERROR", payload: null });
3101
3100
  const Nr = vg();
@@ -3123,7 +3122,6 @@ function Sy({
3123
3122
  }
3124
3123
  return Ur;
3125
3124
  }, [ot, tt, r, K.session.agentType]), Ct = Ge(async ({ uniqueId: _e }) => {
3126
- if (!r) throw new Error("Missing wsUrl in RqmiiAgentProvider");
3127
3125
  if (!_e) throw new Error("uniqueId is required");
3128
3126
  tt(), Y({ type: "SET_CONNECTION_STATE", payload: gt.INITIALIZING }), Y({ type: "SET_ERROR", payload: null });
3129
3127
  let Ze;
@@ -3162,7 +3160,6 @@ function Sy({
3162
3160
  }, []), er = Ge(() => qe.current.resumeAudioPlayback(), []), xr = Ge(() => qe.current.pauseAudioPlayback(), []), yt = Ge((_e) => qe.current.attachAudioElement(_e), []), ft = Ge((_e, Ze = null) => {
3163
3161
  Y({ type: "SET_CLOUD_STREAM_STATE", payload: { state: _e, error: Ze ? String(Ze) : null } });
3164
3162
  }, []), It = Ge(async (_e) => {
3165
- if (!s) throw new Error("Missing restUrl in RqmiiAgentProvider");
3166
3163
  try {
3167
3164
  const Ze = await at.current.fetchAgentConfig(_e);
3168
3165
  return Y({ type: "SET_AGENT_CONFIG", payload: Ze }), Ze;
@@ -16998,4 +16995,4 @@ export {
16998
16995
  mg as s,
16999
16996
  fn as u
17000
16997
  };
17001
- //# sourceMappingURL=RqmiiCloudAvatarPlayer-BVTRjoXz.js.map
16998
+ //# sourceMappingURL=RqmiiCloudAvatarPlayer-CXKmEFce.js.map