@realsee/live 0.6.2 → 0.6.3
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.cjs.js +9 -9
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +262 -262
- package/dist/index.es.js.map +1 -1
- package/package.json +1 -1
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,
|
|
84
|
-
|
|
83
|
+
const [f, v = !1] = u, h = f(...e);
|
|
84
|
+
v && this.off(s, f), h === !1 && (n = !0);
|
|
85
85
|
}
|
|
86
86
|
return n;
|
|
87
87
|
}
|
|
@@ -108,7 +108,7 @@ const Kt = () => {
|
|
|
108
108
|
info: Gt,
|
|
109
109
|
error: Ht,
|
|
110
110
|
warn: Jt
|
|
111
|
-
},
|
|
111
|
+
}, L = zt;
|
|
112
112
|
function X() {
|
|
113
113
|
return ((1 + Math.random()) * 65536 | 0).toString(16).substring(1);
|
|
114
114
|
}
|
|
@@ -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
|
|
177
|
-
this._autoPlayConfirm({ onConfirm:
|
|
176
|
+
const h = () => n.resume();
|
|
177
|
+
this._autoPlayConfirm({ onConfirm: h });
|
|
178
178
|
}
|
|
179
179
|
})) : n.play(a);
|
|
180
180
|
});
|
|
@@ -194,7 +194,7 @@ class tt extends De {
|
|
|
194
194
|
const n = { audio: !0, video: !1 };
|
|
195
195
|
try {
|
|
196
196
|
navigator.mediaDevices.getUserMedia(n).then(() => e(!0)).catch((i) => {
|
|
197
|
-
|
|
197
|
+
L.error(i.message), e(!1);
|
|
198
198
|
});
|
|
199
199
|
} catch (i) {
|
|
200
200
|
console.error(i), e(!1);
|
|
@@ -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:
|
|
219
|
+
u.result.map(({ userId: f, audioVolume: v }) => ({
|
|
220
220
|
userId: f,
|
|
221
|
-
audioVolume:
|
|
221
|
+
audioVolume: v
|
|
222
222
|
}))
|
|
223
223
|
)
|
|
224
224
|
), (a = this._trtc.client) == null || a.on("error", (u) => this.emit("error", u));
|
|
@@ -287,43 +287,43 @@ class rt extends De {
|
|
|
287
287
|
* 注册rtc事件
|
|
288
288
|
*/
|
|
289
289
|
o(this, "_registerRtcEvent", () => {
|
|
290
|
-
var n, i, a, u, f,
|
|
290
|
+
var n, i, a, u, f, v;
|
|
291
291
|
const e = ((a = (i = (n = this.meetingSession) == null ? void 0 : n.configuration) == null ? void 0 : i.credentials) == null ? void 0 : a.attendeeId) || "";
|
|
292
292
|
if (e) {
|
|
293
|
-
const
|
|
294
|
-
const
|
|
295
|
-
return
|
|
296
|
-
|
|
293
|
+
const h = /* @__PURE__ */ new Map(), _ = () => {
|
|
294
|
+
const E = [];
|
|
295
|
+
return h.forEach((w, m) => {
|
|
296
|
+
E.push({
|
|
297
297
|
userId: w.userId,
|
|
298
298
|
volume: w.muted || w.signalStrength === 0 || !Boolean(w.volume) ? 0 : w.volume
|
|
299
299
|
});
|
|
300
|
-
}),
|
|
300
|
+
}), E;
|
|
301
301
|
};
|
|
302
302
|
(u = this.meetingSession) == null || u.audioVideo.realtimeSubscribeToAttendeeIdPresence(
|
|
303
|
-
(
|
|
304
|
-
var
|
|
303
|
+
(E, w, m) => {
|
|
304
|
+
var A;
|
|
305
305
|
if (!w) {
|
|
306
|
-
|
|
306
|
+
h.delete(E), this.emit("userVolumes", _());
|
|
307
307
|
return;
|
|
308
308
|
}
|
|
309
|
-
(
|
|
310
|
-
|
|
311
|
-
(M,
|
|
312
|
-
new et(M).base() === M && (
|
|
309
|
+
(A = this.meetingSession) == null || A.audioVideo.realtimeSubscribeToVolumeIndicator(
|
|
310
|
+
E,
|
|
311
|
+
(M, k, H, J) => {
|
|
312
|
+
new et(M).base() === M && (h.set(M, {
|
|
313
313
|
userId: m || M,
|
|
314
|
-
volume:
|
|
315
|
-
muted:
|
|
316
|
-
signalStrength:
|
|
317
|
-
}), this.emit("userVolumes",
|
|
314
|
+
volume: k,
|
|
315
|
+
muted: H,
|
|
316
|
+
signalStrength: J
|
|
317
|
+
}), this.emit("userVolumes", _()));
|
|
318
318
|
}
|
|
319
319
|
);
|
|
320
320
|
}
|
|
321
321
|
), (f = this.meetingSession) == null || f.audioVideo.realtimeSubscribeToVolumeIndicator(
|
|
322
322
|
e,
|
|
323
|
-
(
|
|
324
|
-
new et(
|
|
323
|
+
(E, w, m, A) => {
|
|
324
|
+
new et(E).base() === E && A !== null && A !== 1 && this.emit("weakNetwork");
|
|
325
325
|
}
|
|
326
|
-
), (
|
|
326
|
+
), (v = this.meetingSession) == null || v.audioVideo.realtimeSubscribeToFatalError((E) => this.emit("error", E));
|
|
327
327
|
}
|
|
328
328
|
});
|
|
329
329
|
this._getVoiceSign = e.getVoiceSign, this._initDom(), this.logger = new Mt("WebRTCLogger", e.logLevel || $t.INFO), this.deviceController = new xt(this.logger), this.initObservers();
|
|
@@ -335,45 +335,45 @@ class rt extends De {
|
|
|
335
335
|
*/
|
|
336
336
|
async join(e) {
|
|
337
337
|
return new Promise(async (n, i) => {
|
|
338
|
-
var a
|
|
338
|
+
var a;
|
|
339
339
|
this.emit("joinWillStart");
|
|
340
340
|
try {
|
|
341
|
-
const { sdkAppId:
|
|
341
|
+
const { sdkAppId: u, userId: f, roomId: v, userSig: h } = await this._getVoiceSign({
|
|
342
342
|
...e,
|
|
343
343
|
roomId: e.roomId || 0
|
|
344
344
|
});
|
|
345
|
-
this.userId =
|
|
346
|
-
const { attendence:
|
|
347
|
-
decodeURIComponent(
|
|
348
|
-
),
|
|
345
|
+
this.userId = f;
|
|
346
|
+
const { attendence: _, vendor_wrapper: E } = JSON.parse(
|
|
347
|
+
decodeURIComponent(h)
|
|
348
|
+
), w = new Ut(
|
|
349
349
|
{
|
|
350
|
-
Meeting:
|
|
350
|
+
Meeting: E
|
|
351
351
|
},
|
|
352
352
|
{
|
|
353
353
|
Attendee: {
|
|
354
|
-
ExternalUserId:
|
|
355
|
-
AttendeeId:
|
|
356
|
-
JoinToken:
|
|
354
|
+
ExternalUserId: _.external_user_id,
|
|
355
|
+
AttendeeId: _.attendee_id,
|
|
356
|
+
JoinToken: _.join_token
|
|
357
357
|
}
|
|
358
358
|
}
|
|
359
359
|
);
|
|
360
|
-
this.meetingSession = new Bt(
|
|
361
|
-
const
|
|
360
|
+
this.meetingSession = new Bt(w, this.logger, this.deviceController), this._registerRtcEvent(), this.meetingSession.audioVideo.addDeviceChangeObserver(this.deviceChangeObserver), this.meetingSession.audioVideo.addObserver(this.audioVideoObserver), this.meetingSession.audioVideo.bindAudioElement(this.$audio);
|
|
361
|
+
const m = {
|
|
362
362
|
audioVideoDidStart: () => {
|
|
363
|
-
var
|
|
364
|
-
(
|
|
363
|
+
var k;
|
|
364
|
+
(k = this.meetingSession) == null || k.audioVideo.realtimeMuteLocalAudio(), this.joined = !0, this.emit("joined"), n(!0);
|
|
365
365
|
},
|
|
366
366
|
audioVideoDidStop: () => {
|
|
367
367
|
this.joined = !1, n(!1);
|
|
368
368
|
}
|
|
369
369
|
};
|
|
370
|
-
this.meetingSession.audioVideo.addObserver(
|
|
370
|
+
this.meetingSession.audioVideo.addObserver(m), this.meetingSession.audioVideo.setDeviceLabelTrigger(
|
|
371
371
|
async () => await navigator.mediaDevices.getUserMedia({ audio: !0, video: !1 })
|
|
372
372
|
);
|
|
373
|
-
const
|
|
374
|
-
await this.meetingSession.audioVideo.startAudioInput(
|
|
375
|
-
} catch (
|
|
376
|
-
this.emit("error",
|
|
373
|
+
const M = ((a = (await this.meetingSession.audioVideo.listAudioInputDevices())[0]) == null ? void 0 : a.deviceId) || "default";
|
|
374
|
+
await this.meetingSession.audioVideo.startAudioInput(M), this.meetingSession.audioVideo.start();
|
|
375
|
+
} catch (u) {
|
|
376
|
+
this.emit("error", u), this.logger.error(u.message), n(!1);
|
|
377
377
|
}
|
|
378
378
|
});
|
|
379
379
|
}
|
|
@@ -383,9 +383,9 @@ class rt extends De {
|
|
|
383
383
|
this.joined = !1;
|
|
384
384
|
const i = {
|
|
385
385
|
audioVideoDidStop: async (f) => {
|
|
386
|
-
var
|
|
387
|
-
const
|
|
388
|
-
(
|
|
386
|
+
var h;
|
|
387
|
+
const v = f.statusCode();
|
|
388
|
+
(h = this.meetingSession) == null || h.deviceController.destroy(), v === Wt.Left ? (this.logger.info("You left the session"), e(!0)) : (this.logger.info(`Stopped with a session status code: ${v}`), e(!0));
|
|
389
389
|
}
|
|
390
390
|
};
|
|
391
391
|
(a = this.meetingSession) == null || a.audioVideo.addObserver(i), (u = this.meetingSession) == null || u.audioVideo.stop();
|
|
@@ -474,7 +474,7 @@ class nt extends De {
|
|
|
474
474
|
this.jsBridge.shock(1);
|
|
475
475
|
}
|
|
476
476
|
}
|
|
477
|
-
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 || {}),
|
|
477
|
+
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 || {}), G = /* @__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))(G || {}), Z = /* @__PURE__ */ ((t) => (t.OPEN = "OPEN", t.CLOSE = "CLOSE", t))(Z || {});
|
|
478
478
|
function Tr(t) {
|
|
479
479
|
try {
|
|
480
480
|
const s = JSON.parse(t), e = {
|
|
@@ -856,7 +856,7 @@ class _r extends ae {
|
|
|
856
856
|
* @param event
|
|
857
857
|
*/
|
|
858
858
|
o(this, "_handleCloseEvent", (e) => {
|
|
859
|
-
|
|
859
|
+
L.info(
|
|
860
860
|
`live room closed bacause of ${e.code}-${e.reason || tr(e.code)}`
|
|
861
861
|
), this.state = x.CLOSED;
|
|
862
862
|
});
|
|
@@ -865,21 +865,21 @@ class _r extends ae {
|
|
|
865
865
|
*/
|
|
866
866
|
o(this, "_handleClosingEvent", () => {
|
|
867
867
|
var e;
|
|
868
|
-
|
|
868
|
+
L.info("live room is closing, onLine:", (e = globalThis == null ? void 0 : globalThis.navigator) == null ? void 0 : e.onLine), this.state = x.CLOSED;
|
|
869
869
|
});
|
|
870
870
|
/**
|
|
871
871
|
* 连接中
|
|
872
872
|
* @param event
|
|
873
873
|
*/
|
|
874
874
|
o(this, "_handleConnectingEvent", () => {
|
|
875
|
-
|
|
875
|
+
L.info("live room is connecting"), this.state = x.CONNECTING;
|
|
876
876
|
});
|
|
877
877
|
/**
|
|
878
878
|
* 连接发送异常
|
|
879
879
|
* @param event
|
|
880
880
|
*/
|
|
881
881
|
o(this, "_handleErrorEvent", (e) => {
|
|
882
|
-
|
|
882
|
+
L.error("live room error", e), this.state = x.CLOSED;
|
|
883
883
|
});
|
|
884
884
|
/**
|
|
885
885
|
* 接收到消息
|
|
@@ -900,14 +900,14 @@ class _r extends ae {
|
|
|
900
900
|
* @param event
|
|
901
901
|
*/
|
|
902
902
|
o(this, "_handleOpenEvent", (e) => {
|
|
903
|
-
|
|
903
|
+
L.info("live room open", e.detail), this.state = x.OPEN, e.detail.reconnects > 0 && this.emit("reconnected", e.detail);
|
|
904
904
|
});
|
|
905
905
|
/**
|
|
906
906
|
* 处理超时
|
|
907
907
|
* @param event
|
|
908
908
|
*/
|
|
909
909
|
o(this, "_handleTimeoutEvent", (e) => {
|
|
910
|
-
|
|
910
|
+
L.error("live room connect timeout!", e.detail), this.state = x.CLOSED;
|
|
911
911
|
});
|
|
912
912
|
/**
|
|
913
913
|
* 释放资源,释放之后需要重新实例化
|
|
@@ -1001,7 +1001,7 @@ class vr extends ae {
|
|
|
1001
1001
|
try {
|
|
1002
1002
|
return this._controller.sendMessage(i), !0;
|
|
1003
1003
|
} catch (a) {
|
|
1004
|
-
return
|
|
1004
|
+
return L.error(a), !1;
|
|
1005
1005
|
}
|
|
1006
1006
|
});
|
|
1007
1007
|
/**
|
|
@@ -1033,20 +1033,20 @@ class vr extends ae {
|
|
|
1033
1033
|
o(this, "_handleMessage", async (e) => {
|
|
1034
1034
|
var n, i, a, u, f;
|
|
1035
1035
|
if (typeof e == "object") {
|
|
1036
|
-
const { command:
|
|
1037
|
-
if (
|
|
1038
|
-
switch (
|
|
1036
|
+
const { command: v, data: h = {}, frontRequestId: _, code: E, message: w } = e;
|
|
1037
|
+
if (E === "SUCCESS")
|
|
1038
|
+
switch (v) {
|
|
1039
1039
|
case W.SelfUserInfo: {
|
|
1040
|
-
const m =
|
|
1040
|
+
const m = h;
|
|
1041
1041
|
st(this.selfInfo, m, { deep: !0 }) || (this._buildInData.selfInfo = m, this.emit(
|
|
1042
1042
|
"selfInfoUpdate",
|
|
1043
1043
|
this._buildInData.selfInfo,
|
|
1044
|
-
|
|
1044
|
+
_
|
|
1045
1045
|
));
|
|
1046
1046
|
break;
|
|
1047
1047
|
}
|
|
1048
1048
|
case W.RoomInfo: {
|
|
1049
|
-
const m =
|
|
1049
|
+
const m = h;
|
|
1050
1050
|
this._buildInData.roomInfo = Object.assign({}, m), this.emit(
|
|
1051
1051
|
"readyKeyframeSync",
|
|
1052
1052
|
m.last_frame || {}
|
|
@@ -1054,64 +1054,64 @@ class vr extends ae {
|
|
|
1054
1054
|
break;
|
|
1055
1055
|
}
|
|
1056
1056
|
case W.RTCInfo: {
|
|
1057
|
-
const { voice_id: m, type:
|
|
1058
|
-
if (this._buildInData.rtcInfo = { voiceId: m, type:
|
|
1059
|
-
|
|
1057
|
+
const { voice_id: m, type: A } = h;
|
|
1058
|
+
if (this._buildInData.rtcInfo = { voiceId: m, type: A }, (n = this.$RTC) != null && n.joined)
|
|
1059
|
+
L.warn("已加入语音房间,无需重复加入!");
|
|
1060
1060
|
else if (await ((u = this.$RTC) == null ? void 0 : u.join({
|
|
1061
1061
|
voiceId: m,
|
|
1062
1062
|
userId: ((i = this.selfInfo) == null ? void 0 : i.id) || "",
|
|
1063
1063
|
roomId: (a = this.roomInfo) == null ? void 0 : a.info.room_code,
|
|
1064
|
-
type:
|
|
1064
|
+
type: A
|
|
1065
1065
|
}))) {
|
|
1066
|
-
const
|
|
1067
|
-
await this.toggleMicro(
|
|
1066
|
+
const k = (f = this._options.initialMicroStatus) != null ? f : Z.OPEN;
|
|
1067
|
+
await this.toggleMicro(k === Z.OPEN);
|
|
1068
1068
|
} else
|
|
1069
|
-
|
|
1069
|
+
L.error("加入语音房间失败");
|
|
1070
1070
|
break;
|
|
1071
1071
|
}
|
|
1072
1072
|
case W.UserList: {
|
|
1073
|
-
const m =
|
|
1074
|
-
this._buildInData.userList = m, this.emit("userListUpdate", this.userList,
|
|
1073
|
+
const m = h;
|
|
1074
|
+
this._buildInData.userList = m, this.emit("userListUpdate", this.userList, _);
|
|
1075
1075
|
break;
|
|
1076
1076
|
}
|
|
1077
1077
|
case W.CustomEvent: {
|
|
1078
|
-
const m =
|
|
1079
|
-
this.emit("broadcast", m,
|
|
1078
|
+
const m = h;
|
|
1079
|
+
this.emit("broadcast", m, _);
|
|
1080
1080
|
break;
|
|
1081
1081
|
}
|
|
1082
1082
|
case W.KeyframeSync: {
|
|
1083
|
-
const m =
|
|
1083
|
+
const m = h, A = Object.keys(
|
|
1084
1084
|
m
|
|
1085
1085
|
).reduce(
|
|
1086
|
-
(M,
|
|
1086
|
+
(M, k) => {
|
|
1087
1087
|
if (st(
|
|
1088
|
-
m[
|
|
1089
|
-
this._buildInData.keyframes[
|
|
1088
|
+
m[k],
|
|
1089
|
+
this._buildInData.keyframes[k],
|
|
1090
1090
|
{
|
|
1091
1091
|
deep: !0
|
|
1092
1092
|
}
|
|
1093
1093
|
))
|
|
1094
1094
|
return M;
|
|
1095
|
-
const
|
|
1096
|
-
m[
|
|
1097
|
-
this._buildInData.keyframes[
|
|
1098
|
-
|
|
1099
|
-
],
|
|
1095
|
+
const H = [
|
|
1096
|
+
m[k],
|
|
1097
|
+
this._buildInData.keyframes[k],
|
|
1098
|
+
_
|
|
1099
|
+
], J = k;
|
|
1100
1100
|
return this.keyframes.emit(
|
|
1101
|
-
|
|
1102
|
-
...
|
|
1103
|
-
), this._buildInData.keyframes[
|
|
1101
|
+
J,
|
|
1102
|
+
...H
|
|
1103
|
+
), this._buildInData.keyframes[k] = m[k], M[k] = m[k], M;
|
|
1104
1104
|
},
|
|
1105
1105
|
{}
|
|
1106
1106
|
);
|
|
1107
|
-
this.emit("keyframes",
|
|
1107
|
+
this.emit("keyframes", A, _);
|
|
1108
1108
|
break;
|
|
1109
1109
|
}
|
|
1110
1110
|
case W.BuiltinMsg: {
|
|
1111
|
-
const m =
|
|
1112
|
-
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 ===
|
|
1111
|
+
const m = h;
|
|
1112
|
+
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 === G.UserMicroStatus && await this.toggleMicro(
|
|
1113
1113
|
m.data.status === Z.OPEN
|
|
1114
|
-
), m.event_type === q.RoomChange && m.action ===
|
|
1114
|
+
), m.event_type === q.RoomChange && m.action === G.RoomClose && await this.exit();
|
|
1115
1115
|
break;
|
|
1116
1116
|
}
|
|
1117
1117
|
case W.UserKickOut: {
|
|
@@ -1119,7 +1119,7 @@ class vr extends ae {
|
|
|
1119
1119
|
break;
|
|
1120
1120
|
}
|
|
1121
1121
|
default:
|
|
1122
|
-
console.warn("unknown command: ",
|
|
1122
|
+
console.warn("unknown command: ", v);
|
|
1123
1123
|
}
|
|
1124
1124
|
else
|
|
1125
1125
|
this.emit("error", e);
|
|
@@ -1137,8 +1137,8 @@ class vr extends ae {
|
|
|
1137
1137
|
* @returns
|
|
1138
1138
|
*/
|
|
1139
1139
|
o(this, "connect", async (e = {}) => {
|
|
1140
|
-
var u, f,
|
|
1141
|
-
if (this._options.url = (f = (u = e.url) != null ? u : this._options.url) != null ? f : "", this._options.getTicket = (
|
|
1140
|
+
var u, f, v, h;
|
|
1141
|
+
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")
|
|
1142
1142
|
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");
|
|
1143
1143
|
const { force: n = !1 } = e;
|
|
1144
1144
|
if (this._options.rtc && !await this._options.rtc.detectMicro())
|
|
@@ -1148,8 +1148,8 @@ class vr extends ae {
|
|
|
1148
1148
|
if (n)
|
|
1149
1149
|
try {
|
|
1150
1150
|
await this._controller.close("force close by connect");
|
|
1151
|
-
} catch (
|
|
1152
|
-
console.warn(
|
|
1151
|
+
} catch (_) {
|
|
1152
|
+
console.warn(_);
|
|
1153
1153
|
}
|
|
1154
1154
|
else
|
|
1155
1155
|
return new Error("已有Live实例正在连接中,请勿重复连接!");
|
|
@@ -1171,7 +1171,7 @@ class vr extends ae {
|
|
|
1171
1171
|
try {
|
|
1172
1172
|
await ((e = this.$RTC) == null ? void 0 : e.quit());
|
|
1173
1173
|
} catch (n) {
|
|
1174
|
-
|
|
1174
|
+
L.warn(n);
|
|
1175
1175
|
}
|
|
1176
1176
|
return await this._controller.close();
|
|
1177
1177
|
});
|
|
@@ -1186,7 +1186,7 @@ class vr extends ae {
|
|
|
1186
1186
|
if ((n = (e = this.selfInfo) == null ? void 0 : e.permission) != null && n.close_live_room)
|
|
1187
1187
|
return await this.updateStatus(
|
|
1188
1188
|
q.RoomChange,
|
|
1189
|
-
|
|
1189
|
+
G.RoomClose,
|
|
1190
1190
|
{}
|
|
1191
1191
|
);
|
|
1192
1192
|
});
|
|
@@ -1202,7 +1202,7 @@ class vr extends ae {
|
|
|
1202
1202
|
*/
|
|
1203
1203
|
o(this, "setSelfInfo", async (e) => await this.updateStatus(
|
|
1204
1204
|
q.UserChange,
|
|
1205
|
-
|
|
1205
|
+
G.UserInfo,
|
|
1206
1206
|
e
|
|
1207
1207
|
));
|
|
1208
1208
|
// 仅用于用户自己的麦克风控制
|
|
@@ -1213,7 +1213,7 @@ class vr extends ae {
|
|
|
1213
1213
|
const n = await ((u = this.$RTC) == null ? void 0 : u.toggleMicro(e));
|
|
1214
1214
|
return n && await this.updateStatus(
|
|
1215
1215
|
q.UserChange,
|
|
1216
|
-
|
|
1216
|
+
G.UserMicroStatus,
|
|
1217
1217
|
{
|
|
1218
1218
|
status: e ? Z.OPEN : Z.CLOSE
|
|
1219
1219
|
},
|
|
@@ -1230,7 +1230,7 @@ class vr extends ae {
|
|
|
1230
1230
|
var i, a;
|
|
1231
1231
|
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(
|
|
1232
1232
|
q.UserChange,
|
|
1233
|
-
|
|
1233
|
+
G.UserMicroStatus,
|
|
1234
1234
|
{
|
|
1235
1235
|
status: e
|
|
1236
1236
|
},
|
|
@@ -1247,7 +1247,7 @@ class vr extends ae {
|
|
|
1247
1247
|
var i, a;
|
|
1248
1248
|
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(
|
|
1249
1249
|
q.UserChange,
|
|
1250
|
-
|
|
1250
|
+
G.UserPermission,
|
|
1251
1251
|
{ sync_frame: e },
|
|
1252
1252
|
n
|
|
1253
1253
|
);
|
|
@@ -1261,7 +1261,7 @@ class vr extends ae {
|
|
|
1261
1261
|
var n, i;
|
|
1262
1262
|
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(
|
|
1263
1263
|
q.UserChange,
|
|
1264
|
-
|
|
1264
|
+
G.UserStatus,
|
|
1265
1265
|
{
|
|
1266
1266
|
status: "KICK_OUT"
|
|
1267
1267
|
},
|
|
@@ -1280,7 +1280,7 @@ class vr extends ae {
|
|
|
1280
1280
|
if (e.rtc)
|
|
1281
1281
|
return e.rtc;
|
|
1282
1282
|
if (e.rtcType)
|
|
1283
|
-
switch (e.getVoiceSign ||
|
|
1283
|
+
switch (e.getVoiceSign || L.error(
|
|
1284
1284
|
"GetVoiceSign method must be passed when using built-in RTC instances"
|
|
1285
1285
|
), e.rtcType) {
|
|
1286
1286
|
case Q.RealseeVRWebViewRTC: {
|
|
@@ -1289,7 +1289,7 @@ class vr extends ae {
|
|
|
1289
1289
|
jsBridge: this._options.jsBridge,
|
|
1290
1290
|
getVoiceSign: this._options.getVoiceSign
|
|
1291
1291
|
});
|
|
1292
|
-
|
|
1292
|
+
L.error(
|
|
1293
1293
|
"JsBridge instance must be passed when using built-in VRWebViewRTC instances"
|
|
1294
1294
|
);
|
|
1295
1295
|
return;
|
|
@@ -1300,19 +1300,19 @@ class vr extends ae {
|
|
|
1300
1300
|
logLevel: e.__debug__ ? it.DEBUG : it.INFO
|
|
1301
1301
|
});
|
|
1302
1302
|
case Q.RealseeBrowserRTC:
|
|
1303
|
-
return this._options.autoPlayConfirm ||
|
|
1303
|
+
return this._options.autoPlayConfirm || L.error(
|
|
1304
1304
|
"autoPlayConfirm method must be passed when using built-in RealseeBrowserRTC instances"
|
|
1305
1305
|
), new tt({
|
|
1306
1306
|
getVoiceSign: this._options.getVoiceSign,
|
|
1307
1307
|
autoPlayConfirm: this._options.autoPlayConfirm
|
|
1308
1308
|
});
|
|
1309
1309
|
default: {
|
|
1310
|
-
|
|
1310
|
+
L.error("unknown built-in RTC type");
|
|
1311
1311
|
return;
|
|
1312
1312
|
}
|
|
1313
1313
|
}
|
|
1314
1314
|
if (e.useBuiltInRTC) {
|
|
1315
|
-
if (e.getVoiceSign ||
|
|
1315
|
+
if (e.getVoiceSign || L.error(
|
|
1316
1316
|
"GetVoiceSign method must be passed when using built-in RTC instances"
|
|
1317
1317
|
), this._options.jsBridge)
|
|
1318
1318
|
return ar && (ir || sr) || or ? new nt({
|
|
@@ -1324,12 +1324,12 @@ class vr extends ae {
|
|
|
1324
1324
|
getVoiceSign: this._options.getVoiceSign,
|
|
1325
1325
|
autoPlayConfirm: this._options.autoPlayConfirm
|
|
1326
1326
|
});
|
|
1327
|
-
|
|
1327
|
+
L.error(
|
|
1328
1328
|
"jsBridge instance must be passed when using built-in RTC instances"
|
|
1329
1329
|
);
|
|
1330
1330
|
return;
|
|
1331
1331
|
}
|
|
1332
|
-
})(), this._options.rtc ||
|
|
1332
|
+
})(), this._options.rtc || L.warn("unused rtc"), this._options.url && this._options.getTicket && this.connect(), this._options.__debug__ && Object.assign(window, { $liveController: this._controller, $live: this });
|
|
1333
1333
|
}
|
|
1334
1334
|
get options() {
|
|
1335
1335
|
return Object.freeze(this._options || {});
|
|
@@ -1407,8 +1407,8 @@ class vr extends ae {
|
|
|
1407
1407
|
), f = Pe(W.BuiltinMsg, u, a);
|
|
1408
1408
|
try {
|
|
1409
1409
|
return this._controller.sendMessage(f), !0;
|
|
1410
|
-
} catch (
|
|
1411
|
-
return
|
|
1410
|
+
} catch (v) {
|
|
1411
|
+
return L.error(v), !1;
|
|
1412
1412
|
}
|
|
1413
1413
|
}
|
|
1414
1414
|
/**
|
|
@@ -1424,16 +1424,16 @@ class vr extends ae {
|
|
|
1424
1424
|
W.CustomEvent,
|
|
1425
1425
|
e,
|
|
1426
1426
|
n
|
|
1427
|
-
),
|
|
1428
|
-
u(new Error("RESPONSE TIMEOUT")), this.off("broadcast",
|
|
1429
|
-
}, i) : void 0,
|
|
1430
|
-
w ===
|
|
1427
|
+
), v = f.front_request_id, h = i ? setTimeout(() => {
|
|
1428
|
+
u(new Error("RESPONSE TIMEOUT")), this.off("broadcast", _);
|
|
1429
|
+
}, i) : void 0, _ = (E, w) => {
|
|
1430
|
+
w === v && (h && clearTimeout(h), this.off("broadcast", _), a(E));
|
|
1431
1431
|
};
|
|
1432
|
-
this.on("broadcast",
|
|
1432
|
+
this.on("broadcast", _);
|
|
1433
1433
|
try {
|
|
1434
1434
|
this._controller.sendMessage(f);
|
|
1435
|
-
} catch (
|
|
1436
|
-
u(
|
|
1435
|
+
} catch (E) {
|
|
1436
|
+
u(E);
|
|
1437
1437
|
}
|
|
1438
1438
|
});
|
|
1439
1439
|
}
|
|
@@ -1472,31 +1472,31 @@ function dt() {
|
|
|
1472
1472
|
return !1;
|
|
1473
1473
|
for (var u = {}, f = 0; f < 10; f++)
|
|
1474
1474
|
u["_" + String.fromCharCode(f)] = f;
|
|
1475
|
-
var
|
|
1476
|
-
return u[
|
|
1475
|
+
var v = Object.getOwnPropertyNames(u).map(function(_) {
|
|
1476
|
+
return u[_];
|
|
1477
1477
|
});
|
|
1478
|
-
if (
|
|
1478
|
+
if (v.join("") !== "0123456789")
|
|
1479
1479
|
return !1;
|
|
1480
|
-
var
|
|
1481
|
-
return "abcdefghijklmnopqrst".split("").forEach(function(
|
|
1482
|
-
|
|
1483
|
-
}), Object.keys(Object.assign({},
|
|
1484
|
-
} catch (
|
|
1480
|
+
var h = {};
|
|
1481
|
+
return "abcdefghijklmnopqrst".split("").forEach(function(_) {
|
|
1482
|
+
h[_] = _;
|
|
1483
|
+
}), Object.keys(Object.assign({}, h)).join("") === "abcdefghijklmnopqrst";
|
|
1484
|
+
} catch (_) {
|
|
1485
1485
|
return !1;
|
|
1486
1486
|
}
|
|
1487
1487
|
}
|
|
1488
1488
|
return je = i() ? Object.assign : function(a, u) {
|
|
1489
|
-
for (var f,
|
|
1490
|
-
f = Object(arguments[
|
|
1491
|
-
for (var
|
|
1492
|
-
s.call(f,
|
|
1489
|
+
for (var f, v = n(a), h, _ = 1; _ < arguments.length; _++) {
|
|
1490
|
+
f = Object(arguments[_]);
|
|
1491
|
+
for (var E in f)
|
|
1492
|
+
s.call(f, E) && (v[E] = f[E]);
|
|
1493
1493
|
if (t) {
|
|
1494
|
-
|
|
1495
|
-
for (var w = 0; w <
|
|
1496
|
-
e.call(f,
|
|
1494
|
+
h = t(f);
|
|
1495
|
+
for (var w = 0; w < h.length; w++)
|
|
1496
|
+
e.call(f, h[w]) && (v[h[w]] = f[h[w]]);
|
|
1497
1497
|
}
|
|
1498
1498
|
}
|
|
1499
|
-
return
|
|
1499
|
+
return v;
|
|
1500
1500
|
}, je;
|
|
1501
1501
|
}
|
|
1502
1502
|
/** @license React v17.0.2
|
|
@@ -1518,15 +1518,15 @@ function br() {
|
|
|
1518
1518
|
s = e("react.element"), ie.Fragment = e("react.fragment");
|
|
1519
1519
|
}
|
|
1520
1520
|
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 };
|
|
1521
|
-
function u(f,
|
|
1522
|
-
var
|
|
1523
|
-
|
|
1524
|
-
for (
|
|
1525
|
-
i.call(
|
|
1521
|
+
function u(f, v, h) {
|
|
1522
|
+
var _, E = {}, w = null, m = null;
|
|
1523
|
+
h !== void 0 && (w = "" + h), v.key !== void 0 && (w = "" + v.key), v.ref !== void 0 && (m = v.ref);
|
|
1524
|
+
for (_ in v)
|
|
1525
|
+
i.call(v, _) && !a.hasOwnProperty(_) && (E[_] = v[_]);
|
|
1526
1526
|
if (f && f.defaultProps)
|
|
1527
|
-
for (
|
|
1528
|
-
|
|
1529
|
-
return { $$typeof: s, type: f, key: w, ref: m, props:
|
|
1527
|
+
for (_ in v = f.defaultProps, v)
|
|
1528
|
+
E[_] === void 0 && (E[_] = v[_]);
|
|
1529
|
+
return { $$typeof: s, type: f, key: w, ref: m, props: E, _owner: n.current };
|
|
1530
1530
|
}
|
|
1531
1531
|
return ie.jsx = u, ie.jsxs = u, ie;
|
|
1532
1532
|
}
|
|
@@ -1545,13 +1545,13 @@ function yr() {
|
|
|
1545
1545
|
process.env.NODE_ENV !== "production" && function() {
|
|
1546
1546
|
var s = V, e = dt(), n = 60103, i = 60106;
|
|
1547
1547
|
t.Fragment = 60107;
|
|
1548
|
-
var a = 60108, u = 60114, f = 60109,
|
|
1548
|
+
var a = 60108, u = 60114, f = 60109, v = 60110, h = 60112, _ = 60113, E = 60120, w = 60115, m = 60116, A = 60121, M = 60122, k = 60117, H = 60129, J = 60131;
|
|
1549
1549
|
if (typeof Symbol == "function" && Symbol.for) {
|
|
1550
1550
|
var I = Symbol.for;
|
|
1551
|
-
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"),
|
|
1551
|
+
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"), A = I("react.block"), M = I("react.server.block"), k = I("react.fundamental"), I("react.scope"), I("react.opaque.id"), H = I("react.debug_trace_mode"), I("react.offscreen"), J = I("react.legacy_hidden");
|
|
1552
1552
|
}
|
|
1553
1553
|
var d = typeof Symbol == "function" && Symbol.iterator, S = "@@iterator";
|
|
1554
|
-
function
|
|
1554
|
+
function N(r) {
|
|
1555
1555
|
if (r === null || typeof r != "object")
|
|
1556
1556
|
return null;
|
|
1557
1557
|
var c = d && r[d] || r[S];
|
|
@@ -1560,14 +1560,14 @@ function yr() {
|
|
|
1560
1560
|
var b = s.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
1561
1561
|
function y(r) {
|
|
1562
1562
|
{
|
|
1563
|
-
for (var c = arguments.length, l = new Array(c > 1 ? c - 1 : 0),
|
|
1564
|
-
l[
|
|
1563
|
+
for (var c = arguments.length, l = new Array(c > 1 ? c - 1 : 0), g = 1; g < c; g++)
|
|
1564
|
+
l[g - 1] = arguments[g];
|
|
1565
1565
|
D("error", r, l);
|
|
1566
1566
|
}
|
|
1567
1567
|
}
|
|
1568
1568
|
function D(r, c, l) {
|
|
1569
1569
|
{
|
|
1570
|
-
var
|
|
1570
|
+
var g = b.ReactDebugCurrentFrame, O = g.getStackAddendum();
|
|
1571
1571
|
O !== "" && (c += "%s", l = l.concat([O]));
|
|
1572
1572
|
var R = l.map(function(C) {
|
|
1573
1573
|
return "" + C;
|
|
@@ -1577,11 +1577,11 @@ function yr() {
|
|
|
1577
1577
|
}
|
|
1578
1578
|
var U = !1;
|
|
1579
1579
|
function z(r) {
|
|
1580
|
-
return !!(typeof r == "string" || typeof r == "function" || r === t.Fragment || r === u || r ===
|
|
1580
|
+
return !!(typeof r == "string" || typeof r == "function" || r === t.Fragment || r === u || r === H || r === a || r === _ || r === E || r === J || U || typeof r == "object" && r !== null && (r.$$typeof === m || r.$$typeof === w || r.$$typeof === f || r.$$typeof === v || r.$$typeof === h || r.$$typeof === k || r.$$typeof === A || r[0] === M));
|
|
1581
1581
|
}
|
|
1582
1582
|
function ue(r, c, l) {
|
|
1583
|
-
var
|
|
1584
|
-
return r.displayName || (
|
|
1583
|
+
var g = c.displayName || c.name || "";
|
|
1584
|
+
return r.displayName || (g !== "" ? l + "(" + g + ")" : l);
|
|
1585
1585
|
}
|
|
1586
1586
|
function be(r) {
|
|
1587
1587
|
return r.displayName || "Context";
|
|
@@ -1602,27 +1602,27 @@ function yr() {
|
|
|
1602
1602
|
return "Profiler";
|
|
1603
1603
|
case a:
|
|
1604
1604
|
return "StrictMode";
|
|
1605
|
-
case
|
|
1605
|
+
case _:
|
|
1606
1606
|
return "Suspense";
|
|
1607
|
-
case
|
|
1607
|
+
case E:
|
|
1608
1608
|
return "SuspenseList";
|
|
1609
1609
|
}
|
|
1610
1610
|
if (typeof r == "object")
|
|
1611
1611
|
switch (r.$$typeof) {
|
|
1612
|
-
case
|
|
1612
|
+
case v:
|
|
1613
1613
|
var c = r;
|
|
1614
1614
|
return be(c) + ".Consumer";
|
|
1615
1615
|
case f:
|
|
1616
1616
|
var l = r;
|
|
1617
1617
|
return be(l._context) + ".Provider";
|
|
1618
|
-
case
|
|
1618
|
+
case h:
|
|
1619
1619
|
return ue(r, r.render, "ForwardRef");
|
|
1620
1620
|
case w:
|
|
1621
1621
|
return F(r.type);
|
|
1622
|
-
case
|
|
1622
|
+
case A:
|
|
1623
1623
|
return F(r._render);
|
|
1624
1624
|
case m: {
|
|
1625
|
-
var
|
|
1625
|
+
var g = r, O = g._payload, R = g._init;
|
|
1626
1626
|
try {
|
|
1627
1627
|
return F(R(O));
|
|
1628
1628
|
} catch (C) {
|
|
@@ -1701,8 +1701,8 @@ function yr() {
|
|
|
1701
1701
|
try {
|
|
1702
1702
|
throw Error();
|
|
1703
1703
|
} catch (O) {
|
|
1704
|
-
var
|
|
1705
|
-
Ce =
|
|
1704
|
+
var g = O.stack.trim().match(/\n( *(at )?)/);
|
|
1705
|
+
Ce = g && g[1] || "";
|
|
1706
1706
|
}
|
|
1707
1707
|
return `
|
|
1708
1708
|
` + Ce + r;
|
|
@@ -1721,7 +1721,7 @@ function yr() {
|
|
|
1721
1721
|
if (l !== void 0)
|
|
1722
1722
|
return l;
|
|
1723
1723
|
}
|
|
1724
|
-
var
|
|
1724
|
+
var g;
|
|
1725
1725
|
we = !0;
|
|
1726
1726
|
var O = Error.prepareStackTrace;
|
|
1727
1727
|
Error.prepareStackTrace = void 0;
|
|
@@ -1739,42 +1739,42 @@ function yr() {
|
|
|
1739
1739
|
}), typeof Reflect == "object" && Reflect.construct) {
|
|
1740
1740
|
try {
|
|
1741
1741
|
Reflect.construct(C, []);
|
|
1742
|
-
} catch (
|
|
1743
|
-
|
|
1742
|
+
} catch (Y) {
|
|
1743
|
+
g = Y;
|
|
1744
1744
|
}
|
|
1745
1745
|
Reflect.construct(r, [], C);
|
|
1746
1746
|
} else {
|
|
1747
1747
|
try {
|
|
1748
1748
|
C.call();
|
|
1749
|
-
} catch (
|
|
1750
|
-
|
|
1749
|
+
} catch (Y) {
|
|
1750
|
+
g = Y;
|
|
1751
1751
|
}
|
|
1752
1752
|
r.call(C.prototype);
|
|
1753
1753
|
}
|
|
1754
1754
|
} else {
|
|
1755
1755
|
try {
|
|
1756
1756
|
throw Error();
|
|
1757
|
-
} catch (
|
|
1758
|
-
|
|
1757
|
+
} catch (Y) {
|
|
1758
|
+
g = Y;
|
|
1759
1759
|
}
|
|
1760
1760
|
r();
|
|
1761
1761
|
}
|
|
1762
|
-
} catch (
|
|
1763
|
-
if (
|
|
1764
|
-
for (var
|
|
1765
|
-
`), $ =
|
|
1766
|
-
`),
|
|
1762
|
+
} catch (Y) {
|
|
1763
|
+
if (Y && g && typeof Y.stack == "string") {
|
|
1764
|
+
for (var p = Y.stack.split(`
|
|
1765
|
+
`), $ = g.stack.split(`
|
|
1766
|
+
`), P = p.length - 1, j = $.length - 1; P >= 1 && j >= 0 && p[P] !== $[j]; )
|
|
1767
1767
|
j--;
|
|
1768
|
-
for (;
|
|
1769
|
-
if (
|
|
1770
|
-
if (
|
|
1768
|
+
for (; P >= 1 && j >= 0; P--, j--)
|
|
1769
|
+
if (p[P] !== $[j]) {
|
|
1770
|
+
if (P !== 1 || j !== 1)
|
|
1771
1771
|
do
|
|
1772
|
-
if (
|
|
1773
|
-
var
|
|
1774
|
-
` +
|
|
1775
|
-
return typeof r == "function" && de.set(r,
|
|
1772
|
+
if (P--, j--, j < 0 || p[P] !== $[j]) {
|
|
1773
|
+
var K = `
|
|
1774
|
+
` + p[P].replace(" at new ", " at ");
|
|
1775
|
+
return typeof r == "function" && de.set(r, K), K;
|
|
1776
1776
|
}
|
|
1777
|
-
while (
|
|
1777
|
+
while (P >= 1 && j >= 0);
|
|
1778
1778
|
break;
|
|
1779
1779
|
}
|
|
1780
1780
|
}
|
|
@@ -1799,21 +1799,21 @@ function yr() {
|
|
|
1799
1799
|
if (typeof r == "string")
|
|
1800
1800
|
return fe(r);
|
|
1801
1801
|
switch (r) {
|
|
1802
|
-
case
|
|
1802
|
+
case _:
|
|
1803
1803
|
return fe("Suspense");
|
|
1804
|
-
case
|
|
1804
|
+
case E:
|
|
1805
1805
|
return fe("SuspenseList");
|
|
1806
1806
|
}
|
|
1807
1807
|
if (typeof r == "object")
|
|
1808
1808
|
switch (r.$$typeof) {
|
|
1809
|
-
case
|
|
1809
|
+
case h:
|
|
1810
1810
|
return We(r.render);
|
|
1811
1811
|
case w:
|
|
1812
1812
|
return he(r.type, c, l);
|
|
1813
|
-
case
|
|
1813
|
+
case A:
|
|
1814
1814
|
return We(r._render);
|
|
1815
1815
|
case m: {
|
|
1816
|
-
var
|
|
1816
|
+
var g = r, O = g._payload, R = g._init;
|
|
1817
1817
|
try {
|
|
1818
1818
|
return he(R(O), c, l);
|
|
1819
1819
|
} catch (C) {
|
|
@@ -1830,22 +1830,22 @@ function yr() {
|
|
|
1830
1830
|
} else
|
|
1831
1831
|
qe.setExtraStackFrame(null);
|
|
1832
1832
|
}
|
|
1833
|
-
function vt(r, c, l,
|
|
1833
|
+
function vt(r, c, l, g, O) {
|
|
1834
1834
|
{
|
|
1835
1835
|
var R = Function.call.bind(Object.prototype.hasOwnProperty);
|
|
1836
1836
|
for (var C in r)
|
|
1837
1837
|
if (R(r, C)) {
|
|
1838
|
-
var
|
|
1838
|
+
var p = void 0;
|
|
1839
1839
|
try {
|
|
1840
1840
|
if (typeof r[C] != "function") {
|
|
1841
|
-
var $ = Error((
|
|
1841
|
+
var $ = Error((g || "React class") + ": " + l + " type `" + C + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof r[C] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
|
|
1842
1842
|
throw $.name = "Invariant Violation", $;
|
|
1843
1843
|
}
|
|
1844
|
-
|
|
1845
|
-
} catch (
|
|
1846
|
-
|
|
1844
|
+
p = r[C](c, C, g, l, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
1845
|
+
} catch (P) {
|
|
1846
|
+
p = P;
|
|
1847
1847
|
}
|
|
1848
|
-
|
|
1848
|
+
p && !(p instanceof Error) && (_e(O), y("%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, C, typeof p), _e(null)), p instanceof Error && !(p.message in Fe) && (Fe[p.message] = !0, _e(O), y("Failed %s type: %s", l, p.message), _e(null));
|
|
1849
1849
|
}
|
|
1850
1850
|
}
|
|
1851
1851
|
}
|
|
@@ -1900,8 +1900,8 @@ function yr() {
|
|
|
1900
1900
|
});
|
|
1901
1901
|
}
|
|
1902
1902
|
}
|
|
1903
|
-
var St = function(r, c, l,
|
|
1904
|
-
var
|
|
1903
|
+
var St = function(r, c, l, g, O, R, C) {
|
|
1904
|
+
var p = {
|
|
1905
1905
|
// This tag allows us to uniquely identify this as a React Element
|
|
1906
1906
|
$$typeof: n,
|
|
1907
1907
|
// Built-in properties that belong on the element
|
|
@@ -1912,39 +1912,39 @@ function yr() {
|
|
|
1912
1912
|
// Record the component responsible for creating this element.
|
|
1913
1913
|
_owner: R
|
|
1914
1914
|
};
|
|
1915
|
-
return
|
|
1915
|
+
return p._store = {}, Object.defineProperty(p._store, "validated", {
|
|
1916
1916
|
configurable: !1,
|
|
1917
1917
|
enumerable: !1,
|
|
1918
1918
|
writable: !0,
|
|
1919
1919
|
value: !1
|
|
1920
|
-
}), Object.defineProperty(
|
|
1920
|
+
}), Object.defineProperty(p, "_self", {
|
|
1921
1921
|
configurable: !1,
|
|
1922
1922
|
enumerable: !1,
|
|
1923
1923
|
writable: !1,
|
|
1924
|
-
value:
|
|
1925
|
-
}), Object.defineProperty(
|
|
1924
|
+
value: g
|
|
1925
|
+
}), Object.defineProperty(p, "_source", {
|
|
1926
1926
|
configurable: !1,
|
|
1927
1927
|
enumerable: !1,
|
|
1928
1928
|
writable: !1,
|
|
1929
1929
|
value: O
|
|
1930
|
-
}), Object.freeze && (Object.freeze(
|
|
1930
|
+
}), Object.freeze && (Object.freeze(p.props), Object.freeze(p)), p;
|
|
1931
1931
|
};
|
|
1932
|
-
function Ot(r, c, l,
|
|
1932
|
+
function Ot(r, c, l, g, O) {
|
|
1933
1933
|
{
|
|
1934
|
-
var R, C = {},
|
|
1935
|
-
l !== void 0 && (
|
|
1934
|
+
var R, C = {}, p = null, $ = null;
|
|
1935
|
+
l !== void 0 && (p = "" + l), bt(c) && (p = "" + c.key), Et(c) && ($ = c.ref, yt(c, O));
|
|
1936
1936
|
for (R in c)
|
|
1937
1937
|
Se.call(c, R) && !pt.hasOwnProperty(R) && (C[R] = c[R]);
|
|
1938
1938
|
if (r && r.defaultProps) {
|
|
1939
|
-
var
|
|
1940
|
-
for (R in
|
|
1941
|
-
C[R] === void 0 && (C[R] =
|
|
1939
|
+
var P = r.defaultProps;
|
|
1940
|
+
for (R in P)
|
|
1941
|
+
C[R] === void 0 && (C[R] = P[R]);
|
|
1942
1942
|
}
|
|
1943
|
-
if (
|
|
1943
|
+
if (p || $) {
|
|
1944
1944
|
var j = typeof r == "function" ? r.displayName || r.name || "Unknown" : r;
|
|
1945
|
-
|
|
1945
|
+
p && Ct(C, j), $ && wt(C, j);
|
|
1946
1946
|
}
|
|
1947
|
-
return St(r,
|
|
1947
|
+
return St(r, p, $, O, g, se.current, C);
|
|
1948
1948
|
}
|
|
1949
1949
|
}
|
|
1950
1950
|
var Re = b.ReactCurrentOwner, Ge = b.ReactDebugCurrentFrame;
|
|
@@ -2005,8 +2005,8 @@ Check the top-level render call using <` + l + ">.");
|
|
|
2005
2005
|
if (Je[l])
|
|
2006
2006
|
return;
|
|
2007
2007
|
Je[l] = !0;
|
|
2008
|
-
var
|
|
2009
|
-
r && r._owner && r._owner !== Re.current && (
|
|
2008
|
+
var g = "";
|
|
2009
|
+
r && r._owner && r._owner !== Re.current && (g = " It was passed a child from " + F(r._owner.type) + "."), re(r), y('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);
|
|
2010
2010
|
}
|
|
2011
2011
|
}
|
|
2012
2012
|
function Xe(r, c) {
|
|
@@ -2015,13 +2015,13 @@ Check the top-level render call using <` + l + ">.");
|
|
|
2015
2015
|
return;
|
|
2016
2016
|
if (Array.isArray(r))
|
|
2017
2017
|
for (var l = 0; l < r.length; l++) {
|
|
2018
|
-
var
|
|
2019
|
-
Te(
|
|
2018
|
+
var g = r[l];
|
|
2019
|
+
Te(g) && ze(g, c);
|
|
2020
2020
|
}
|
|
2021
2021
|
else if (Te(r))
|
|
2022
2022
|
r._store && (r._store.validated = !0);
|
|
2023
2023
|
else if (r) {
|
|
2024
|
-
var O =
|
|
2024
|
+
var O = N(r);
|
|
2025
2025
|
if (typeof O == "function" && O !== r.entries)
|
|
2026
2026
|
for (var R = O.call(r), C; !(C = R.next()).done; )
|
|
2027
2027
|
Te(C.value) && ze(C.value, c);
|
|
@@ -2036,15 +2036,15 @@ Check the top-level render call using <` + l + ">.");
|
|
|
2036
2036
|
var l;
|
|
2037
2037
|
if (typeof c == "function")
|
|
2038
2038
|
l = c.propTypes;
|
|
2039
|
-
else if (typeof c == "object" && (c.$$typeof ===
|
|
2039
|
+
else if (typeof c == "object" && (c.$$typeof === h || // Note: Memo only checks outer props here.
|
|
2040
2040
|
// Inner props are checked in the reconciler.
|
|
2041
2041
|
c.$$typeof === w))
|
|
2042
2042
|
l = c.propTypes;
|
|
2043
2043
|
else
|
|
2044
2044
|
return;
|
|
2045
2045
|
if (l) {
|
|
2046
|
-
var
|
|
2047
|
-
vt(l, r.props, "prop",
|
|
2046
|
+
var g = F(c);
|
|
2047
|
+
vt(l, r.props, "prop", g, r);
|
|
2048
2048
|
} else if (c.PropTypes !== void 0 && !Ie) {
|
|
2049
2049
|
Ie = !0;
|
|
2050
2050
|
var O = F(c);
|
|
@@ -2056,41 +2056,41 @@ Check the top-level render call using <` + l + ">.");
|
|
|
2056
2056
|
function kt(r) {
|
|
2057
2057
|
{
|
|
2058
2058
|
for (var c = Object.keys(r.props), l = 0; l < c.length; l++) {
|
|
2059
|
-
var
|
|
2060
|
-
if (
|
|
2061
|
-
re(r), y("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",
|
|
2059
|
+
var g = c[l];
|
|
2060
|
+
if (g !== "children" && g !== "key") {
|
|
2061
|
+
re(r), y("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", g), re(null);
|
|
2062
2062
|
break;
|
|
2063
2063
|
}
|
|
2064
2064
|
}
|
|
2065
2065
|
r.ref !== null && (re(r), y("Invalid attribute `ref` supplied to `React.Fragment`."), re(null));
|
|
2066
2066
|
}
|
|
2067
2067
|
}
|
|
2068
|
-
function Ze(r, c, l,
|
|
2068
|
+
function Ze(r, c, l, g, O, R) {
|
|
2069
2069
|
{
|
|
2070
2070
|
var C = z(r);
|
|
2071
2071
|
if (!C) {
|
|
2072
|
-
var
|
|
2073
|
-
(r === void 0 || typeof r == "object" && r !== null && Object.keys(r).length === 0) && (
|
|
2072
|
+
var p = "";
|
|
2073
|
+
(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.");
|
|
2074
2074
|
var $ = Rt(O);
|
|
2075
|
-
$ ?
|
|
2076
|
-
var
|
|
2077
|
-
r === null ?
|
|
2075
|
+
$ ? p += $ : p += He();
|
|
2076
|
+
var P;
|
|
2077
|
+
r === null ? P = "null" : Array.isArray(r) ? P = "array" : r !== void 0 && r.$$typeof === n ? (P = "<" + (F(r.type) || "Unknown") + " />", p = " Did you accidentally export a JSX literal instead of a component?") : P = typeof r, y("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", P, p);
|
|
2078
2078
|
}
|
|
2079
2079
|
var j = Ot(r, c, l, O, R);
|
|
2080
2080
|
if (j == null)
|
|
2081
2081
|
return j;
|
|
2082
2082
|
if (C) {
|
|
2083
|
-
var
|
|
2084
|
-
if (
|
|
2085
|
-
if (
|
|
2086
|
-
if (Array.isArray(
|
|
2087
|
-
for (var ne = 0; ne <
|
|
2088
|
-
Xe(
|
|
2089
|
-
Object.freeze && Object.freeze(
|
|
2083
|
+
var K = c.children;
|
|
2084
|
+
if (K !== void 0)
|
|
2085
|
+
if (g)
|
|
2086
|
+
if (Array.isArray(K)) {
|
|
2087
|
+
for (var ne = 0; ne < K.length; ne++)
|
|
2088
|
+
Xe(K[ne], r);
|
|
2089
|
+
Object.freeze && Object.freeze(K);
|
|
2090
2090
|
} else
|
|
2091
2091
|
y("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
|
|
2092
2092
|
else
|
|
2093
|
-
Xe(
|
|
2093
|
+
Xe(K, r);
|
|
2094
2094
|
}
|
|
2095
2095
|
return r === t.Fragment ? kt(j) : Tt(j), j;
|
|
2096
2096
|
}
|
|
@@ -2116,12 +2116,12 @@ function kr(t) {
|
|
|
2116
2116
|
if (!d)
|
|
2117
2117
|
throw new Error("LiveProvider never found.");
|
|
2118
2118
|
return d;
|
|
2119
|
-
}, u = () => e, f = () => e.$RTC,
|
|
2120
|
-
function
|
|
2121
|
-
const b = a(), y = [b, name, ...
|
|
2119
|
+
}, u = () => e, f = () => e.$RTC, v = () => f(), h = () => async (d) => await e.connect(d);
|
|
2120
|
+
function _(d, S, N = []) {
|
|
2121
|
+
const b = a(), y = [b, name, ...N], D = () => b.keyframes.off(d, S);
|
|
2122
2122
|
return V.useEffect(() => (b.keyframes.on(d, S), D), y), D;
|
|
2123
2123
|
}
|
|
2124
|
-
function
|
|
2124
|
+
function E() {
|
|
2125
2125
|
const d = a();
|
|
2126
2126
|
return {
|
|
2127
2127
|
connect: async (T) => await d.connect(T),
|
|
@@ -2138,7 +2138,7 @@ function kr(t) {
|
|
|
2138
2138
|
};
|
|
2139
2139
|
}
|
|
2140
2140
|
function w(d) {
|
|
2141
|
-
const S = a(), [
|
|
2141
|
+
const S = a(), [N, b] = V.useState(S.getFramesByKey(d));
|
|
2142
2142
|
V.useEffect(() => {
|
|
2143
2143
|
const D = (ue) => b(ue), U = d, z = D;
|
|
2144
2144
|
return S.keyframes.on(U, z), () => S.keyframes.off(U, z);
|
|
@@ -2147,16 +2147,16 @@ function kr(t) {
|
|
|
2147
2147
|
(D) => S.sendKeyframe(d, D),
|
|
2148
2148
|
[S]
|
|
2149
2149
|
);
|
|
2150
|
-
return [
|
|
2150
|
+
return [N, y];
|
|
2151
2151
|
}
|
|
2152
|
-
function m(d, S,
|
|
2153
|
-
const b = a(), y = () => b.off(d, S), D = [b, d, ...
|
|
2152
|
+
function m(d, S, N = []) {
|
|
2153
|
+
const b = a(), y = () => b.off(d, S), D = [b, d, ...N];
|
|
2154
2154
|
return V.useEffect(() => (b.on(d, S), y), D), y;
|
|
2155
2155
|
}
|
|
2156
|
-
function
|
|
2157
|
-
const d = a(), [S,
|
|
2156
|
+
function A() {
|
|
2157
|
+
const d = a(), [S, N] = V.useState(d.state);
|
|
2158
2158
|
return V.useEffect(() => {
|
|
2159
|
-
const b = (y) =>
|
|
2159
|
+
const b = (y) => N(y);
|
|
2160
2160
|
return d.on("stateChange", b), () => d.off("stateChange", b);
|
|
2161
2161
|
}, [d]), S;
|
|
2162
2162
|
}
|
|
@@ -2173,14 +2173,14 @@ function kr(t) {
|
|
|
2173
2173
|
detectMicro: () => d.$RTC.detectMicro()
|
|
2174
2174
|
};
|
|
2175
2175
|
}
|
|
2176
|
-
function
|
|
2177
|
-
const b = a(), y = () => b.$RTC.off(d, S), D = [b, d, ...
|
|
2176
|
+
function k(d, S, N = []) {
|
|
2177
|
+
const b = a(), y = () => b.$RTC.off(d, S), D = [b, d, ...N];
|
|
2178
2178
|
return V.useEffect(() => (b.$RTC.on(d, S), y), D), y;
|
|
2179
2179
|
}
|
|
2180
|
-
function
|
|
2181
|
-
const d = a(), [S,
|
|
2180
|
+
function H() {
|
|
2181
|
+
const d = a(), [S, N] = V.useState(
|
|
2182
2182
|
d.selfInfo || {}
|
|
2183
|
-
), b = (D) =>
|
|
2183
|
+
), b = (D) => N(D);
|
|
2184
2184
|
V.useEffect(() => (d.on("selfInfoUpdate", b), () => d.off("selfInfoUpdate", b)), [d]);
|
|
2185
2185
|
const y = V.useCallback(
|
|
2186
2186
|
async (D) => await d.setSelfInfo(D),
|
|
@@ -2188,17 +2188,17 @@ function kr(t) {
|
|
|
2188
2188
|
);
|
|
2189
2189
|
return [S, y];
|
|
2190
2190
|
}
|
|
2191
|
-
function
|
|
2192
|
-
const d = a(), [S,
|
|
2191
|
+
function J() {
|
|
2192
|
+
const d = a(), [S, N] = V.useState(
|
|
2193
2193
|
d.snapshot
|
|
2194
2194
|
);
|
|
2195
2195
|
return V.useEffect(() => {
|
|
2196
|
-
const b = (y) =>
|
|
2196
|
+
const b = (y) => N(y);
|
|
2197
2197
|
return d.on("keyframes", b), () => d.off("keyframes", b);
|
|
2198
2198
|
}), S;
|
|
2199
2199
|
}
|
|
2200
2200
|
function I() {
|
|
2201
|
-
const d = a(), [S,
|
|
2201
|
+
const d = a(), [S, N] = V.useState(d.userList), b = (y) => N(y);
|
|
2202
2202
|
return V.useEffect(() => (d.on("userListUpdate", b), () => d.off("userListUpdate", b)), [d]), S;
|
|
2203
2203
|
}
|
|
2204
2204
|
return {
|
|
@@ -2206,17 +2206,17 @@ function kr(t) {
|
|
|
2206
2206
|
jsBridge: n,
|
|
2207
2207
|
LiveProvider: i,
|
|
2208
2208
|
unsafe__useLiveInstance: u,
|
|
2209
|
-
unsafe__useRTCInstance:
|
|
2210
|
-
useConnect:
|
|
2209
|
+
unsafe__useRTCInstance: v,
|
|
2210
|
+
useConnect: h,
|
|
2211
2211
|
useKeyframe: w,
|
|
2212
|
-
useKeyframeUpdateCallback:
|
|
2213
|
-
useLiveAction:
|
|
2212
|
+
useKeyframeUpdateCallback: _,
|
|
2213
|
+
useLiveAction: E,
|
|
2214
2214
|
useLiveEventCallback: m,
|
|
2215
|
-
useLiveState:
|
|
2215
|
+
useLiveState: A,
|
|
2216
2216
|
useRTCAction: M,
|
|
2217
|
-
useRTCEventCallback:
|
|
2218
|
-
useSelfInfo:
|
|
2219
|
-
useKeyframesSnapshot:
|
|
2217
|
+
useRTCEventCallback: k,
|
|
2218
|
+
useSelfInfo: H,
|
|
2219
|
+
useKeyframesSnapshot: J,
|
|
2220
2220
|
useUserList: I
|
|
2221
2221
|
};
|
|
2222
2222
|
}
|
|
@@ -2224,7 +2224,7 @@ export {
|
|
|
2224
2224
|
tt as BrowserRTC,
|
|
2225
2225
|
rt as BrowserRTC4Chime,
|
|
2226
2226
|
ut as BuiltInRTCType,
|
|
2227
|
-
|
|
2227
|
+
G as BuiltinActionType,
|
|
2228
2228
|
q as BuiltinEventType,
|
|
2229
2229
|
W as Command,
|
|
2230
2230
|
De as CoreRTC,
|