@realsee/live 0.6.0-alpha.6 → 0.6.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/index.es.js CHANGED
@@ -80,8 +80,8 @@ class ae {
80
80
  let n = !1;
81
81
  const a = ge(this)[s] || [];
82
82
  for (let u of a.slice()) {
83
- const [f, v = !1] = u, h = f(...e);
84
- v && this.off(s, f), h === !1 && (n = !0);
83
+ const [f, _ = !1] = u, g = f(...e);
84
+ _ && this.off(s, f), g === !1 && (n = !0);
85
85
  }
86
86
  return n;
87
87
  }
@@ -173,8 +173,8 @@ class tt extends De {
173
173
  u.id = a, this.$dom.appendChild(u), typeof this._autoPlayConfirm == "function" ? (n.play(a).catch((f) => {
174
174
  }), n.on("error", (f) => {
175
175
  if (f.getCode() === 16451) {
176
- const h = () => n.resume();
177
- this._autoPlayConfirm({ onConfirm: h });
176
+ const g = () => n.resume();
177
+ this._autoPlayConfirm({ onConfirm: g });
178
178
  }
179
179
  })) : n.play(a);
180
180
  });
@@ -216,9 +216,9 @@ class tt extends De {
216
216
  "audio-volume",
217
217
  (u) => this.emit(
218
218
  "userVolumes",
219
- u.result.map(({ userId: f, audioVolume: v }) => ({
219
+ u.result.map(({ userId: f, audioVolume: _ }) => ({
220
220
  userId: f,
221
- audioVolume: v
221
+ audioVolume: _
222
222
  }))
223
223
  )
224
224
  ), (a = this._trtc.client) == null || a.on("error", (u) => this.emit("error", u));
@@ -293,44 +293,44 @@ class rt extends De {
293
293
  * 注册rtc事件
294
294
  */
295
295
  o(this, "_registerRtcEvent", () => {
296
- var n, i, a, u, f, v;
296
+ var n, i, a, u, f, _;
297
297
  const e = ((a = (i = (n = this.meetingSession) == null ? void 0 : n.configuration) == null ? void 0 : i.credentials) == null ? void 0 : a.attendeeId) || "";
298
298
  if (e) {
299
- const h = /* @__PURE__ */ new Map(), _ = () => {
300
- const E = [];
301
- return h.forEach((w, m) => {
302
- E.push({
299
+ const g = /* @__PURE__ */ new Map(), v = () => {
300
+ const p = [];
301
+ return g.forEach((w, m) => {
302
+ p.push({
303
303
  userId: w.userId,
304
304
  volume: w.muted || w.signalStrength === 0 || !Boolean(w.volume) ? 0 : w.volume
305
305
  });
306
- }), E;
306
+ }), p;
307
307
  };
308
308
  (u = this.meetingSession) == null || u.audioVideo.realtimeSubscribeToAttendeeIdPresence(
309
- (E, w, m) => {
310
- var P;
309
+ (p, w, m) => {
310
+ var N;
311
311
  if (!w) {
312
- h.delete(E), this.emit("userVolumes", _());
312
+ g.delete(p), this.emit("userVolumes", v());
313
313
  return;
314
314
  }
315
- (P = this.meetingSession) == null || P.audioVideo.realtimeSubscribeToVolumeIndicator(
316
- E,
317
- (M, j, $, J) => {
318
- new et(M).base() === M && (h.set(M, {
315
+ (N = this.meetingSession) == null || N.audioVideo.realtimeSubscribeToVolumeIndicator(
316
+ p,
317
+ (M, P, Y, K) => {
318
+ new et(M).base() === M && (g.set(M, {
319
319
  userId: m || M,
320
- volume: j,
321
- muted: $,
322
- signalStrength: J
323
- }), this.emit("userVolumes", _()));
320
+ volume: P,
321
+ muted: Y,
322
+ signalStrength: K
323
+ }), this.emit("userVolumes", v()));
324
324
  }
325
325
  );
326
326
  }
327
327
  ), (f = this.meetingSession) == null || f.audioVideo.realtimeSubscribeToVolumeIndicator(
328
328
  e,
329
- (E, w, m, P) => {
330
- new et(E).base() === E && P !== null && P !== 1 && this.emit("weakNetwork");
329
+ (p, w, m, N) => {
330
+ new et(p).base() === p && N !== null && N !== 1 && this.emit("weakNetwork");
331
331
  }
332
- ), (v = this.meetingSession) == null || v.audioVideo.realtimeSubscribeToFatalError(
333
- (E) => this.emit("error", E)
332
+ ), (_ = this.meetingSession) == null || _.audioVideo.realtimeSubscribeToFatalError(
333
+ (p) => this.emit("error", p)
334
334
  );
335
335
  }
336
336
  });
@@ -346,58 +346,54 @@ class rt extends De {
346
346
  */
347
347
  async join(e) {
348
348
  return new Promise(async (n, i) => {
349
- var a;
349
+ var a, u;
350
350
  this.emit("joinWillStart");
351
351
  try {
352
- const { sdkAppId: u, userId: f, roomId: v, userSig: h } = await this._getVoiceSign({
352
+ const { sdkAppId: f, userId: _, roomId: g, userSig: v } = await this._getVoiceSign({
353
353
  ...e,
354
354
  roomId: e.roomId || 0
355
355
  });
356
- this.userId = f;
356
+ this.userId = _;
357
357
  const {
358
- attendence: _,
359
- vendor_wrapper: E
358
+ attendence: p,
359
+ vendor_wrapper: w
360
360
  } = JSON.parse(
361
- decodeURIComponent(h)
362
- ), w = new Ut(
361
+ decodeURIComponent(v)
362
+ ), m = new Ut(
363
363
  {
364
- Meeting: E
364
+ Meeting: w
365
365
  },
366
366
  {
367
367
  Attendee: {
368
- ExternalUserId: _.external_user_id,
369
- AttendeeId: _.attendee_id,
370
- JoinToken: _.join_token
368
+ ExternalUserId: p.external_user_id,
369
+ AttendeeId: p.attendee_id,
370
+ JoinToken: p.join_token
371
371
  }
372
372
  }
373
373
  );
374
374
  this.meetingSession = new Bt(
375
- w,
375
+ m,
376
376
  this.logger,
377
377
  this.deviceController
378
378
  ), this._registerRtcEvent(), this.meetingSession.audioVideo.addDeviceChangeObserver(
379
379
  this.deviceChangeObserver
380
380
  ), this.meetingSession.audioVideo.addObserver(this.audioVideoObserver), this.meetingSession.audioVideo.bindAudioElement(this.$audio);
381
- const m = {
381
+ const N = {
382
382
  audioVideoDidStart: () => {
383
- var $;
384
- ($ = this.meetingSession) == null || $.audioVideo.realtimeMuteLocalAudio(), this.joined = !0, this.emit("joined"), n(!0);
383
+ var I;
384
+ (I = this.meetingSession) == null || I.audioVideo.realtimeMuteLocalAudio(), this.joined = !0, this.emit("joined"), n(!0);
385
385
  },
386
386
  audioVideoDidStop: () => {
387
387
  this.joined = !1, n(!1);
388
388
  }
389
389
  };
390
- this.meetingSession.audioVideo.addObserver(m);
391
- const P = await this.deviceController.listAudioInputDevices(!0), M = P.find(
392
- ($) => $.deviceId === "default"
393
- ), j = P.find(
394
- ($) => $.deviceId !== ""
390
+ this.meetingSession.audioVideo.addObserver(N), this.meetingSession.audioVideo.setDeviceLabelTrigger(
391
+ async () => await navigator.mediaDevices.getUserMedia({ audio: !0, video: !1 })
395
392
  );
396
- this.audioInput = M || j, await this.meetingSession.audioVideo.startAudioInput(
397
- ((a = this.audioInput) == null ? void 0 : a.deviceId) || "default"
398
- ), this.meetingSession.audioVideo.start();
399
- } catch (u) {
400
- this.emit("error", u), this.logger.error(u.message), n(!1);
393
+ const P = ((a = (await this.meetingSession.audioVideo.listAudioInputDevices())[0]) == null ? void 0 : a.deviceId) || "default", K = ((u = (await this.meetingSession.audioVideo.listAudioOutputDevices())[0]) == null ? void 0 : u.deviceId) || "default";
394
+ await this.meetingSession.audioVideo.startAudioInput(P), await this.meetingSession.audioVideo.chooseAudioOutput(K), this.meetingSession.audioVideo.start();
395
+ } catch (f) {
396
+ this.emit("error", f), this.logger.error(f.message), n(!1);
401
397
  }
402
398
  });
403
399
  }
@@ -407,10 +403,10 @@ class rt extends De {
407
403
  this.joined = !1;
408
404
  const i = {
409
405
  audioVideoDidStop: async (f) => {
410
- var h;
411
- const v = f.statusCode();
412
- (h = this.meetingSession) == null || h.deviceController.destroy(), v === Wt.Left ? (this.logger.info("You left the session"), e(!0)) : (this.logger.info(
413
- `Stopped with a session status code: ${v}`
406
+ var g;
407
+ const _ = f.statusCode();
408
+ (g = this.meetingSession) == null || g.deviceController.destroy(), _ === Wt.Left ? (this.logger.info("You left the session"), e(!0)) : (this.logger.info(
409
+ `Stopped with a session status code: ${_}`
414
410
  ), e(!0));
415
411
  }
416
412
  };
@@ -500,7 +496,7 @@ class nt extends De {
500
496
  this.jsBridge.shock(1);
501
497
  }
502
498
  }
503
- var F = /* @__PURE__ */ ((t) => (t.SelfUserInfo = "SELF_USER_INFO", t.RoomInfo = "ROOM_INFO", t.RTCInfo = "RTC_INFO", t.UserList = "USER_LIST", t.BuiltinMsg = "BUILTIN_MSG", t.CustomEvent = "CUSTOM_EVENT", t.KeyframeSync = "KEYFRAME_SYNC", t.UserKickOut = "USER_KICK_OUT", t))(F || {}), K = /* @__PURE__ */ ((t) => (t.UserChange = "user_change", t.RoomChange = "room_change", t))(K || {}), H = /* @__PURE__ */ ((t) => (t.UserMicroStatus = "change_micro_status", t.UserMicroStatusSync = "sync_micro_status", t.UserPermission = "change_permission", t.UserStatus = "change_status", t.UserInfo = "change_info", t.RoomClose = "close", t))(H || {}), Z = /* @__PURE__ */ ((t) => (t.OPEN = "OPEN", t.CLOSE = "CLOSE", t))(Z || {});
499
+ var W = /* @__PURE__ */ ((t) => (t.SelfUserInfo = "SELF_USER_INFO", t.RoomInfo = "ROOM_INFO", t.RTCInfo = "RTC_INFO", t.UserList = "USER_LIST", t.BuiltinMsg = "BUILTIN_MSG", t.CustomEvent = "CUSTOM_EVENT", t.KeyframeSync = "KEYFRAME_SYNC", t.UserKickOut = "USER_KICK_OUT", t))(W || {}), q = /* @__PURE__ */ ((t) => (t.UserChange = "user_change", t.RoomChange = "room_change", t))(q || {}), J = /* @__PURE__ */ ((t) => (t.UserMicroStatus = "change_micro_status", t.UserMicroStatusSync = "sync_micro_status", t.UserPermission = "change_permission", t.UserStatus = "change_status", t.UserInfo = "change_info", t.RoomClose = "close", t))(J || {}), Z = /* @__PURE__ */ ((t) => (t.OPEN = "OPEN", t.CLOSE = "CLOSE", t))(Z || {});
504
500
  function Tr(t) {
505
501
  try {
506
502
  const s = JSON.parse(t), e = {
@@ -521,7 +517,7 @@ function Tr(t) {
521
517
  return !1;
522
518
  }
523
519
  }
524
- var U = /* @__PURE__ */ ((t) => (t[t.NOTINITIALIZED = -1] = "NOTINITIALIZED", t[t.CONNECTING = 0] = "CONNECTING", t[t.OPEN = 1] = "OPEN", t[t.CLOSED = 3] = "CLOSED", t))(U || {}), Xt = /* @__PURE__ */ ((t) => (t[t.Normal = 0] = "Normal", t[t.Removed = 1] = "Removed", t[t.Replaced = 2] = "Replaced", t))(Xt || {}), Zt = /* @__PURE__ */ ((t) => (t.WAIT_ENTER = "WAIT_ENTER", t.ONLINE = "ONLINE", t.LEAVE = "LEAVE", t.KICK_OUT = "KICK_OUT", t.BE_REPLACE = "BE_REPLACE", t.EXCEPTION = "EXCEPTION", t))(Zt || {}), Le = /* @__PURE__ */ ((t) => (t[t.NOTINITIALIZED = -1] = "NOTINITIALIZED", t[t.CONNECTING = 0] = "CONNECTING", t[t.OPEN = 1] = "OPEN", t[t.CLOSING = 2] = "CLOSING", t[t.CLOSED = 3] = "CLOSED", t))(Le || {}), Qt = /* @__PURE__ */ ((t) => (t.Error = "Error", t.Close = "Close", t.MicroAuth = "MicroAuth", t.DuplicateConnect = "DuplicateConnect", t.IllegalURL = "IllegalURL", t.Unknown = "Unknown", t.IllegalArgs = "IllegalArgs", t))(Qt || {}), er = /* @__PURE__ */ ((t) => (t.Err_1000 = "CLOSE_NORMAL", t.Err_1001 = "CLOSE_GOING_AWAY", t.Err_1002 = "CLOSE_PROTOCOL_ERROR", t.Err_1003 = "CLOSE_UNSUPPORTED", t.Err_1006 = "CLOSE_ABNORMAL", t.Err_1007 = "Unsupported Data", t.Err_1008 = "Policy Violation", t.Err_1009 = "CLOSE_TOO_LARGE", t.Err_unknown = "unknown", t))(er || {});
520
+ var x = /* @__PURE__ */ ((t) => (t[t.NOTINITIALIZED = -1] = "NOTINITIALIZED", t[t.CONNECTING = 0] = "CONNECTING", t[t.OPEN = 1] = "OPEN", t[t.CLOSED = 3] = "CLOSED", t))(x || {}), Xt = /* @__PURE__ */ ((t) => (t[t.Normal = 0] = "Normal", t[t.Removed = 1] = "Removed", t[t.Replaced = 2] = "Replaced", t))(Xt || {}), Zt = /* @__PURE__ */ ((t) => (t.WAIT_ENTER = "WAIT_ENTER", t.ONLINE = "ONLINE", t.LEAVE = "LEAVE", t.KICK_OUT = "KICK_OUT", t.BE_REPLACE = "BE_REPLACE", t.EXCEPTION = "EXCEPTION", t))(Zt || {}), Le = /* @__PURE__ */ ((t) => (t[t.NOTINITIALIZED = -1] = "NOTINITIALIZED", t[t.CONNECTING = 0] = "CONNECTING", t[t.OPEN = 1] = "OPEN", t[t.CLOSING = 2] = "CLOSING", t[t.CLOSED = 3] = "CLOSED", t))(Le || {}), Qt = /* @__PURE__ */ ((t) => (t.Error = "Error", t.Close = "Close", t.MicroAuth = "MicroAuth", t.DuplicateConnect = "DuplicateConnect", t.IllegalURL = "IllegalURL", t.Unknown = "Unknown", t.IllegalArgs = "IllegalArgs", t))(Qt || {}), er = /* @__PURE__ */ ((t) => (t.Err_1000 = "CLOSE_NORMAL", t.Err_1001 = "CLOSE_GOING_AWAY", t.Err_1002 = "CLOSE_PROTOCOL_ERROR", t.Err_1003 = "CLOSE_UNSUPPORTED", t.Err_1006 = "CLOSE_ABNORMAL", t.Err_1007 = "Unsupported Data", t.Err_1008 = "Policy Violation", t.Err_1009 = "CLOSE_TOO_LARGE", t.Err_unknown = "unknown", t))(er || {});
525
521
  function tr(t) {
526
522
  switch (t) {
527
523
  case 1e3:
@@ -864,7 +860,7 @@ class _r extends ae {
864
860
  /**
865
861
  * 带看连接状态
866
862
  */
867
- o(this, "_state", U.NOTINITIALIZED);
863
+ o(this, "_state", x.NOTINITIALIZED);
868
864
  /**
869
865
  * 添加事件监听
870
866
  */
@@ -884,28 +880,28 @@ class _r extends ae {
884
880
  o(this, "_handleCloseEvent", (e) => {
885
881
  A.info(
886
882
  `live room closed bacause of ${e.code}-${e.reason || tr(e.code)}`
887
- ), this.state = U.CLOSED;
883
+ ), this.state = x.CLOSED;
888
884
  });
889
885
  /**
890
886
  * 处理房间正在关闭事件(这个时候可能是断网了)
891
887
  */
892
888
  o(this, "_handleClosingEvent", () => {
893
889
  var e;
894
- A.info("live room is closing, onLine:", (e = globalThis == null ? void 0 : globalThis.navigator) == null ? void 0 : e.onLine), this.state = U.CLOSED;
890
+ A.info("live room is closing, onLine:", (e = globalThis == null ? void 0 : globalThis.navigator) == null ? void 0 : e.onLine), this.state = x.CLOSED;
895
891
  });
896
892
  /**
897
893
  * 连接中
898
894
  * @param event
899
895
  */
900
896
  o(this, "_handleConnectingEvent", () => {
901
- A.info("live room is connecting"), this.state = U.CONNECTING;
897
+ A.info("live room is connecting"), this.state = x.CONNECTING;
902
898
  });
903
899
  /**
904
900
  * 连接发送异常
905
901
  * @param event
906
902
  */
907
903
  o(this, "_handleErrorEvent", (e) => {
908
- A.error("live room error", e), this.state = U.CLOSED;
904
+ A.error("live room error", e), this.state = x.CLOSED;
909
905
  });
910
906
  /**
911
907
  * 接收到消息
@@ -926,14 +922,14 @@ class _r extends ae {
926
922
  * @param event
927
923
  */
928
924
  o(this, "_handleOpenEvent", (e) => {
929
- A.info("live room open", e.detail), this.state = U.OPEN, e.detail.reconnects > 0 && this.emit("reconnected", e.detail);
925
+ A.info("live room open", e.detail), this.state = x.OPEN, e.detail.reconnects > 0 && this.emit("reconnected", e.detail);
930
926
  });
931
927
  /**
932
928
  * 处理超时
933
929
  * @param event
934
930
  */
935
931
  o(this, "_handleTimeoutEvent", (e) => {
936
- A.error("live room connect timeout!", e.detail), this.state = U.CLOSED;
932
+ A.error("live room connect timeout!", e.detail), this.state = x.CLOSED;
937
933
  });
938
934
  /**
939
935
  * 释放资源,释放之后需要重新实例化
@@ -970,7 +966,7 @@ class _r extends ae {
970
966
  sendMessage(e = "") {
971
967
  if (e == null || e === "")
972
968
  throw new Error("live message is empty!");
973
- if (this.state === U.OPEN)
969
+ if (this.state === x.OPEN)
974
970
  return this._ws.send(JSON.stringify(e));
975
971
  throw new Error("live has not yet been initialized!");
976
972
  }
@@ -1017,13 +1013,13 @@ class vr extends ae {
1017
1013
  * @returns
1018
1014
  */
1019
1015
  o(this, "sendKeyframe", (e, n) => {
1020
- if (this.state !== U.OPEN)
1016
+ if (this.state !== x.OPEN)
1021
1017
  return !1;
1022
1018
  this._buildInData.keyframes = {
1023
1019
  ...this._buildInData.keyframes,
1024
1020
  [e]: n
1025
1021
  };
1026
- const i = Pe(F.KeyframeSync, this.snapshot);
1022
+ const i = Pe(W.KeyframeSync, this.snapshot);
1027
1023
  try {
1028
1024
  return this._controller.sendMessage(i), !0;
1029
1025
  } catch (a) {
@@ -1059,93 +1055,93 @@ class vr extends ae {
1059
1055
  o(this, "_handleMessage", async (e) => {
1060
1056
  var n, i, a, u, f;
1061
1057
  if (typeof e == "object") {
1062
- const { command: v, data: h = {}, frontRequestId: _, code: E, message: w } = e;
1063
- if (E === "SUCCESS")
1064
- switch (v) {
1065
- case F.SelfUserInfo: {
1066
- const m = h;
1058
+ const { command: _, data: g = {}, frontRequestId: v, code: p, message: w } = e;
1059
+ if (p === "SUCCESS")
1060
+ switch (_) {
1061
+ case W.SelfUserInfo: {
1062
+ const m = g;
1067
1063
  st(this.selfInfo, m, { deep: !0 }) || (this._buildInData.selfInfo = m, this.emit(
1068
1064
  "selfInfoUpdate",
1069
1065
  this._buildInData.selfInfo,
1070
- _
1066
+ v
1071
1067
  ));
1072
1068
  break;
1073
1069
  }
1074
- case F.RoomInfo: {
1075
- const m = h;
1070
+ case W.RoomInfo: {
1071
+ const m = g;
1076
1072
  this._buildInData.roomInfo = Object.assign({}, m), this.emit(
1077
1073
  "readyKeyframeSync",
1078
1074
  m.last_frame || {}
1079
1075
  );
1080
1076
  break;
1081
1077
  }
1082
- case F.RTCInfo: {
1083
- const { voice_id: m, type: P } = h;
1084
- if (this._buildInData.rtcInfo = { voiceId: m, type: P }, (n = this.$RTC) != null && n.joined)
1078
+ case W.RTCInfo: {
1079
+ const { voice_id: m, type: N } = g;
1080
+ if (this._buildInData.rtcInfo = { voiceId: m, type: N }, (n = this.$RTC) != null && n.joined)
1085
1081
  A.warn("已加入语音房间,无需重复加入!");
1086
1082
  else if (await ((u = this.$RTC) == null ? void 0 : u.join({
1087
1083
  voiceId: m,
1088
1084
  userId: ((i = this.selfInfo) == null ? void 0 : i.id) || "",
1089
1085
  roomId: (a = this.roomInfo) == null ? void 0 : a.info.room_code,
1090
- type: P
1086
+ type: N
1091
1087
  }))) {
1092
- const j = (f = this._options.initialMicroStatus) != null ? f : Z.OPEN;
1093
- await this.toggleMicro(j === Z.OPEN);
1088
+ const P = (f = this._options.initialMicroStatus) != null ? f : Z.OPEN;
1089
+ await this.toggleMicro(P === Z.OPEN);
1094
1090
  } else
1095
1091
  A.error("加入语音房间失败");
1096
1092
  break;
1097
1093
  }
1098
- case F.UserList: {
1099
- const m = h;
1100
- this._buildInData.userList = m, this.emit("userListUpdate", this.userList, _);
1094
+ case W.UserList: {
1095
+ const m = g;
1096
+ this._buildInData.userList = m, this.emit("userListUpdate", this.userList, v);
1101
1097
  break;
1102
1098
  }
1103
- case F.CustomEvent: {
1104
- const m = h;
1105
- this.emit("broadcast", m, _);
1099
+ case W.CustomEvent: {
1100
+ const m = g;
1101
+ this.emit("broadcast", m, v);
1106
1102
  break;
1107
1103
  }
1108
- case F.KeyframeSync: {
1109
- const m = h, P = Object.keys(
1104
+ case W.KeyframeSync: {
1105
+ const m = g, N = Object.keys(
1110
1106
  m
1111
1107
  ).reduce(
1112
- (M, j) => {
1108
+ (M, P) => {
1113
1109
  if (st(
1114
- m[j],
1115
- this._buildInData.keyframes[j],
1110
+ m[P],
1111
+ this._buildInData.keyframes[P],
1116
1112
  {
1117
1113
  deep: !0
1118
1114
  }
1119
1115
  ))
1120
1116
  return M;
1121
- const $ = [
1122
- m[j],
1123
- this._buildInData.keyframes[j],
1124
- _
1125
- ], J = j;
1117
+ const Y = [
1118
+ m[P],
1119
+ this._buildInData.keyframes[P],
1120
+ v
1121
+ ], K = P;
1126
1122
  return this.keyframes.emit(
1127
- J,
1128
- ...$
1129
- ), this._buildInData.keyframes[j] = m[j], M[j] = m[j], M;
1123
+ K,
1124
+ ...Y
1125
+ ), this._buildInData.keyframes[P] = m[P], M[P] = m[P], M;
1130
1126
  },
1131
1127
  {}
1132
1128
  );
1133
- this.emit("keyframes", P, _);
1129
+ this.emit("keyframes", N, v);
1134
1130
  break;
1135
1131
  }
1136
- case F.BuiltinMsg: {
1137
- const m = h;
1138
- this.emit("builtinEvent", m), m.event_type === K.UserChange && this.emit("userChange", m), m.event_type === K.RoomChange && this.emit("roomChange", m), m.event_type === K.UserChange && m.action === H.UserMicroStatus && await this.toggleMicro(
1132
+ case W.BuiltinMsg: {
1133
+ const m = g;
1134
+ this.emit("builtinEvent", m), m.event_type === q.UserChange && this.emit("userChange", m), m.event_type === q.RoomChange && this.emit("roomChange", m), m.event_type === q.UserChange && m.action === J.UserMicroStatus && await this.toggleMicro(
1139
1135
  m.data.status === Z.OPEN
1140
- ), m.event_type === K.RoomChange && m.action === H.RoomClose && await this.exit();
1136
+ ), m.event_type === q.RoomChange && m.action === J.RoomClose && await this.exit();
1141
1137
  break;
1142
1138
  }
1143
- case F.UserKickOut: {
1139
+ case W.UserKickOut: {
1144
1140
  this.emit("kickOut");
1145
1141
  break;
1146
1142
  }
1147
1143
  default:
1148
- console.warn("unknown command: ", v);
1144
+ console.warn("unknown command: ", _);
1149
1145
  }
1150
1146
  else
1151
1147
  this.emit("error", e);
@@ -1163,19 +1159,19 @@ class vr extends ae {
1163
1159
  * @returns
1164
1160
  */
1165
1161
  o(this, "connect", async (e = {}) => {
1166
- var u, f, v, h;
1167
- if (this._options.url = (f = (u = e.url) != null ? u : this._options.url) != null ? f : "", this._options.getTicket = (v = e.getTicket) != null ? v : this._options.getTicket, this._options.initialMicroStatus = (h = e.rtcMicStatus) != null ? h : this._options.initialMicroStatus, !/^ws(s):\/\//.test(this._options.url) || typeof this._options.getTicket != "function")
1162
+ var u, f, _, g;
1163
+ if (this._options.url = (f = (u = e.url) != null ? u : this._options.url) != null ? f : "", this._options.getTicket = (_ = e.getTicket) != null ? _ : this._options.getTicket, this._options.initialMicroStatus = (g = e.rtcMicStatus) != null ? g : this._options.initialMicroStatus, !/^ws(s):\/\//.test(this._options.url) || typeof this._options.getTicket != "function")
1168
1164
  return /^ws(s):\/\//.test(this._options.url) ? typeof this._options.getTicket != "function" ? new Error("getTicket muse be function") : !1 : new Error("Illegal realsee live room link");
1169
1165
  const { force: n = !1 } = e;
1170
1166
  if (this._options.rtc && !await this._options.rtc.detectMicro())
1171
1167
  return new Error("Failed to obtain microphone authorization");
1172
1168
  const i = this.state;
1173
- if (i === U.CONNECTING || i === U.OPEN)
1169
+ if (i === x.CONNECTING || i === x.OPEN)
1174
1170
  if (n)
1175
1171
  try {
1176
1172
  await this._controller.close("force close by connect");
1177
- } catch (_) {
1178
- console.warn(_);
1173
+ } catch (v) {
1174
+ console.warn(v);
1179
1175
  }
1180
1176
  else
1181
1177
  return new Error("已有Live实例正在连接中,请勿重复连接!");
@@ -1192,7 +1188,7 @@ class vr extends ae {
1192
1188
  */
1193
1189
  o(this, "exit", async () => {
1194
1190
  var e;
1195
- if (this._clearLiveData(), this.state !== U.OPEN)
1191
+ if (this._clearLiveData(), this.state !== x.OPEN)
1196
1192
  return !0;
1197
1193
  try {
1198
1194
  await ((e = this.$RTC) == null ? void 0 : e.quit());
@@ -1211,8 +1207,8 @@ class vr extends ae {
1211
1207
  var e, n;
1212
1208
  if ((n = (e = this.selfInfo) == null ? void 0 : e.permission) != null && n.close_live_room)
1213
1209
  return await this.updateStatus(
1214
- K.RoomChange,
1215
- H.RoomClose,
1210
+ q.RoomChange,
1211
+ J.RoomClose,
1216
1212
  {}
1217
1213
  );
1218
1214
  });
@@ -1227,8 +1223,8 @@ class vr extends ae {
1227
1223
  * @returns
1228
1224
  */
1229
1225
  o(this, "setSelfInfo", async (e) => await this.updateStatus(
1230
- K.UserChange,
1231
- H.UserInfo,
1226
+ q.UserChange,
1227
+ J.UserInfo,
1232
1228
  e
1233
1229
  ));
1234
1230
  // 仅用于用户自己的麦克风控制
@@ -1238,8 +1234,8 @@ class vr extends ae {
1238
1234
  return !1;
1239
1235
  const n = await ((u = this.$RTC) == null ? void 0 : u.toggleMicro(e));
1240
1236
  return n && await this.updateStatus(
1241
- K.UserChange,
1242
- H.UserMicroStatus,
1237
+ q.UserChange,
1238
+ J.UserMicroStatus,
1243
1239
  {
1244
1240
  status: e ? Z.OPEN : Z.CLOSE
1245
1241
  },
@@ -1255,8 +1251,8 @@ class vr extends ae {
1255
1251
  o(this, "forbidMicro", async (e, n) => {
1256
1252
  var i, a;
1257
1253
  return typeof this._options.canForbidUserMicro == "function" && !this._options.canForbidUserMicro(n) || !((a = (i = this.selfInfo) == null ? void 0 : i.permission) != null && a.control_other_micro) ? !1 : await this.updateStatus(
1258
- K.UserChange,
1259
- H.UserMicroStatus,
1254
+ q.UserChange,
1255
+ J.UserMicroStatus,
1260
1256
  {
1261
1257
  status: e
1262
1258
  },
@@ -1272,8 +1268,8 @@ class vr extends ae {
1272
1268
  o(this, "forbidSync", async (e, n) => {
1273
1269
  var i, a;
1274
1270
  return typeof this._options.canForbidUserSync == "function" && !this._options.canForbidUserSync(n) || !((a = (i = this.selfInfo) == null ? void 0 : i.permission) != null && a.control_other_sync) ? !1 : await this.updateStatus(
1275
- K.UserChange,
1276
- H.UserPermission,
1271
+ q.UserChange,
1272
+ J.UserPermission,
1277
1273
  { sync_frame: e },
1278
1274
  n
1279
1275
  );
@@ -1286,8 +1282,8 @@ class vr extends ae {
1286
1282
  o(this, "kick", async (e) => {
1287
1283
  var n, i;
1288
1284
  return typeof this._options.canForbidUserKick == "function" && !this._options.canForbidUserKick(e) || !((i = (n = this.selfInfo) == null ? void 0 : n.permission) != null && i.change_other_status) ? !1 : await this.updateStatus(
1289
- K.UserChange,
1290
- H.UserStatus,
1285
+ q.UserChange,
1286
+ J.UserStatus,
1291
1287
  {
1292
1288
  status: "KICK_OUT"
1293
1289
  },
@@ -1323,7 +1319,7 @@ class vr extends ae {
1323
1319
  case Q.RealseeBrowserChimeRTC:
1324
1320
  return new rt({
1325
1321
  getVoiceSign: this._options.getVoiceSign,
1326
- logLevel: e.__debug__ ? it.DEBUG : it.ERROR
1322
+ logLevel: e.__debug__ ? it.DEBUG : it.INFO
1327
1323
  });
1328
1324
  case Q.RealseeBrowserRTC:
1329
1325
  return this._options.autoPlayConfirm || A.error(
@@ -1425,16 +1421,16 @@ class vr extends ae {
1425
1421
  * @returns
1426
1422
  */
1427
1423
  async updateStatus(e, n, i, a) {
1428
- if (this.state !== U.OPEN)
1424
+ if (this.state !== x.OPEN)
1429
1425
  return !1;
1430
1426
  const u = Object.assign(
1431
1427
  { event_type: e, action: n },
1432
1428
  { data: i }
1433
- ), f = Pe(F.BuiltinMsg, u, a);
1429
+ ), f = Pe(W.BuiltinMsg, u, a);
1434
1430
  try {
1435
1431
  return this._controller.sendMessage(f), !0;
1436
- } catch (v) {
1437
- return A.error(v), !1;
1432
+ } catch (_) {
1433
+ return A.error(_), !1;
1438
1434
  }
1439
1435
  }
1440
1436
  /**
@@ -1445,21 +1441,21 @@ class vr extends ae {
1445
1441
  * @returns
1446
1442
  */
1447
1443
  broadcast(e, n, i) {
1448
- return this.state !== U.OPEN ? !1 : new Promise((a, u) => {
1444
+ return this.state !== x.OPEN ? !1 : new Promise((a, u) => {
1449
1445
  const f = Pe(
1450
- F.CustomEvent,
1446
+ W.CustomEvent,
1451
1447
  e,
1452
1448
  n
1453
- ), v = f.front_request_id, h = i ? setTimeout(() => {
1454
- u(new Error("RESPONSE TIMEOUT")), this.off("broadcast", _);
1455
- }, i) : void 0, _ = (E, w) => {
1456
- w === v && (h && clearTimeout(h), this.off("broadcast", _), a(E));
1449
+ ), _ = f.front_request_id, g = i ? setTimeout(() => {
1450
+ u(new Error("RESPONSE TIMEOUT")), this.off("broadcast", v);
1451
+ }, i) : void 0, v = (p, w) => {
1452
+ w === _ && (g && clearTimeout(g), this.off("broadcast", v), a(p));
1457
1453
  };
1458
- this.on("broadcast", _);
1454
+ this.on("broadcast", v);
1459
1455
  try {
1460
1456
  this._controller.sendMessage(f);
1461
- } catch (E) {
1462
- u(E);
1457
+ } catch (p) {
1458
+ u(p);
1463
1459
  }
1464
1460
  });
1465
1461
  }
@@ -1498,31 +1494,31 @@ function dt() {
1498
1494
  return !1;
1499
1495
  for (var u = {}, f = 0; f < 10; f++)
1500
1496
  u["_" + String.fromCharCode(f)] = f;
1501
- var v = Object.getOwnPropertyNames(u).map(function(_) {
1502
- return u[_];
1497
+ var _ = Object.getOwnPropertyNames(u).map(function(v) {
1498
+ return u[v];
1503
1499
  });
1504
- if (v.join("") !== "0123456789")
1500
+ if (_.join("") !== "0123456789")
1505
1501
  return !1;
1506
- var h = {};
1507
- return "abcdefghijklmnopqrst".split("").forEach(function(_) {
1508
- h[_] = _;
1509
- }), Object.keys(Object.assign({}, h)).join("") === "abcdefghijklmnopqrst";
1510
- } catch (_) {
1502
+ var g = {};
1503
+ return "abcdefghijklmnopqrst".split("").forEach(function(v) {
1504
+ g[v] = v;
1505
+ }), Object.keys(Object.assign({}, g)).join("") === "abcdefghijklmnopqrst";
1506
+ } catch (v) {
1511
1507
  return !1;
1512
1508
  }
1513
1509
  }
1514
1510
  return je = i() ? Object.assign : function(a, u) {
1515
- for (var f, v = n(a), h, _ = 1; _ < arguments.length; _++) {
1516
- f = Object(arguments[_]);
1517
- for (var E in f)
1518
- s.call(f, E) && (v[E] = f[E]);
1511
+ for (var f, _ = n(a), g, v = 1; v < arguments.length; v++) {
1512
+ f = Object(arguments[v]);
1513
+ for (var p in f)
1514
+ s.call(f, p) && (_[p] = f[p]);
1519
1515
  if (t) {
1520
- h = t(f);
1521
- for (var w = 0; w < h.length; w++)
1522
- e.call(f, h[w]) && (v[h[w]] = f[h[w]]);
1516
+ g = t(f);
1517
+ for (var w = 0; w < g.length; w++)
1518
+ e.call(f, g[w]) && (_[g[w]] = f[g[w]]);
1523
1519
  }
1524
1520
  }
1525
- return v;
1521
+ return _;
1526
1522
  }, je;
1527
1523
  }
1528
1524
  /** @license React v17.0.2
@@ -1544,15 +1540,15 @@ function br() {
1544
1540
  s = e("react.element"), ie.Fragment = e("react.fragment");
1545
1541
  }
1546
1542
  var n = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, i = Object.prototype.hasOwnProperty, a = { key: !0, ref: !0, __self: !0, __source: !0 };
1547
- function u(f, v, h) {
1548
- var _, E = {}, w = null, m = null;
1549
- h !== void 0 && (w = "" + h), v.key !== void 0 && (w = "" + v.key), v.ref !== void 0 && (m = v.ref);
1550
- for (_ in v)
1551
- i.call(v, _) && !a.hasOwnProperty(_) && (E[_] = v[_]);
1543
+ function u(f, _, g) {
1544
+ var v, p = {}, w = null, m = null;
1545
+ g !== void 0 && (w = "" + g), _.key !== void 0 && (w = "" + _.key), _.ref !== void 0 && (m = _.ref);
1546
+ for (v in _)
1547
+ i.call(_, v) && !a.hasOwnProperty(v) && (p[v] = _[v]);
1552
1548
  if (f && f.defaultProps)
1553
- for (_ in v = f.defaultProps, v)
1554
- E[_] === void 0 && (E[_] = v[_]);
1555
- return { $$typeof: s, type: f, key: w, ref: m, props: E, _owner: n.current };
1549
+ for (v in _ = f.defaultProps, _)
1550
+ p[v] === void 0 && (p[v] = _[v]);
1551
+ return { $$typeof: s, type: f, key: w, ref: m, props: p, _owner: n.current };
1556
1552
  }
1557
1553
  return ie.jsx = u, ie.jsxs = u, ie;
1558
1554
  }
@@ -1571,10 +1567,10 @@ function Cr() {
1571
1567
  process.env.NODE_ENV !== "production" && function() {
1572
1568
  var s = V, e = dt(), n = 60103, i = 60106;
1573
1569
  t.Fragment = 60107;
1574
- var a = 60108, u = 60114, f = 60109, v = 60110, h = 60112, _ = 60113, E = 60120, w = 60115, m = 60116, P = 60121, M = 60122, j = 60117, $ = 60129, J = 60131;
1570
+ var a = 60108, u = 60114, f = 60109, _ = 60110, g = 60112, v = 60113, p = 60120, w = 60115, m = 60116, N = 60121, M = 60122, P = 60117, Y = 60129, K = 60131;
1575
1571
  if (typeof Symbol == "function" && Symbol.for) {
1576
1572
  var I = Symbol.for;
1577
- n = I("react.element"), i = I("react.portal"), t.Fragment = I("react.fragment"), a = I("react.strict_mode"), u = I("react.profiler"), f = I("react.provider"), v = I("react.context"), h = I("react.forward_ref"), _ = I("react.suspense"), E = I("react.suspense_list"), w = I("react.memo"), m = I("react.lazy"), P = I("react.block"), M = I("react.server.block"), j = I("react.fundamental"), I("react.scope"), I("react.opaque.id"), $ = I("react.debug_trace_mode"), I("react.offscreen"), J = I("react.legacy_hidden");
1573
+ n = I("react.element"), i = I("react.portal"), t.Fragment = I("react.fragment"), a = I("react.strict_mode"), u = I("react.profiler"), f = I("react.provider"), _ = I("react.context"), g = I("react.forward_ref"), v = I("react.suspense"), p = I("react.suspense_list"), w = I("react.memo"), m = I("react.lazy"), N = I("react.block"), M = I("react.server.block"), P = I("react.fundamental"), I("react.scope"), I("react.opaque.id"), Y = I("react.debug_trace_mode"), I("react.offscreen"), K = I("react.legacy_hidden");
1578
1574
  }
1579
1575
  var d = typeof Symbol == "function" && Symbol.iterator, S = "@@iterator";
1580
1576
  function L(r) {
@@ -1586,14 +1582,14 @@ function Cr() {
1586
1582
  var b = s.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
1587
1583
  function C(r) {
1588
1584
  {
1589
- for (var c = arguments.length, l = new Array(c > 1 ? c - 1 : 0), g = 1; g < c; g++)
1590
- l[g - 1] = arguments[g];
1585
+ for (var c = arguments.length, l = new Array(c > 1 ? c - 1 : 0), h = 1; h < c; h++)
1586
+ l[h - 1] = arguments[h];
1591
1587
  D("error", r, l);
1592
1588
  }
1593
1589
  }
1594
1590
  function D(r, c, l) {
1595
1591
  {
1596
- var g = b.ReactDebugCurrentFrame, O = g.getStackAddendum();
1592
+ var h = b.ReactDebugCurrentFrame, O = h.getStackAddendum();
1597
1593
  O !== "" && (c += "%s", l = l.concat([O]));
1598
1594
  var R = l.map(function(y) {
1599
1595
  return "" + y;
@@ -1601,18 +1597,18 @@ function Cr() {
1601
1597
  R.unshift("Warning: " + c), Function.prototype.apply.call(console[r], console, R);
1602
1598
  }
1603
1599
  }
1604
- var B = !1;
1600
+ var U = !1;
1605
1601
  function z(r) {
1606
- return !!(typeof r == "string" || typeof r == "function" || r === t.Fragment || r === u || r === $ || r === a || r === _ || r === E || r === J || B || typeof r == "object" && r !== null && (r.$$typeof === m || r.$$typeof === w || r.$$typeof === f || r.$$typeof === v || r.$$typeof === h || r.$$typeof === j || r.$$typeof === P || r[0] === M));
1602
+ return !!(typeof r == "string" || typeof r == "function" || r === t.Fragment || r === u || r === Y || r === a || r === v || r === p || r === K || U || typeof r == "object" && r !== null && (r.$$typeof === m || r.$$typeof === w || r.$$typeof === f || r.$$typeof === _ || r.$$typeof === g || r.$$typeof === P || r.$$typeof === N || r[0] === M));
1607
1603
  }
1608
1604
  function ue(r, c, l) {
1609
- var g = c.displayName || c.name || "";
1610
- return r.displayName || (g !== "" ? l + "(" + g + ")" : l);
1605
+ var h = c.displayName || c.name || "";
1606
+ return r.displayName || (h !== "" ? l + "(" + h + ")" : l);
1611
1607
  }
1612
1608
  function be(r) {
1613
1609
  return r.displayName || "Context";
1614
1610
  }
1615
- function q(r) {
1611
+ function F(r) {
1616
1612
  if (r == null)
1617
1613
  return null;
1618
1614
  if (typeof r.tag == "number" && C("Received an unexpected object in getComponentName(). This is likely a bug in React. Please file an issue."), typeof r == "function")
@@ -1628,29 +1624,29 @@ function Cr() {
1628
1624
  return "Profiler";
1629
1625
  case a:
1630
1626
  return "StrictMode";
1631
- case _:
1627
+ case v:
1632
1628
  return "Suspense";
1633
- case E:
1629
+ case p:
1634
1630
  return "SuspenseList";
1635
1631
  }
1636
1632
  if (typeof r == "object")
1637
1633
  switch (r.$$typeof) {
1638
- case v:
1634
+ case _:
1639
1635
  var c = r;
1640
1636
  return be(c) + ".Consumer";
1641
1637
  case f:
1642
1638
  var l = r;
1643
1639
  return be(l._context) + ".Provider";
1644
- case h:
1640
+ case g:
1645
1641
  return ue(r, r.render, "ForwardRef");
1646
1642
  case w:
1647
- return q(r.type);
1648
- case P:
1649
- return q(r._render);
1643
+ return F(r.type);
1644
+ case N:
1645
+ return F(r._render);
1650
1646
  case m: {
1651
- var g = r, O = g._payload, R = g._init;
1647
+ var h = r, O = h._payload, R = h._init;
1652
1648
  try {
1653
- return q(R(O));
1649
+ return F(R(O));
1654
1650
  } catch (y) {
1655
1651
  return null;
1656
1652
  }
@@ -1658,14 +1654,14 @@ function Cr() {
1658
1654
  }
1659
1655
  return null;
1660
1656
  }
1661
- var ee = 0, T, W, te, le, Me, $e, xe;
1657
+ var ee = 0, T, B, te, le, Me, $e, xe;
1662
1658
  function Ue() {
1663
1659
  }
1664
1660
  Ue.__reactDisabledLog = !0;
1665
1661
  function ht() {
1666
1662
  {
1667
1663
  if (ee === 0) {
1668
- T = console.log, W = console.info, te = console.warn, le = console.error, Me = console.group, $e = console.groupCollapsed, xe = console.groupEnd;
1664
+ T = console.log, B = console.info, te = console.warn, le = console.error, Me = console.group, $e = console.groupCollapsed, xe = console.groupEnd;
1669
1665
  var r = {
1670
1666
  configurable: !0,
1671
1667
  enumerable: !0,
@@ -1698,7 +1694,7 @@ function Cr() {
1698
1694
  value: T
1699
1695
  }),
1700
1696
  info: e({}, r, {
1701
- value: W
1697
+ value: B
1702
1698
  }),
1703
1699
  warn: e({}, r, {
1704
1700
  value: te
@@ -1727,8 +1723,8 @@ function Cr() {
1727
1723
  try {
1728
1724
  throw Error();
1729
1725
  } catch (O) {
1730
- var g = O.stack.trim().match(/\n( *(at )?)/);
1731
- ye = g && g[1] || "";
1726
+ var h = O.stack.trim().match(/\n( *(at )?)/);
1727
+ ye = h && h[1] || "";
1732
1728
  }
1733
1729
  return `
1734
1730
  ` + ye + r;
@@ -1747,7 +1743,7 @@ function Cr() {
1747
1743
  if (l !== void 0)
1748
1744
  return l;
1749
1745
  }
1750
- var g;
1746
+ var h;
1751
1747
  we = !0;
1752
1748
  var O = Error.prepareStackTrace;
1753
1749
  Error.prepareStackTrace = void 0;
@@ -1765,42 +1761,42 @@ function Cr() {
1765
1761
  }), typeof Reflect == "object" && Reflect.construct) {
1766
1762
  try {
1767
1763
  Reflect.construct(y, []);
1768
- } catch (G) {
1769
- g = G;
1764
+ } catch (H) {
1765
+ h = H;
1770
1766
  }
1771
1767
  Reflect.construct(r, [], y);
1772
1768
  } else {
1773
1769
  try {
1774
1770
  y.call();
1775
- } catch (G) {
1776
- g = G;
1771
+ } catch (H) {
1772
+ h = H;
1777
1773
  }
1778
1774
  r.call(y.prototype);
1779
1775
  }
1780
1776
  } else {
1781
1777
  try {
1782
1778
  throw Error();
1783
- } catch (G) {
1784
- g = G;
1779
+ } catch (H) {
1780
+ h = H;
1785
1781
  }
1786
1782
  r();
1787
1783
  }
1788
- } catch (G) {
1789
- if (G && g && typeof G.stack == "string") {
1790
- for (var p = G.stack.split(`
1791
- `), x = g.stack.split(`
1792
- `), k = p.length - 1, N = x.length - 1; k >= 1 && N >= 0 && p[k] !== x[N]; )
1793
- N--;
1794
- for (; k >= 1 && N >= 0; k--, N--)
1795
- if (p[k] !== x[N]) {
1796
- if (k !== 1 || N !== 1)
1784
+ } catch (H) {
1785
+ if (H && h && typeof H.stack == "string") {
1786
+ for (var E = H.stack.split(`
1787
+ `), $ = h.stack.split(`
1788
+ `), k = E.length - 1, j = $.length - 1; k >= 1 && j >= 0 && E[k] !== $[j]; )
1789
+ j--;
1790
+ for (; k >= 1 && j >= 0; k--, j--)
1791
+ if (E[k] !== $[j]) {
1792
+ if (k !== 1 || j !== 1)
1797
1793
  do
1798
- if (k--, N--, N < 0 || p[k] !== x[N]) {
1799
- var Y = `
1800
- ` + p[k].replace(" at new ", " at ");
1801
- return typeof r == "function" && de.set(r, Y), Y;
1794
+ if (k--, j--, j < 0 || E[k] !== $[j]) {
1795
+ var G = `
1796
+ ` + E[k].replace(" at new ", " at ");
1797
+ return typeof r == "function" && de.set(r, G), G;
1802
1798
  }
1803
- while (k >= 1 && N >= 0);
1799
+ while (k >= 1 && j >= 0);
1804
1800
  break;
1805
1801
  }
1806
1802
  }
@@ -1825,21 +1821,21 @@ function Cr() {
1825
1821
  if (typeof r == "string")
1826
1822
  return fe(r);
1827
1823
  switch (r) {
1828
- case _:
1824
+ case v:
1829
1825
  return fe("Suspense");
1830
- case E:
1826
+ case p:
1831
1827
  return fe("SuspenseList");
1832
1828
  }
1833
1829
  if (typeof r == "object")
1834
1830
  switch (r.$$typeof) {
1835
- case h:
1831
+ case g:
1836
1832
  return We(r.render);
1837
1833
  case w:
1838
1834
  return he(r.type, c, l);
1839
- case P:
1835
+ case N:
1840
1836
  return We(r._render);
1841
1837
  case m: {
1842
- var g = r, O = g._payload, R = g._init;
1838
+ var h = r, O = h._payload, R = h._init;
1843
1839
  try {
1844
1840
  return he(R(O), c, l);
1845
1841
  } catch (y) {
@@ -1856,22 +1852,22 @@ function Cr() {
1856
1852
  } else
1857
1853
  qe.setExtraStackFrame(null);
1858
1854
  }
1859
- function vt(r, c, l, g, O) {
1855
+ function vt(r, c, l, h, O) {
1860
1856
  {
1861
1857
  var R = Function.call.bind(Object.prototype.hasOwnProperty);
1862
1858
  for (var y in r)
1863
1859
  if (R(r, y)) {
1864
- var p = void 0;
1860
+ var E = void 0;
1865
1861
  try {
1866
1862
  if (typeof r[y] != "function") {
1867
- var x = Error((g || "React class") + ": " + l + " type `" + y + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof r[y] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
1868
- throw x.name = "Invariant Violation", x;
1863
+ var $ = Error((h || "React class") + ": " + l + " type `" + y + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof r[y] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
1864
+ throw $.name = "Invariant Violation", $;
1869
1865
  }
1870
- p = r[y](c, y, g, l, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
1866
+ E = r[y](c, y, h, l, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
1871
1867
  } catch (k) {
1872
- p = k;
1868
+ E = k;
1873
1869
  }
1874
- p && !(p instanceof Error) && (_e(O), C("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", g || "React class", l, y, typeof p), _e(null)), p instanceof Error && !(p.message in Fe) && (Fe[p.message] = !0, _e(O), C("Failed %s type: %s", l, p.message), _e(null));
1870
+ E && !(E instanceof Error) && (_e(O), C("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", h || "React class", l, y, typeof E), _e(null)), E instanceof Error && !(E.message in Fe) && (Fe[E.message] = !0, _e(O), C("Failed %s type: %s", l, E.message), _e(null));
1875
1871
  }
1876
1872
  }
1877
1873
  }
@@ -1900,8 +1896,8 @@ function Cr() {
1900
1896
  }
1901
1897
  function Ct(r, c) {
1902
1898
  if (typeof r.ref == "string" && se.current && c && se.current.stateNode !== c) {
1903
- var l = q(se.current.type);
1904
- Oe[l] || (C('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', q(se.current.type), r.ref), Oe[l] = !0);
1899
+ var l = F(se.current.type);
1900
+ Oe[l] || (C('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', F(se.current.type), r.ref), Oe[l] = !0);
1905
1901
  }
1906
1902
  }
1907
1903
  function yt(r, c) {
@@ -1926,8 +1922,8 @@ function Cr() {
1926
1922
  });
1927
1923
  }
1928
1924
  }
1929
- var St = function(r, c, l, g, O, R, y) {
1930
- var p = {
1925
+ var St = function(r, c, l, h, O, R, y) {
1926
+ var E = {
1931
1927
  // This tag allows us to uniquely identify this as a React Element
1932
1928
  $$typeof: n,
1933
1929
  // Built-in properties that belong on the element
@@ -1938,27 +1934,27 @@ function Cr() {
1938
1934
  // Record the component responsible for creating this element.
1939
1935
  _owner: R
1940
1936
  };
1941
- return p._store = {}, Object.defineProperty(p._store, "validated", {
1937
+ return E._store = {}, Object.defineProperty(E._store, "validated", {
1942
1938
  configurable: !1,
1943
1939
  enumerable: !1,
1944
1940
  writable: !0,
1945
1941
  value: !1
1946
- }), Object.defineProperty(p, "_self", {
1942
+ }), Object.defineProperty(E, "_self", {
1947
1943
  configurable: !1,
1948
1944
  enumerable: !1,
1949
1945
  writable: !1,
1950
- value: g
1951
- }), Object.defineProperty(p, "_source", {
1946
+ value: h
1947
+ }), Object.defineProperty(E, "_source", {
1952
1948
  configurable: !1,
1953
1949
  enumerable: !1,
1954
1950
  writable: !1,
1955
1951
  value: O
1956
- }), Object.freeze && (Object.freeze(p.props), Object.freeze(p)), p;
1952
+ }), Object.freeze && (Object.freeze(E.props), Object.freeze(E)), E;
1957
1953
  };
1958
- function Ot(r, c, l, g, O) {
1954
+ function Ot(r, c, l, h, O) {
1959
1955
  {
1960
- var R, y = {}, p = null, x = null;
1961
- l !== void 0 && (p = "" + l), bt(c) && (p = "" + c.key), Et(c) && (x = c.ref, Ct(c, O));
1956
+ var R, y = {}, E = null, $ = null;
1957
+ l !== void 0 && (E = "" + l), bt(c) && (E = "" + c.key), Et(c) && ($ = c.ref, Ct(c, O));
1962
1958
  for (R in c)
1963
1959
  Se.call(c, R) && !pt.hasOwnProperty(R) && (y[R] = c[R]);
1964
1960
  if (r && r.defaultProps) {
@@ -1966,11 +1962,11 @@ function Cr() {
1966
1962
  for (R in k)
1967
1963
  y[R] === void 0 && (y[R] = k[R]);
1968
1964
  }
1969
- if (p || x) {
1970
- var N = typeof r == "function" ? r.displayName || r.name || "Unknown" : r;
1971
- p && yt(y, N), x && wt(y, N);
1965
+ if (E || $) {
1966
+ var j = typeof r == "function" ? r.displayName || r.name || "Unknown" : r;
1967
+ E && yt(y, j), $ && wt(y, j);
1972
1968
  }
1973
- return St(r, p, x, O, g, se.current, y);
1969
+ return St(r, E, $, O, h, se.current, y);
1974
1970
  }
1975
1971
  }
1976
1972
  var Re = b.ReactCurrentOwner, Ge = b.ReactDebugCurrentFrame;
@@ -1989,7 +1985,7 @@ function Cr() {
1989
1985
  function He() {
1990
1986
  {
1991
1987
  if (Re.current) {
1992
- var r = q(Re.current.type);
1988
+ var r = F(Re.current.type);
1993
1989
  if (r)
1994
1990
  return `
1995
1991
 
@@ -2031,8 +2027,8 @@ Check the top-level render call using <` + l + ">.");
2031
2027
  if (Je[l])
2032
2028
  return;
2033
2029
  Je[l] = !0;
2034
- var g = "";
2035
- r && r._owner && r._owner !== Re.current && (g = " It was passed a child from " + q(r._owner.type) + "."), re(r), C('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', l, g), re(null);
2030
+ var h = "";
2031
+ r && r._owner && r._owner !== Re.current && (h = " It was passed a child from " + F(r._owner.type) + "."), re(r), C('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', l, h), re(null);
2036
2032
  }
2037
2033
  }
2038
2034
  function Xe(r, c) {
@@ -2041,8 +2037,8 @@ Check the top-level render call using <` + l + ">.");
2041
2037
  return;
2042
2038
  if (Array.isArray(r))
2043
2039
  for (var l = 0; l < r.length; l++) {
2044
- var g = r[l];
2045
- Te(g) && ze(g, c);
2040
+ var h = r[l];
2041
+ Te(h) && ze(h, c);
2046
2042
  }
2047
2043
  else if (Te(r))
2048
2044
  r._store && (r._store.validated = !0);
@@ -2062,18 +2058,18 @@ Check the top-level render call using <` + l + ">.");
2062
2058
  var l;
2063
2059
  if (typeof c == "function")
2064
2060
  l = c.propTypes;
2065
- else if (typeof c == "object" && (c.$$typeof === h || // Note: Memo only checks outer props here.
2061
+ else if (typeof c == "object" && (c.$$typeof === g || // Note: Memo only checks outer props here.
2066
2062
  // Inner props are checked in the reconciler.
2067
2063
  c.$$typeof === w))
2068
2064
  l = c.propTypes;
2069
2065
  else
2070
2066
  return;
2071
2067
  if (l) {
2072
- var g = q(c);
2073
- vt(l, r.props, "prop", g, r);
2068
+ var h = F(c);
2069
+ vt(l, r.props, "prop", h, r);
2074
2070
  } else if (c.PropTypes !== void 0 && !Ie) {
2075
2071
  Ie = !0;
2076
- var O = q(c);
2072
+ var O = F(c);
2077
2073
  C("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", O || "Unknown");
2078
2074
  }
2079
2075
  typeof c.getDefaultProps == "function" && !c.getDefaultProps.isReactClassApproved && C("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
@@ -2082,43 +2078,43 @@ Check the top-level render call using <` + l + ">.");
2082
2078
  function kt(r) {
2083
2079
  {
2084
2080
  for (var c = Object.keys(r.props), l = 0; l < c.length; l++) {
2085
- var g = c[l];
2086
- if (g !== "children" && g !== "key") {
2087
- re(r), C("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", g), re(null);
2081
+ var h = c[l];
2082
+ if (h !== "children" && h !== "key") {
2083
+ re(r), C("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", h), re(null);
2088
2084
  break;
2089
2085
  }
2090
2086
  }
2091
2087
  r.ref !== null && (re(r), C("Invalid attribute `ref` supplied to `React.Fragment`."), re(null));
2092
2088
  }
2093
2089
  }
2094
- function Ze(r, c, l, g, O, R) {
2090
+ function Ze(r, c, l, h, O, R) {
2095
2091
  {
2096
2092
  var y = z(r);
2097
2093
  if (!y) {
2098
- var p = "";
2099
- (r === void 0 || typeof r == "object" && r !== null && Object.keys(r).length === 0) && (p += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
2100
- var x = Rt(O);
2101
- x ? p += x : p += He();
2094
+ var E = "";
2095
+ (r === void 0 || typeof r == "object" && r !== null && Object.keys(r).length === 0) && (E += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
2096
+ var $ = Rt(O);
2097
+ $ ? E += $ : E += He();
2102
2098
  var k;
2103
- r === null ? k = "null" : Array.isArray(r) ? k = "array" : r !== void 0 && r.$$typeof === n ? (k = "<" + (q(r.type) || "Unknown") + " />", p = " Did you accidentally export a JSX literal instead of a component?") : k = typeof r, C("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", k, p);
2099
+ r === null ? k = "null" : Array.isArray(r) ? k = "array" : r !== void 0 && r.$$typeof === n ? (k = "<" + (F(r.type) || "Unknown") + " />", E = " Did you accidentally export a JSX literal instead of a component?") : k = typeof r, C("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", k, E);
2104
2100
  }
2105
- var N = Ot(r, c, l, O, R);
2106
- if (N == null)
2107
- return N;
2101
+ var j = Ot(r, c, l, O, R);
2102
+ if (j == null)
2103
+ return j;
2108
2104
  if (y) {
2109
- var Y = c.children;
2110
- if (Y !== void 0)
2111
- if (g)
2112
- if (Array.isArray(Y)) {
2113
- for (var ne = 0; ne < Y.length; ne++)
2114
- Xe(Y[ne], r);
2115
- Object.freeze && Object.freeze(Y);
2105
+ var G = c.children;
2106
+ if (G !== void 0)
2107
+ if (h)
2108
+ if (Array.isArray(G)) {
2109
+ for (var ne = 0; ne < G.length; ne++)
2110
+ Xe(G[ne], r);
2111
+ Object.freeze && Object.freeze(G);
2116
2112
  } else
2117
2113
  C("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
2118
2114
  else
2119
- Xe(Y, r);
2115
+ Xe(G, r);
2120
2116
  }
2121
- return r === t.Fragment ? kt(N) : Tt(N), N;
2117
+ return r === t.Fragment ? kt(j) : Tt(j), j;
2122
2118
  }
2123
2119
  }
2124
2120
  function Pt(r, c, l) {
@@ -2142,32 +2138,32 @@ function kr(t) {
2142
2138
  if (!d)
2143
2139
  throw new Error("LiveProvider never found.");
2144
2140
  return d;
2145
- }, u = () => e, f = () => e.$RTC, v = () => f(), h = () => async (d) => await e.connect(d);
2146
- function _(d, S, L = []) {
2141
+ }, u = () => e, f = () => e.$RTC, _ = () => f(), g = () => async (d) => await e.connect(d);
2142
+ function v(d, S, L = []) {
2147
2143
  const b = a(), C = [b, name, ...L], D = () => b.keyframes.off(d, S);
2148
2144
  return V.useEffect(() => (b.keyframes.on(d, S), D), C), D;
2149
2145
  }
2150
- function E() {
2146
+ function p() {
2151
2147
  const d = a();
2152
2148
  return {
2153
2149
  connect: async (T) => await d.connect(T),
2154
- broadcast: async (T, W, te = 0) => await d.broadcast(T, W, te),
2150
+ broadcast: async (T, B, te = 0) => await d.broadcast(T, B, te),
2155
2151
  exit: async () => await d.exit(),
2156
2152
  kick: async (T) => await d.kick(T),
2157
2153
  toggleMicro: (T) => d.toggleMicro(T),
2158
- forbidMicro: async (T, W = []) => await d.forbidMicro(T, W),
2159
- forbidSync: (T, W = []) => d.forbidSync(T, W),
2160
- sendKeyframe: (T, W) => d.sendKeyframe(T, W),
2154
+ forbidMicro: async (T, B = []) => await d.forbidMicro(T, B),
2155
+ forbidSync: (T, B = []) => d.forbidSync(T, B),
2156
+ sendKeyframe: (T, B) => d.sendKeyframe(T, B),
2161
2157
  getFramesByKey: (T) => d.getFramesByKey(T),
2162
2158
  setSelfInfo: (T) => d.setSelfInfo(T),
2163
- updateStatus: (T, W, te, le) => d.updateStatus(T, W, te, le)
2159
+ updateStatus: (T, B, te, le) => d.updateStatus(T, B, te, le)
2164
2160
  };
2165
2161
  }
2166
2162
  function w(d) {
2167
2163
  const S = a(), [L, b] = V.useState(S.getFramesByKey(d));
2168
2164
  V.useEffect(() => {
2169
- const D = (ue) => b(ue), B = d, z = D;
2170
- return S.keyframes.on(B, z), () => S.keyframes.off(B, z);
2165
+ const D = (ue) => b(ue), U = d, z = D;
2166
+ return S.keyframes.on(U, z), () => S.keyframes.off(U, z);
2171
2167
  }, [S]);
2172
2168
  const C = V.useCallback(
2173
2169
  (D) => S.sendKeyframe(d, D),
@@ -2179,7 +2175,7 @@ function kr(t) {
2179
2175
  const b = a(), C = () => b.off(d, S), D = [b, d, ...L];
2180
2176
  return V.useEffect(() => (b.on(d, S), C), D), C;
2181
2177
  }
2182
- function P() {
2178
+ function N() {
2183
2179
  const d = a(), [S, L] = V.useState(d.state);
2184
2180
  return V.useEffect(() => {
2185
2181
  const b = (C) => L(C);
@@ -2189,21 +2185,21 @@ function kr(t) {
2189
2185
  function M() {
2190
2186
  const d = a();
2191
2187
  return {
2192
- join: (B) => d.$RTC.join(B),
2188
+ join: (U) => d.$RTC.join(U),
2193
2189
  quit: () => d.$RTC.quit(),
2194
2190
  shock: () => {
2195
- var B, z;
2196
- return (z = (B = d.$RTC).shock) == null ? void 0 : z.call(B);
2191
+ var U, z;
2192
+ return (z = (U = d.$RTC).shock) == null ? void 0 : z.call(U);
2197
2193
  },
2198
- toggleMicro: (B) => d.$RTC.toggleMicro(B),
2194
+ toggleMicro: (U) => d.$RTC.toggleMicro(U),
2199
2195
  detectMicro: () => d.$RTC.detectMicro()
2200
2196
  };
2201
2197
  }
2202
- function j(d, S, L = []) {
2198
+ function P(d, S, L = []) {
2203
2199
  const b = a(), C = () => b.$RTC.off(d, S), D = [b, d, ...L];
2204
2200
  return V.useEffect(() => (b.$RTC.on(d, S), C), D), C;
2205
2201
  }
2206
- function $() {
2202
+ function Y() {
2207
2203
  const d = a(), [S, L] = V.useState(
2208
2204
  d.selfInfo || {}
2209
2205
  ), b = (D) => L(D);
@@ -2214,7 +2210,7 @@ function kr(t) {
2214
2210
  );
2215
2211
  return [S, C];
2216
2212
  }
2217
- function J() {
2213
+ function K() {
2218
2214
  const d = a(), [S, L] = V.useState(
2219
2215
  d.snapshot
2220
2216
  );
@@ -2232,17 +2228,17 @@ function kr(t) {
2232
2228
  jsBridge: n,
2233
2229
  LiveProvider: i,
2234
2230
  unsafe__useLiveInstance: u,
2235
- unsafe__useRTCInstance: v,
2236
- useConnect: h,
2231
+ unsafe__useRTCInstance: _,
2232
+ useConnect: g,
2237
2233
  useKeyframe: w,
2238
- useKeyframeUpdateCallback: _,
2239
- useLiveAction: E,
2234
+ useKeyframeUpdateCallback: v,
2235
+ useLiveAction: p,
2240
2236
  useLiveEventCallback: m,
2241
- useLiveState: P,
2237
+ useLiveState: N,
2242
2238
  useRTCAction: M,
2243
- useRTCEventCallback: j,
2244
- useSelfInfo: $,
2245
- useKeyframesSnapshot: J,
2239
+ useRTCEventCallback: P,
2240
+ useSelfInfo: Y,
2241
+ useKeyframesSnapshot: K,
2246
2242
  useUserList: I
2247
2243
  };
2248
2244
  }
@@ -2250,11 +2246,11 @@ export {
2250
2246
  tt as BrowserRTC,
2251
2247
  rt as BrowserRTC4Chime,
2252
2248
  ut as BuiltInRTCType,
2253
- H as BuiltinActionType,
2254
- K as BuiltinEventType,
2255
- F as Command,
2249
+ J as BuiltinActionType,
2250
+ q as BuiltinEventType,
2251
+ W as Command,
2256
2252
  De as CoreRTC,
2257
- U as LiveState,
2253
+ x as LiveState,
2258
2254
  Zt as MemUserStatus,
2259
2255
  Z as MicroStatus,
2260
2256
  lt as RTCJoinedInfoCodeEnum,